Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Attestation on iOS #215

Closed
grausof opened this issue Feb 23, 2024 · 1 comment
Closed

Key Attestation on iOS #215

grausof opened this issue Feb 23, 2024 · 1 comment
Assignees
Labels
help wanted Need help to resolve this wallet-solution
Milestone

Comments

@grausof
Copy link
Collaborator

grausof commented Feb 23, 2024

The keys attested on iOS can be used to sign any payload (clientData) but the signature format is decided by Apple and it is not possible to choose the algorithm or how to compose the signature.

generateAssertion(_:clientDataHash:completionHandler:)

From their documentation the signature is given by the concatenation of a payload (clientData) and the authenticatorData which is a field generated during the attestation phase by the Apple SDK. This implies that a key certified on hardware cannot be used to sign a JWS as established by the relevant RFC.

Do you have any ideas on how to use this non-compliant signature field with JWS signature?

For example, given a payload of the type: "customPayload" the signature obtained from Apple is of the type:

{
   signature: <Buffer 30 45 02 20 ... >,
   authenticatorData: <Buffer 21 c9 9e 00 ... >
}

where the signature field is the signature of authenticatorData concatenated with the sha256 of the payload.

⚠️ Please note, this only applies to keys that require attestation from Apple . For the other keys however saved in secure hardware the problem does not arise

@grausof grausof added the help wanted Need help to resolve this label Feb 23, 2024
@peppelinux peppelinux added this to the 0.7.0 milestone Mar 6, 2024
@peppelinux
Copy link
Member

Resolved by #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need help to resolve this wallet-solution
Projects
Development

No branches or pull requests

2 participants