Expand description
The C ABI for encrypted, authenticated sessions.
These functions wrap [pamoja_session] for callers that reach the SDK through
the flat C boundary: the key agreement two devices use to arrive at the same
session key without sending it, and the sealed messages that key then protects.
A session holds the counter it sends under and the window of what it has accepted, so it crosses as an opaque handle; so does an agreement key, because it holds a secret that should not be copied around by value. Messages are encrypted in place, so the caller supplies the buffer and nothing allocates.
Structs§
- Pamoja
Agreement Key - An opaque handle to a key-agreement secret.
- Pamoja
Sealed - The header that travels beside a sealed message.
- Pamoja
Session - An opaque handle to a live session with one peer.
Enums§
- Pamoja
Session Role - Which side of a session a device is on.
Constants§
- PAMOJA_
SESSION_ KEY_ LEN - The length in bytes of an agreement seed, a public key, and a digest.
- PAMOJA_
SESSION_ TAG_ LEN - The length in bytes of the tag that authenticates a sealed message.
Functions§
- pamoja_
agreement_ ⚠key_ free - Releases an agreement key handle.
- pamoja_
agreement_ ⚠key_ from_ seed - Creates a key-agreement secret from a provisioned 32-byte seed.
- pamoja_
agreement_ ⚠key_ public - Copies out the public key to hand to a peer.
- pamoja_
session_ ⚠establish - Establishes a session with a peer.
- pamoja_
session_ ⚠free - Releases a session handle.
- pamoja_
session_ ⚠hkdf_ sha256 - Expands input keying material into as many bytes as are asked for.
- pamoja_
session_ ⚠hmac_ sha256 - Computes a keyed hash over a message.
- pamoja_
session_ ⚠open - Opens a message from the peer, verifying it and decrypting it in place.
- pamoja_
session_ ⚠seal - Seals a message for the peer, encrypting it in place.