PCP private key structure. More...
#include <structs.h>
Public Attributes | |
byte | masterpub [32] |
ED25519 master public key signing key. More... | |
byte | mastersecret [64] |
ED25519 master secret key signing key. More... | |
byte | pub [32] |
Curve25519 encryption public key. More... | |
byte | secret [32] |
Curve25519 encryption secret key. More... | |
byte | edpub [32] |
ED25519 public signing key. More... | |
byte | edsecret [64] |
ED25519 secret signing key. More... | |
byte | nonce [24] |
random nonce used to encrypt secret keys More... | |
byte | encrypted [176] |
concatenated and encrypted secret keys More... | |
char | owner [255] |
the key owner, string More... | |
char | mail [255] |
mail address of the owner, string More... | |
char | id [17] |
key-id, used internally only, jenhash of public keys More... | |
uint8_t | type |
key type: MASTER_SECRET or SECRET More... | |
uint64_t | ctime |
creation time, epoch More... | |
uint32_t | version |
key version More... | |
uint32_t | serial |
serial number of the key, randomly generated More... | |
PCP private key structure.
Most fields are self explanatory.
Some notes:
'encrypted' contains the encrypted secret keys (contatenated mastersecret, secret and edsecret). If it's set, the field 'secret' which contains the clear secret key will be zeroed with random values, the first byte will be 0. Same for the field 'edsecret'.
'nonce' contains the nonce required to decrypt the encrypted secret, if set.
'serial' is a random number.
'id' is a string containing the hex values of the CRC32 checksum of the public and secret key.
Upon creation everything will be filled with random bytes. String fields will contain a string followed by 0 followed by the rest of the pre-filled random bytes. To denote a string field as empty, the first byte will be set to 0.
There are dynamically calculated attributes as well:
'checksum' is a 256 bit SHA hash of the public key returned by pcpkey_getchecksum() or pcppubkey_getchecksum().
'random id' is a random art ascii image returned by pcppubkey_get_art() or pcpkey_get_art(), calculated from the public key.
If exported to a single file or printed, the structure will be encoded using Z85 encoding.
byte _pcp_key_t::encrypted[176] |
char _pcp_key_t::id[17] |
char _pcp_key_t::mail[255] |
byte _pcp_key_t::masterpub[32] |
byte _pcp_key_t::mastersecret[64] |
byte _pcp_key_t::nonce[24] |
byte _pcp_key_t::secret[32] |
uint32_t _pcp_key_t::serial |