Module chain_crypto::multilock

source ·
Expand description

Similar to asymlock but takes a set of recipients instead of a unique receiver

  • prime order group for DH
  • HKDF for KDF
  • chacha20poly1305 for symmetric encryption algorithm

the format is the concat of:

  • 1 byte of version: hardcoded to 1
  • 1 byte of magic set to 0x12
  • 1 byte of magic set to 0x34
  • 1 byte from the number of participants
  • ephemeral public key: base GroupElement size bytes
  • recipient data (number of participants time) where each recipient is:
    • recipient public key
    • session key
  • encrypted payload (cipher=chacha-poly1305)
    • authenticated tag
    • encrypted data

the data encrypted with a ephemeral public key in prefix and the poly1305 tag in suffix.

Enums

Constants

Functions