KeyData format
This section defines the wire format for M_KeyData and its descendant types.
In a key attestation bundle as described in Key attestation bundle construction, the following fields will use this format:
-
pubkeydata
-
knsopub
M_KeyData
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
type |
4 bytes |
Little-endian unsigned integer. See M_KeyType |
data |
variable |
Depends on field |
M_KeyData.data representations
This depends on the value of the type
field, as follows:
Name of type |
Value of type |
Format of data |
---|---|---|
KeyType_RSAPublic |
1 |
|
KeyType_RSAPrivate |
2 |
|
KeyType_DSAPublic |
3 |
|
KeyType_DSAPrivate |
19 |
|
KeyType_KCDSAPublic |
39 |
|
KeyType_KCDSAPrivate |
40 |
|
KeyType_ECPublic |
44 |
|
KeyType_ECPrivate |
45 |
|
KeyType_ECDSAPublic |
46 |
|
KeyType_ECDSAPrivate |
47 |
|
KeyType_Ed25519Public |
65 |
|
KeyType_Ed25519Private |
66 |
Any supported values of type
not present in the table correspond to an empty (zero-length) data
field.
M_ECPoint
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
flags |
4 bytes |
Little-endian unsigned integer. See M_ECPoint_flags |
x |
variable |
See M_Bignum |
y |
variable |
See M_Bignum |
M_ECPoint_flags
A bitmap type, represented as a 4-byte little-endian unsigned integer. Individual bit values are:
Value | Name |
---|---|
0x00000001 |
|
M_KeyType_DSAPrivate_Data
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
dlg |
variable |
|
x |
variable |
See M_Bignum |
M_KeyType_DSAPublic_Data
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
dlg |
variable |
|
y |
variable |
See M_Bignum |
M_KeyType_ECPrivate_Data
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
curve |
variable |
See M_EllipticCurve |
d |
variable |
See M_Bignum |
M_KeyType_ECPublic_Data
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
curve |
variable |
See M_EllipticCurve |
Q |
variable |
See M_ECPoint |
M_KeyType_KCDSAPrivate_Data
M_KeyType_KCDSAPublic_Data
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
dlg |
variable |
|
y |
variable |
See M_Bignum |
M_KeyType_Random_Data
This represents a structure with the following fields:
Field | Size | Format |
---|---|---|
k |
variable |
See M_ByteBlock |