<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.openssl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.openssl-pkey-new.php',
    1 => 'openssl_pkey_new',
    2 => 'Erzeugt einen neuen privaten Schl&uuml;ssel',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pkey-get-public.php',
    1 => 'openssl_pkey_get_public',
  ),
  'next' => 
  array (
    0 => 'function.openssl-private-decrypt.php',
    1 => 'openssl_private_decrypt',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/openssl/functions/openssl-pkey-new.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-pkey-new" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_pkey_new</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_pkey_new</span> &mdash; <span class="dc-title">Erzeugt einen neuen privaten Schlüssel</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-pkey-new-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_pkey_new</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.array.php" class="type array">array</a></span></span> <code class="parameter">$options</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="class.opensslasymmetrickey.php" class="type OpenSSLAsymmetricKey">OpenSSLAsymmetricKey</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_pkey_new()</strong></span> erzeugt einen neuen privaten
   Schlüssel. Wie man den öffentlichen Teil des Schlüssels erhält, wird in
   einem Beispiel unten gezeigt.
  </p>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
 <span class="simpara">
  Die ordnungsgemäße Ausführung dieser Funktion setzt die Installation einer
  gültigen <var class="filename">openssl.cnf</var>-Datei voraus. Mehr Information
  hierzu sind im Abschnitt
  <a href="openssl.installation.php" class="link">Installation</a> zu finden.
 </span>
</p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-pkey-new-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       Die Schlüsselerzeugung kann mit <code class="parameter">options</code> feiner
       abgestimmt werden (z. B. durch die Angabe der verwendeten Bits oder
       Parameter).
       Diese Optionen können entweder Algorithmus-spezifische Parameter sein,
       die bei der Schlüsselerzeugung verwendet werden, oder generische
       Optionen, die auch bei der Erzeugung eines <abbr title="Certificate Signing Request">CSR</abbr>
       verwendet werden, wenn sie nicht angegeben werden.
       Weitere Informationen über die Verwendung von
       <code class="parameter">options</code> für ein <abbr title="Certificate Signing Request">CSR</abbr> sind der
       Dokumentation zu <span class="function"><a href="function.openssl-csr-new.php" class="function">openssl_csr_new()</a></span> zu entnehmen.
       Von diesen Optionen werden nur <code class="literal">private_key_bits</code>,
       <code class="literal">private_key_type</code>, <code class="literal">curve_name</code>, und
       <code class="literal">config</code> für die Schlüsselerzeugung verwendet.
       Die Algorithmus-spezifischen Optionen werden verwendet, wenn das
       assoziative Array einen der spezifischen Schlüssel enthält.
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          Der Schlüssel <code class="literal">&quot;rsa&quot;</code> zur Einstellung der RSA-Parameter.
         </span>
         <table class="doctable informaltable">
          
           <thead>
            <tr>
             <th>Optionen</th>
             <th>Typ</th>
             <th>Format</th>
             <th>Erforderlich</th>
             <th>Beschreibung</th>
            </tr>

           </thead>

           <tbody class="tbody">
            <tr>
             <td><code class="literal">&quot;n&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>ja</td>
             <td>Modul</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;e&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>öffentlicher Exponent</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;d&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>ja</td>
             <td>privater Exponent</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;p&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Primzahl 1</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;q&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Primzahl 2</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;dmp1&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Exponent1, d mod (p-1)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;dmq1&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Exponent2, d mod (q-1)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;iqmp&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Koeffizient, (Inverse von q) mod p</td>
            </tr>

           </tbody>
          
         </table>

        </li>
        <li class="listitem">
         <span class="simpara">
          Der Schlüssel <code class="literal">&quot;dsa&quot;</code> zur Einstellung der DSA-Parameter.
         </span>
         <table class="doctable informaltable">
          
           <thead>
            <tr>
             <th>Optionen</th>
             <th>Typ</th>
             <th>Format</th>
             <th>Erforderlich</th>
             <th>Beschreibung</th>
            </tr>

           </thead>

           <tbody class="tbody">
            <tr>
             <td><code class="literal">&quot;p&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Primzahl (öffentlich)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;q&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>160-Bit Unterprimzahl (Subprime), q | p-1 (öffentlich)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;g&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Generator der Untergruppe (öffentlich)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;priv_key&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>PEM-Schlüssel</td>
             <td>nein</td>
             <td>privater Schlüssel x</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;pub_key&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>PEM-Schlüssel</td>
             <td>nein</td>
             <td>öffentlicher Schlüssel y = g^x</td>
            </tr>

           </tbody>
          
         </table>

        </li>
        <li class="listitem">
         <span class="simpara">
          Der Schlüssel <code class="literal">&quot;rsa&quot;</code> zur Einstellung der RSA-Parameter.
         </span>
         <table class="doctable informaltable">
          
           <thead>
            <tr>
             <th>Optionen</th>
             <th>Typ</th>
             <th>Format</th>
             <th>Erforderlich</th>
             <th>Beschreibung</th>
            </tr>

           </thead>

           <tbody class="tbody">
            <tr>
             <td><code class="literal">&quot;p&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Primzahl (gemeinsam genutzt)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;g&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Generator von Z_p (gemeinsam genutzt)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;priv_key&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>PEM-Schlüssel</td>
             <td>nein</td>
             <td>privater DH-Wert x</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;pub_key&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>PEM-Schlüssel</td>
             <td>nein</td>
             <td>öffentlicher DH-Wert g^x</td>
            </tr>

           </tbody>
          
         </table>

        </li>
        <li class="listitem">
         <span class="simpara">
          Der Schlüssel <code class="literal">&quot;ec&quot;</code> für die Parameter der
          elliptischen Kurve
         </span>
         <table class="doctable informaltable">
          
           <thead>
            <tr>
             <th>Optionen</th>
             <th>Typ</th>
             <th>Format</th>
             <th>Erforderlich</th>
             <th>Beschreibung</th>
            </tr>

           </thead>

           <tbody class="tbody">
            <tr>
             <td><code class="literal">&quot;curve_name&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Name</td>
             <td>nein</td>
             <td>Name der Kurve, siehe <span class="function"><a href="function.openssl-get-curve-names.php" class="function">openssl_get_curve_names()</a></span></td>
            </tr>

            <tr>
             <td><code class="literal">&quot;p&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Primzahl des Feldes (mathematisch: Körpers) für die Kurve über Fp</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;a&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Koeffizient a der Kurve für Fp: y^2 mod p = x^3 + ax + b mod p</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;b&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Koeffizient b der Kurve für Fp: y^2 mod p = x^3 + ax + b mod p</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;seed&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>optionaler Zufallszahlen-Seed für die Generierung von Koeffizient b</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;generator&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>binär kodierter Punkt</td>
             <td>nein</td>
             <td>Generatorpunkt der Kurve</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;g_x&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>x-Koordinate des Generatorpunkts</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;g_y&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>y-Koordinate des Generatorpunkts</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;cofactor&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Kurvenkoeffizient</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;order&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>Ordnung der Kurve</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;x&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>x-Koordinate (öffentlich)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;y&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>y-Koordinate (öffentlich)</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;d&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>Binärzahl</td>
             <td>nein</td>
             <td>privater Schlüssel</td>
            </tr>

           </tbody>
          
         </table>

        </li>
        <li class="listitem">
         <span class="simpara">
          Die Schlüssel <code class="literal">&quot;x25519&quot;</code>, <code class="literal">&quot;x448&quot;</code>,
          <code class="literal">&quot;ed25519&quot;</code> und <code class="literal">&quot;ed448&quot;</code> für die
          Curve25519- und Curve448-Parameter.
         </span>
         <table class="doctable informaltable">
          
           <thead>
            <tr>
             <th>Optionen</th>
             <th>Typ</th>
             <th>Format</th>
             <th>Erforderlich</th>
             <th>Beschreibung</th>
            </tr>

           </thead>

           <tbody class="tbody">
             <tr>
             <td><code class="literal">&quot;priv_key&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>PEM-Schlüssel</td>
             <td>nein</td>
             <td>privater Schlüssel</td>
            </tr>

            <tr>
             <td><code class="literal">&quot;pub_key&quot;</code></td>
             <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
             <td>PEM-Schlüssel</td>
             <td>nein</td>
             <td>öffentlicher Schlüssel</td>
            </tr>

           </tbody>
          
         </table>

        </li>
       </ul>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-new-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg eine <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span>-Instanz
   zurück oder <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, wenn ein Fehler auftritt.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-pkey-new-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Unterstützung für Schlüssel, die auf Curve25519 und Curve448 basieren,
       wurde mit der Einführung der Felder <code class="literal">x25519</code>,
       <code class="literal">ed25519</code>, <code class="literal">x448</code> und
       <code class="literal">ed448</code> hinzugefügt.
      </td>
     </tr>

     <tr>
      <td>8.3.0</td>
      <td>
       Unterstützung für die Generierung von EC-Schlüsseln mit
       benutzerdefinierten EC-Parametern hinzugefügt.
       Insbesondere mit der Einführung der EC-Optionen:
       <code class="literal">p</code>, <code class="literal">a</code>, <code class="literal">b</code>,
       <code class="literal">seed</code>, <code class="literal">generator</code>,
       <code class="literal">g_x</code>, <code class="literal">g_y</code>,
       <code class="literal">cofactor</code> und <code class="literal">order</code>.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       Bei Erfolg gibt diese Funktion nun eine
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span>-Instanz zurück; vorher
       wurde eine <a href="language.types.resource.php" class="link">Ressource</a> vom Typ <code class="literal">OpenSSL-Schlüssel</code>
       zurückgegeben.
      </td>
     </tr>

     <tr>
      <td>7.1.0</td>
      <td>
       Der Parameter <code class="parameter">options</code> wurde um den Schlüssel
       <code class="literal">curve_name</code> erweitert, damit EC-Schlüssel basierend
       auf Algorithmen für elliptische Kurven erzeugt werden können.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.openssl-pkey-new-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="function.openssl-pkey-new.example.public-key">
   <p><strong>Beispiel #1 Aus einem privaten Schlüssel den öffentlichen Schlüssel gewinnen</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$private_key </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_new</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$public_key_pem </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_get_details</span><span style="color: #007700">(</span><span style="color: #0000BB">$private_key</span><span style="color: #007700">)[</span><span style="color: #DD0000">'key'</span><span style="color: #007700">];<br />echo </span><span style="color: #0000BB">$public_key_pem</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$public_key </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_get_public</span><span style="color: #007700">(</span><span style="color: #0000BB">$public_key_pem</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$public_key</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">// Ausgabe vor PHP 8.0.0; Hinweis: Die Funktion gibt eine Ressource zurück
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwknBFEherZe74BiRjTFA
hqwZ1SK7brwq7C/afnLXKhRR7jnrpfM0ypC46q8xz5UZswenZakJ7kd5fls+r4Bv
3P8XsKYLTh2m1GiWQhV1g77cNIN4qNWh70PiDO3fB2446o1LBgToQYuRZS5YQRfJ
rVD0ysgtVcCU9tjaey28HlgApOpYFTaaKPj2MBmEYpMC+kG2HhL12GfpHUi2eiXI
dXT2WskWHWvUrmQ7fJIfI92JlDokV62DH/q1oiedLs9OPNb0rL1aAmYdzaVN6XNH
x/o4Lh125v2vAPV9E3fZCDc/HDEUaahpjanMiCQEgEDp5Hr+CRkvERT5/ydN+p08
5wIDAQAB
-----END PUBLIC KEY-----

resource(6) of type (OpenSSL key)

// Ausgabe seit PHP 8.0.0; Hinweis: Die Funktion gibt ein Objekt zurück
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwknBFEherZe74BiRjTFA
hqwZ1SK7brwq7C/afnLXKhRR7jnrpfM0ypC46q8xz5UZswenZakJ7kd5fls+r4Bv
3P8XsKYLTh2m1GiWQhV1g77cNIN4qNWh70PiDO3fB2446o1LBgToQYuRZS5YQRfJ
rVD0ysgtVcCU9tjaey28HlgApOpYFTaaKPj2MBmEYpMC+kG2HhL12GfpHUi2eiXI
dXT2WskWHWvUrmQ7fJIfI92JlDokV62DH/q1oiedLs9OPNb0rL1aAmYdzaVN6XNH
x/o4Lh125v2vAPV9E3fZCDc/HDEUaahpjanMiCQEgEDp5Hr+CRkvERT5/ydN+p08
5wIDAQAB
-----END PUBLIC KEY-----

object(OpenSSLAsymmetricKey)#2 (0) {
}</pre>
</div>
   </div>
  </div>

  <div class="example" id="function.openssl-pkey-new.example.rsa-key">
   <p><strong>Beispiel #2 Erzeugen eines RSA-Schlüssels aus Parametern</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$nhex </span><span style="color: #007700">= </span><span style="color: #DD0000">"BBF82F090682CE9C2338AC2B9DA871F7368D07EED41043A440D6B6F07454F51F" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"B8DFBAAF035C02AB61EA48CEEB6FCD4876ED520D60E1EC4619719D8A5B8B807F" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"AFB8E0A3DFC737723EE6B4B7D93A2584EE6A649D060953748834B2454598394E" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"E0AAB12D7B61A51F527A9A41F6C1687FE2537298CA2A8F5946F8E5FD091DBDCB"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$ehex </span><span style="color: #007700">= </span><span style="color: #DD0000">"11"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$dhex </span><span style="color: #007700">= </span><span style="color: #DD0000">"A5DAFC5341FAF289C4B988DB30C1CDF83F31251E0668B42784813801579641B2" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"9410B3C7998D6BC465745E5C392669D6870DA2C082A939E37FDCB82EC93EDAC9" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"7FF3AD5950ACCFBC111C76F1A9529444E56AAF68C56C092CD38DC3BEF5D20A93" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"9926ED4F74A13EDDFBE1A1CECC4894AF9428C2B7B8883FE4463A4BC85B1CB3C1"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$phex </span><span style="color: #007700">= </span><span style="color: #DD0000">"EECFAE81B1B9B3C908810B10A1B5600199EB9F44AEF4FDA493B81A9E3D84F632" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"124EF0236E5D1E3B7E28FAE7AA040A2D5B252176459D1F397541BA2A58FB6599"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$qhex </span><span style="color: #007700">= </span><span style="color: #DD0000">"C97FB1F027F453F6341233EAAAD1D9353F6C42D08866B1D05A0F2035028B9D86" </span><span style="color: #007700">.<br />        </span><span style="color: #DD0000">"9840B41666B42E92EA0DA3B43204B5CFCE3352524D0416A5A441E700AF461503"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$dphex </span><span style="color: #007700">= </span><span style="color: #DD0000">"11"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$dqhex </span><span style="color: #007700">= </span><span style="color: #DD0000">"11"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$qinvhex </span><span style="color: #007700">= </span><span style="color: #DD0000">"b06c4fdabb6301198d265bdbae9423b380f271f73453885093077fcd39e2119f" </span><span style="color: #007700">.<br />           </span><span style="color: #DD0000">"c98632154f5883b167a967bf402b4e9e2e0f9656e698ea3666edfb25798039f7"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$rsa</span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_new</span><span style="color: #007700">([<br />    </span><span style="color: #DD0000">'rsa' </span><span style="color: #007700">=&gt; [<br />        </span><span style="color: #DD0000">'n' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$nhex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'e' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$ehex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'d' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$dhex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'p' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$phex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'q' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$qhex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'dmp1' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$dphex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'dmq1' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$dqhex</span><span style="color: #007700">),<br />        </span><span style="color: #DD0000">'iqmp' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #0000BB">$qinvhex</span><span style="color: #007700">),<br />    ],<br />]);<br /></span><span style="color: #0000BB">$details </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_get_details</span><span style="color: #007700">(</span><span style="color: #0000BB">$rsa</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$details</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


</div><?php manual_footer($setup); ?>