Object.Encryption (object v0.1.2)
End-to-end encryption for Object network communication.
Provides strong cryptographic guarantees for Object-to-Object communication including identity verification, forward secrecy, and message authentication.
Features
- X25519 ECDH for key exchange
- Ed25519 for digital signatures
- ChaCha20-Poly1305 for authenticated encryption
- Double Ratchet algorithm for forward secrecy
- Certificate-based identity verification
- Optional onion routing for anonymity
Summary
Functions
Returns a specification to start this module under a supervisor.
Creates an onion-encrypted message for anonymous routing.
Decrypts a message from a specific peer.
Encrypts a message for a specific peer.
Establishes an encrypted session with a peer.
Generates a new identity with keypairs and self-signed certificate.
Processes an onion-encrypted message.
Signs data with the node's signing key.
Starts the encryption service.
Verifies a signature from a peer.
Types
@type certificate() :: %{ subject_id: binary(), public_signing_key: binary(), public_encryption_key: binary(), issuer_id: binary() | :self, signature: binary(), issued_at: DateTime.t(), expires_at: DateTime.t() }
@type identity() :: %{ id: binary(), signing_key: keypair(), encryption_key: keypair(), certificate: certificate() }
@type session() :: %{ peer_id: binary(), peer_certificate: certificate(), root_key: binary(), chain_keys: %{send: binary(), receive: binary()}, message_keys: %{send: [binary()], receive: [binary()]}, counters: %{send: non_neg_integer(), receive: non_neg_integer()}, handshake_state: :pending | :completed, last_activity: DateTime.t() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Creates an onion-encrypted message for anonymous routing.
Decrypts a message from a specific peer.
Encrypts a message for a specific peer.
@spec establish_session(binary(), certificate()) :: :ok | {:error, term()}
Establishes an encrypted session with a peer.
Generates a new identity with keypairs and self-signed certificate.
Processes an onion-encrypted message.
Signs data with the node's signing key.
Starts the encryption service.
Verifies a signature from a peer.