DeviceAttestationProvider

Interface for signing audit entries with device attestation.

Implementations should use hardware-backed keys when available to provide the strongest security guarantees.

The signature proves:

  1. The audit entry was created on a specific device

  2. The device has hardware-backed key protection

  3. The entry hasn't been modified since signing

Inheritors

Properties

Link copied to clipboard

Check if this provider uses hardware-backed keys.

Functions

Link copied to clipboard
abstract fun getAttestationBlob(): ByteArray?

Get the serialized attestation blob for storage.

Link copied to clipboard

Get the attestation certificate chain.

Link copied to clipboard
abstract fun signAuditEntry(payload: String): String?

Sign an audit entry payload.

Link copied to clipboard
open fun signingKeyId(): String?

Stable identifier of the current signing key, or null when the provider cannot name its key. The audit trail records it so a replaced key shows up as a chain event.

Link copied to clipboard

X.509 SubjectPublicKeyInfo of the current signing key, or null when unavailable. The audit trail stores it when the key changes so older signatures stay verifiable.

Link copied to clipboard
abstract fun verifySignature(payload: String, signature: String): Boolean

Verify a signature over an audit entry.

Link copied to clipboard
open fun verifyWithPublicKey(publicKey: ByteArray, payload: String, signature: String): Boolean

Verify signature over payload with an explicit publicKey (X.509 SubjectPublicKeyInfo) instead of the current key. Return false when the provider cannot.