Package-level declarations

Types

Link copied to clipboard
@Immutable
data class AttestationApplicationId(val packages: Set<AttestationPackageInfo>, val signatures: Set<ByteString>)

Representation of the AttestationApplicationId sequence contained within AuthorizationList.

Link copied to clipboard
data class AttestationPackageInfo(val name: String, val version: BigInteger)

Representation of the AttestationPackageInfo sequence contained within AttestationApplicationId.

Link copied to clipboard
@Immutable
data class AuthorizationList(val purposes: Set<BigInteger>? = null, val algorithms: BigInteger? = null, val keySize: BigInteger? = null, val blockModes: Set<BigInteger>? = null, val digests: Set<BigInteger>? = null, val paddings: Set<BigInteger>? = null, val ecCurve: BigInteger? = null, val rsaPublicExponent: BigInteger? = null, val rsaOaepMgfDigests: Set<BigInteger>? = null, val activeDateTime: BigInteger? = null, val originationExpireDateTime: BigInteger? = null, val usageExpireDateTime: BigInteger? = null, val noAuthRequired: Boolean? = null, val userAuthType: BigInteger? = null, val authTimeout: BigInteger? = null, val trustedUserPresenceRequired: Boolean? = null, val unlockedDeviceRequired: Boolean? = null, val creationDateTime: BigInteger? = null, val origin: Origin? = null, val rollbackResistant: Boolean? = null, val rootOfTrust: RootOfTrust? = null, val osVersion: BigInteger? = null, val osPatchLevel: PatchLevel? = null, val attestationApplicationId: AttestationApplicationId? = null, val attestationIdBrand: String? = null, val attestationIdDevice: String? = null, val attestationIdProduct: String? = null, val attestationIdSerial: String? = null, val attestationIdImei: String? = null, val attestationIdMeid: String? = null, val attestationIdManufacturer: String? = null, val attestationIdModel: String? = null, val vendorPatchLevel: PatchLevel? = null, val bootPatchLevel: PatchLevel? = null, val attestationIdSecondImei: String? = null, val moduleHash: ByteString? = null)

Representation of the AuthorizationList sequence contained within KeyDescription.

Link copied to clipboard

An interface to handle checking validity of challenges.

Link copied to clipboard
data class DeviceIdentity(val brand: String? = null, val device: String? = null, val product: String? = null, val serialNumber: String? = null, val imeis: Set<String> = emptySet(), val meid: String? = null, val manufacturer: String? = null, val model: String? = null)
Link copied to clipboard
@ThreadSafe
fun interface InstantSource

Polyfill for java.time.InstantSource.

Link copied to clipboard
@Immutable
data class KeyDescription(val attestationVersion: BigInteger, val attestationSecurityLevel: SecurityLevel, val keyMintVersion: BigInteger, val keyMintSecurityLevel: SecurityLevel, val attestationChallenge: ByteString, val uniqueId: ByteString, val softwareEnforced: AuthorizationList, val hardwareEnforced: AuthorizationList)
Link copied to clipboard

KeyMint tag names and IDs.

Link copied to clipboard
interface LogHook

Interface for logging info level key attestation events and information.

Link copied to clipboard
enum Origin : Enum<Origin>

Representation of the Origin enum contained within KeyDescription.

Link copied to clipboard
@Immutable
data class PatchLevel(val yearMonth: YearMonth, val version: Int? = null)
Link copied to clipboard
@Immutable
data class ProvisioningInfoMap(val certificatesIssued: Int)
Link copied to clipboard
@Immutable
data class RootOfTrust(val verifiedBootKey: ByteString, val deviceLocked: Boolean, val verifiedBootState: VerifiedBootState, val verifiedBootHash: ByteString? = null)

Representation of the RootOfTrust sequence contained within AuthorizationList.

Link copied to clipboard

Representation of the SecurityLevel enum contained within KeyDescription.

Link copied to clipboard
sealed interface VerificationResult

The result of verifying an Android Key Attestation certificate chain.

Link copied to clipboard

Representation of the VerifiedBootState enum contained within RootOfTrust.

Link copied to clipboard
@ThreadSafe
open class Verifier(trustAnchorsSource: () -> Set<TrustAnchor>, revokedSerialsSource: () -> Set<String>, instantSource: InstantSource)

Verifier for Android Key Attestation certificate chain.

Functions

Link copied to clipboard
fun Int.asDataItem(): Number
fun String.asDataItem(): UnicodeString
Link copied to clipboard
fun DataItem.asInteger(): Int
Link copied to clipboard
fun DataItem.asString(): String
Link copied to clipboard
fun DataItem.asUnicodeString(): UnicodeString
Link copied to clipboard

fun String.asX509Certificate(): <Error class: unknown class>

Returns an X509Certificate from a String.

Link copied to clipboard
fun cborDecode(data: ByteArray): DataItem
Link copied to clipboard
fun cborEncode(dataItem: DataItem): ByteArray
Link copied to clipboard
fun X509Certificate.keyDescription(): <Error class: unknown class>

Returns the Android Key Attestation extension.

Link copied to clipboard
fun X509Certificate.provisioningInfo(): <Error class: unknown class>

Returns the Android Key Attestation extension for provisioning info.