Construction of nCore key hashes
nCore key hashes are SHA1 hashes of a sequence of bytes, or, if you are using KeyHashEx
, the specified hash function, for example SHA256, of the same sequence.
Key hashes are constructed the following way in nCore:
"nFast KeyHash\0" || HASHPREFIX || "\0" || KEY || "invented by nCipher 1997\0"
Component | Meaning |
---|---|
|
zero-terminated header string |
|
zero-terminated identifying string for the key type, see Identifying strings and key material |
|
Key material, see Identifying strings and key material |
|
zero-terminated trailer string |
Identifying strings and key material
The following notation is used in the definitions:
Notation | Meaning |
---|---|
|
Concatenation |
|
The number of bits required to represent the integer |
|
The representation of the integer |
|
Elliptic curve domains, see Elliptic curve domains. |
|
The representation of the integer |
Key type | Identifying String (HASHPREFIX) | Key Material (KEY) |
---|---|---|
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Raw public key material |
|
|
Raw public key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
|
|
|
|
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
If
Otherwise:
|
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw key material |
|
|
Raw public key material |