Expand description
The C ABI for tamper-evident audit logs.
These functions wrap [pamoja_audit] for callers that reach the SDK through
the flat C boundary: a log that signs each record and chains it to the one
before, and the two ways to check such a chain, one entry at a time as it
streams in or all at once over a batch that has already arrived.
A log carries the position and hash it will chain the next entry onto, and an
entry owns its payload, so both cross as opaque handles. The identity that
signs and the key that checks come from the security
capability, which this one builds on.
Structs§
- Pamoja
Audit Entry - An opaque handle to one signed, chained record.
- Pamoja
Audit Log - An opaque handle to a log that signs and chains what it is given.
- Pamoja
Audit Verifier - An opaque handle that checks a chain one entry at a time as it arrives.
Constants§
- PAMOJA_
AUDIT_ DIGEST_ LEN - The length in bytes of an entry hash.
- PAMOJA_
AUDIT_ SIGNATURE_ LEN - The length in bytes of an entry signature.
Functions§
- pamoja_
audit_ ⚠entry_ digest - Copies out the hash of this entry, which the next one chains onto.
- pamoja_
audit_ ⚠entry_ free - Releases an entry handle.
- pamoja_
audit_ ⚠entry_ from_ bytes - Reads an entry back from the bytes it was written as.
- pamoja_
audit_ ⚠entry_ index - Returns the position of an entry in its chain.
- pamoja_
audit_ ⚠entry_ payload - Copies out the record an entry carries.
- pamoja_
audit_ ⚠entry_ previous - Copies out the hash of the entry before this one.
- pamoja_
audit_ ⚠entry_ signature - Copies out the signature over an entry.
- pamoja_
audit_ ⚠entry_ to_ bytes - Encodes an entry for storage or transmission.
- pamoja_
audit_ ⚠log_ append - Appends a payload to a log, signing it and chaining it onto the last entry.
- pamoja_
audit_ ⚠log_ free - Releases a log handle.
- pamoja_
audit_ ⚠log_ new - Creates a log that signs with a device identity and starts from nothing.
- pamoja_
audit_ ⚠log_ resume - Creates a log that carries on from the last entry an earlier one wrote.
- pamoja_
audit_ ⚠verifier_ check - Checks the next entry of a chain, in the order the entries were written.
- pamoja_
audit_ ⚠verifier_ free - Releases a verifier handle.
- pamoja_
audit_ ⚠verifier_ new - Creates a verifier that checks a chain signed by one public key.
- pamoja_
audit_ ⚠verify_ chain - Checks a whole chain that has already arrived.