<div class="content"><p>The PUBLIC_KEY_BLOB message is used to store information
about <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_3f85a24a-f32a-4322-9e99-eba6ae802cd6" data-linktype="relative-path">RSA</a> <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_3ac30f9e-dfc0-4d06-a450-49ed662b4328" data-linktype="relative-path">key exchange public keys</a>
and RSA <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_3fb3f762-0e54-4380-8af0-f2549101ff61" data-linktype="relative-path">signature public
keys</a>. It is used during <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_e58c72cc-2506-4e51-b33d-fbefe4bd6138" data-linktype="relative-path">secure
session</a> negotiation.</p><p>The syntax of the PUBLIC_KEY_BLOB message is represented by
the following diagram.</p><table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">PublicKeyBlobDataLength</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved0</p>
  </td>
 </tr>
 <tr>
  <td colspan="8">
  <p align="center">Type</p>
  </td>
  <td colspan="8">
  <p align="center">Version</p>
  </td>
  <td colspan="16">
  <p align="center">Reserved</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">AlgID</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Magic</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">BitLen</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">PubExp</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Modulus
  (variable)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
</tbody></table><p><b>PublicKeyBlobDataLength (4 bytes): </b>A 32-bit
unsigned integer. This field contains the total length of the PUBLIC_KEY_BLOB
instance excluding the PublicKeyBlobDataLength and Reserved0 fields.</p><p><b>Reserved0 (4 bytes): </b>A 32-bit unsigned
integer. This field MUST be set to 0x0.</p><p><b>Type (1 byte): </b>An 8-bit unsigned integer. This
field MUST be set to 0x6. This indicates that the <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_4cf96ca0-e3a9-4165-8d1a-a21b1397007a" data-linktype="relative-path">public key</a> is transferred.</p><p><b>Version (1 byte): </b>An 8-bit unsigned integer.
This field MUST be set to 0x2.</p><p><b>Reserved (2 bytes): </b>A 16-bit unsigned integer.
This field MUST be set to 0x0.</p><p><b>AlgID (4 bytes): </b>A 32-bit unsigned integer.
This field is set to the CALG_RSA_KEYX value if the key exchange public key is
stored in the BLOB or the CALG_RSA_SIGN value if the signature public key is
stored.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>CALG_RSA_KEYX</p>
  <p>0x0000A400</p>
  </td>
  <td>
  <p>RSA public key exchange algorithm</p>
  </td>
 </tr><tr>
  <td>
  <p>CALG_RSA_SIGN</p>
  <p>0x00002400</p>
  </td>
  <td>
  <p>RSA public key signature algorithm</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Magic (4 bytes): </b>A 32-bit unsigned integer.
This field MUST be set to 0x31415352. The value can be interpreted as the
ASCII-encoded string &#34;RSA1&#34;.</p><p><b>BitLen (4 bytes): </b>A 32-bit unsigned integer
that specifies the size of the public key in bits. This field MUST be set to
0x200 (512) because the 512 (=0x200) bit RSA key is used.</p><p><b>PubExp (4 bytes): </b>A 32-bit unsigned integer
that is a public exponent, as specified in <a href="https://go.microsoft.com/fwlink/?linkid=2164409" data-linktype="external">[RFC8017]</a>.</p><p><b>Modulus (variable): </b>A variable-length array of
bytes that stores the RSA public key. The size, in bytes, of the <b>Modulus</b>
field is <b>BitLen</b>/8.</p></div>