AttestedKeyPair

public final class AttestedKeyPair
extends Object

java.lang.Object
   ↳ android.security.AttestedKeyPair


The AttestedKeyPair class contains a KeyPair instance of keys generated by Keystore and owned by KeyChain, as well as an attestation record for the key.

Such keys can be obtained by calling generateKeyPair(ComponentName, String, KeyGenParameterSpec, int).

Summary

Public methods

List<Certificate> getAttestationRecord()

Returns the attestation record for the key pair in this instance.

KeyPair getKeyPair()

Returns the generated key pair associated with the attestation record in this instance.

Inherited methods

Public methods

getAttestationRecord

List<Certificate> getAttestationRecord ()

Returns the attestation record for the key pair in this instance. The attestation record is a chain of certificates. The leaf certificate links to the public key of this key pair and other properties of the key or the device. If the key is in secure hardware, and if the secure hardware supports attestation, the leaf certificate will be signed by a chain of certificates rooted at a trustworthy CA key. Otherwise the chain will be rooted at an untrusted certificate. The attestation record could be for properties of the key, or include device identifiers. See setAttestationChallenge(byte[]) and Key Attestation for the format of the attestation record inside the certificate.

Returns
List<Certificate>

getKeyPair

KeyPair getKeyPair ()

Returns the generated key pair associated with the attestation record in this instance.

Returns
KeyPair