Public Key Transaction Family

Overview

The Public Key transaction family provides a trustless way to store the public key. In current protocol version RSA keys are supported, in next releases there will be added support for ECDSA keys as well.

Definitions of Public Key Entries

The following protocol buffers definition define public key entries:

message PubKeyStorage {
     // Public key of a user who added the certificate
     string owner = 1;
     // X.509 certificate entity
     NewPubKeyPayload payload = 2;
     // status of the certificate
     bool revoked = 3;
}

Addressing

The address of an entity on the storage is built as follows (where pubkey_pem is a PEM-encoded public key and hash512(text) returns the hexadecimal representation of sha512(text)):

address = hash512('pub_key')[:6] + hash512(pubkey_pem)[:64]

Transaction Payload

Public Key transaction family payloads are defined by the following protocol buffers code:

message NewPubKeyPayload {
    enum EntityType {
        PERSONAL = 0;
        SERVER = 1;
    }

    enum PubKeyType {
        RSA = 0;
    }
    // PEM Encoded public key
    string public_key = 1;
    PubKeyType public_key_type = 2;
    // For future ACME support(Now only Personal)
    EntityType entity_type = 3;
    // hash of PEM encoded public key of certificate
    string entity_hash = 4;
    string entity_hash_signature = 5;
    // UNIX time when validity begins
    uint32 valid_from = 6;
    // UNIX time when validity ends
    uint32 valid_to = 7;
}

message RevokePubKeyPayload {
    // The address of a certificate in the storage generated by the transaction processor.
    string address = 1;
}

Transaction Header

Inputs and Outputs

The inputs and outputs for Pub Key family transactions in respect to payload must include:

  • NewPubKeyPayload:
    • Inputs:
      • Sender’s account address
      • public_key address
      • Address of setting remme.economy_enabled
    • Outputs:
      • Sender’s account address
      • public_key address
  • RevokePubKeyPayload: public_key address

Dependencies

None.

Family

  • family_name: “pub_key”
  • family_version: “0.1”

Encoding

The encoding field must be set to “application/protobuf”.

To-Do

Add support for:

  • ECDSA keys storing mechanism