2.2.3.2 ECDH Key
The following specifies the format and field descriptions for the Elliptic Curve Diffie-Hellman (ECDH) Key structure [RFC5114].
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Magic |
|||||||||||||||||||||||||||||||
|
Key length |
|||||||||||||||||||||||||||||||
|
X (variable) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
Y (variable) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
Magic (4 bytes): A 32-bit unsigned integer encoded in little-endian format, representing the ECDH field parameters. The following values are valid.
-
Value
Meaning
0x314B4345
The values in the X and Y fields represent an ECDH [RFC5114] key over the elliptic curve P-256 specified in Appendix D.1.2.3 of [FIPS186].
0x334B4345
The values in the X and Y fields represent an ECDH [RFC5114] key over the elliptic curve P-384 specified in Appendix D.1.2.4 of [FIPS186].
0x354B4345
The values in the X and Y fields represent an ECDH [RFC5114] key over the elliptic curve P-521 specified in Appendix D.1.2.5 of [FIPS186].
Key length (4 bytes): A 32-bit unsigned integer. This field MUST be the length, in bytes, of the public key. This field is encoded using little-endian format.
X (variable): The x coordinate of the point P that represents the ECDH [RFC5114] public key. This parameter is referred to as x in [SP800-56A] section 3.2. It MUST be encoded in big-endian format. The length of this field, in bytes, MUST be equal to the value in the Key length field.
Y (variable): The y coordinate of the point P that represents the ECDH public key. This parameter is referred to as y in [SP800-56A] section 3.2. It MUST be encoded in big-endian format. The length of this field, in bytes, MUST be equal to the value in the Key length field.