Proofhash Standard
Abstract
This standard outlines how to encode data for transfering access to an mecenate data proof. Transfering access occurs when the creator of the proof allows an other party to access the data.
Specification
The encoding includes the following fields:
msp_version
: The version of the standard which tracks the protocol version in which it was released.proofhash
: base58 ipld-sha2-256 proofhash being transfered.sender
: The ethereum address of the owner of the proof.senderPubKey
: The 32 byte nacl public key of the sender converted to a string.senderVaultId
: The 32 bytes commitment from sismo sender vault.receiver
: The ethereum address of the receiver of the proof.receiverPubKey
: The 32 byte nacl public key of the receiver converted to a string.receiverVaultId
: The 32 bytes commitment from sismo sender vault.encryptedSymKey
: The string representation of the symmetric key of the proof encrypted with the receiver's public key and signed with the sender's private key.postId
: The 32 Byte identifier of the post
These fields are stringified as a JSON and bufferized before being sent to the receiver client. An application can add additionaly arbitrary fields if additional data is required.
Note on asymmetric keypair generation: This standard does not restrict how nacl keypairs are generated. However, it is recommended to derive a deterministic keypair using pbkdf2 of a signed message and the address of the user.
Note on asymmetric encryption: The encryption of the recovery key uses the first 24 byte of the keyhash as a salt.
Motivation
Having a standard way to encode proof access transfers allows for cross client transfer of proofs.
Backwards Compatibility
This is the first version of this standard. Clients can infer compatibility by comparing msp_version
field.
Reference Implementation
The reference implementation uses the tweetnacl javascript library for encryption.
Last updated