KeyAgreement

fun interface KeyAgreement(source)

ECDH with the wallet's holder keys inside the key store, for deviceMac in person (ISO/IEC 18013-5 §9.1.3.5). A KeyStore that is also one is used for it when WalletConfiguration.proximityDeviceAuth is WalletConfiguration.ProximityDeviceAuth.MAC_PREFERRED.

Inheritors

Functions

Link copied to clipboard
abstract fun agree(id: String, peerPublicKey: ByteArray): ByteArray

Runs ECDH between key id and peerPublicKey, an uncompressed X9.63 P-256 point, and returns the 32-byte shared secret. Throws KeyAgreementUnsupportedException for a key that can't agree keys (made for signing only): the wallet then signs instead.