PassKey
How passkey works in Elytro wallet
Passkey create process
public static publicKeyToKeyhash(publicKey: ECCPoint | RSAPublicKey): string {
if (typeof publicKey === 'object' && Object.prototype.hasOwnProperty.call(publicKey, 'x') && Object.prototype.hasOwnProperty.call(publicKey, 'y')) {
// ES256
const es256Key = publicKey as ECCPoint;
return WebAuthN.p256PublicKeyToKeyhash(es256Key);
} else if (typeof publicKey === 'object' && Object.prototype.hasOwnProperty.call(publicKey, 'e') && Object.prototype.hasOwnProperty.call(publicKey, 'n')) {
// RS256
const rs256Key = publicKey as RSAPublicKey;
return WebAuthN.rs256PublicKeyToKeyhash(rs256Key);
} else {
throw new Error('invalid publicKey');
}
}Passkey verification process
How are Passkeys Managed Across Devices and Restored?
Last updated