register
Registers a new device by generating a fresh RSA key pair protected by user PIN.
This method performs the following steps:
Prompts user for PIN through configured PIN collector
Generates new RSA key pair with specified key size
Creates self-signed certificate for the key pair
Stores the key pair in password-protected keystore
Persists encrypted keystore data to secure storage
The generated key pair is cached to avoid requesting PIN again during subsequent authentication calls in the same session.
Return
Result containing the generated KeyPair on success, or failure with exception
Parameters
context
Android context for any UI operations (not used in PIN auth)
attestation
Attestation type - only Attestation.None is supported
Throws
if PIN collection fails, key generation fails, or storage fails