Skip to main content

Module security

Module security 

Source
Expand description

The C ABI for device identity and signed telemetry.

These functions wrap [pamoja_security] for callers that reach the SDK through the flat C boundary. Signing and verifying are deterministic and need no runtime, so unlike the transport capabilities nothing here blocks on an executor.

Every value this capability exchanges has a fixed width - a 32-byte seed, a 32-byte public key, a 64-byte signature, a 16-character fingerprint - so the caller supplies the output array and no allocation crosses the boundary. Only the private identity is a handle, because it holds a secret that should not be copied around by value.

Structs§

PamojaDeviceIdentity
An opaque handle to a device’s private signing identity.

Constants§

PAMOJA_FINGERPRINT_LEN
The length in characters of a hex fingerprint.
PAMOJA_KEY_LEN
The length in bytes of an identity seed and of a public key.
PAMOJA_SIGNATURE_LEN
The length in bytes of a signature.

Functions§

pamoja_device_identity_free
Releases a device identity handle.
pamoja_device_identity_new
Creates a device identity from a provisioned 32-byte secret seed.
pamoja_device_identity_public_key
Writes the public key matching a device identity.
pamoja_device_identity_sign
Signs a payload with a device identity.
pamoja_device_identity_sign_message
Signs a payload and returns one buffer holding the signature and the payload.
pamoja_public_identity_fingerprint
Writes the short hex fingerprint of a public key.
pamoja_public_identity_verify
Verifies that a signature covers a payload and was made by a public key.
pamoja_public_identity_verify_message
Verifies a signed message and returns the payload it carries.