Module: types
- class x3dh.types.Bundle(identity_key, signed_pre_key, signed_pre_key_sig, pre_keys)[source]
Bases:
NamedTupleThe bundle is a collection of public keys and signatures used by the X3DH protocol to achieve asynchronous key agreements while providing forward secrecy and cryptographic deniability. Parties that want to be available for X3DH key agreements have to publish their bundle somehow. Other parties can then use that bundle to perform a key agreement.
- Parameters:
- class x3dh.types.IdentityKeyFormat(*values)[source]
Bases:
EnumThe two supported public key formats for the identity key:
Curve25519 public keys: 32 bytes, the little-endian encoding of the u coordinate as per RFC 7748, section 5 “The X25519 and X448 Functions”.
Ed25519 public keys: 32 bytes, the little-endian encoding of the y coordinate with the sign bit of the x coordinate stored in the most significant bit as per RFC 8032, section 3.2 “Keys”.
- CURVE_25519 = 'CURVE_25519'
- ED_25519 = 'ED_25519'
- class x3dh.types.Header(identity_key, ephemeral_key, signed_pre_key, pre_key)[source]
Bases:
NamedTupleThe header generated by the active party as part of the key agreement, and consumed by the passive party to derive the same shared secret.
- Parameters: