Android Keystore Key Store
The wallet's keys, in Android Keystore: P-256 keys whose private halves never leave its secure hardware — StrongBox where the device has it (Options.strongBox), else the TEE. Each key's ID is its Keystore alias after Options.aliasPrefix. Keys are usable only while the device is unlocked, and holder keys, if Options.holderUserAuthentication, each time they sign only after authenticator has authenticated the holder: the store refuses to be made without one then.
Constructors
Types
How an AndroidKeystoreKeyStore makes keys: by default in StrongBox where the device has it, holder keys asking for the holder each time.
Where keys are made.
Properties
Functions
ECDH between holder key id and peerPublicKey inside Android Keystore. A key made without PURPOSE_AGREE_KEY (see Options.holderKeyAgreement), below API 31, or requiring the holder, throws KeyAgreementUnsupportedException: the wallet signs.
Creates a P-256 key for purpose and returns its ID.
Deletes every key this store holds except except, and returns how many it deleted. Wallet.sweepOrphanedKeys calls it with the keys the wallet's credentials are bound to.
Where key id lives, as a KeyProperties.SECURITY_LEVEL_ value: StrongBox, the TEE, or software. Android 11 can't tell StrongBox from the TEE: there, a key in secure hardware is the TEE's. (The constants are API 31's, but compile-time ints: they work on 30.)