Skip to main content

Module encryption

Module encryption 

Source
Expand description

§Encryption Module - Data Encryption Primitives

Provides encryption for data in transit and at rest using:

  • ChaCha20-Poly1305: AEAD symmetric encryption
  • X25519: Diffie-Hellman key exchange
  • HKDF-SHA256: Key derivation

§Encryption Layers

LayerScopeKey Type
TransportPeer-to-peer connectionsSession keys (DH)
StorageAt-rest documentsDevice key
Cell BroadcastCell-wide messagesGroup key

Structs§

EncryptedCellMessage
Encrypted message for cell broadcast
EncryptedData
Encrypted data with nonce
EncryptedDocument
Encrypted document for at-rest storage
EncryptionKeypair
X25519 keypair for key exchange
EncryptionManager
Encryption manager for secure communications
GroupKey
Group key for cell broadcast encryption
SecureChannel
Secure channel between two peers
SymmetricKey
Symmetric key for encryption/decryption

Constants§

NONCE_SIZE
Size of encryption nonce in bytes (96 bits for ChaCha20-Poly1305)
SYMMETRIC_KEY_SIZE
Size of symmetric key in bytes (256 bits)
X25519_PUBLIC_KEY_SIZE
Size of X25519 public key in bytes