ASAuthorizationPlatformPublicKeyCredentialAssertion.signature algorithm

Hello everyone. Hope this one finds you well)

I have an issue with integrating a FIDO2 server with ASAuthorizationController.

I have managed to register a user with passkey successfully, however when authenticating, the request for authentication response fails. The server can't validate signature field.

I can see 2 possible causes for the issue: ASAuthorizationPlatformPublicKeyCredentialAssertion.rawAuthenticatorData contains invalid algorithm information (the server tries ES256, which ultimately fails with false response), or I have messed up Base64URL encoding for the signature property (which is unlikely, since all other fields also require Base64URL, and the server consumes them with no issues).

So the question is, what encryption algorithm does ASAuthorizationController use? Maybe someone has other ideas regarding where to look into?

Please help. Thanks)

Answered by iandreyeu in 870696022

I turns out that ASAuthorizationController accepts data in raw format, meaning Base64URL should first be decoded, then sent into the controller, and the output should be encoded back into Base64URL

Accepted Answer

I turns out that ASAuthorizationController accepts data in raw format, meaning Base64URL should first be decoded, then sent into the controller, and the output should be encoded back into Base64URL

ASAuthorizationPlatformPublicKeyCredentialAssertion.signature algorithm
 
 
Q