Skip to main content

Module audit

Module audit 

Source
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§

PamojaAuditEntry
An opaque handle to one signed, chained record.
PamojaAuditLog
An opaque handle to a log that signs and chains what it is given.
PamojaAuditVerifier
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.