KeystoreAttestationProvider

class KeystoreAttestationProvider(context: Context, keyAlias: String = "kioskops_audit_signing") : DeviceAttestationProvider

DeviceAttestationProvider implementation using Android Keystore.

Creates an ECDSA P-256 signing key with key attestation. The key is hardware-backed when the device supports it.

Constructors

Link copied to clipboard
constructor(context: Context, keyAlias: String = "kioskops_audit_signing")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val isHardwareBacked: Boolean

Check if this provider uses hardware-backed keys.

Functions

Link copied to clipboard
open override fun getAttestationBlob(): ByteArray?

Get the serialized attestation blob for storage.

Link copied to clipboard

Get the attestation certificate chain.

Link copied to clipboard

Parse an attestation blob back into a certificate chain.

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

Sign an audit entry payload.

Link copied to clipboard
open override 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
open override fun signingPublicKey(): ByteArray?

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
open override fun verifySignature(payload: String, signature: String): Boolean

Verify a signature over an audit entry.

Link copied to clipboard
open override 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.