Awesome
<!-- # noir-library-starter This repository is a template used by the noir-lang org when creating internally maintained libraries. This provides out of the box: - A simple CI setup to test and format the library - A canary flagging up compilation failures on nightly releases. - A [release-please](https://github.com/googleapis/release-please) setup to ease creating releases for the library. Feel free to use this template as a starting point to create your own Noir libraries. --- --> <img align="right" width="150" height="150" top="100" src="https://github.com/user-attachments/assets/ca50c467-1bfd-485a-9351-073fb34a76da">Noir WebAuthn
Provides webauthn::verify_signature
function that verifies a WebAuthn signature(also called passkey signature).
Installation
In your Nargo.toml file, add the version of this library you would like to install under dependency:
[dependencies]
webauthn = { tag = "v0.36.0", git = "https://github.com/olehmisar/noir_webauthn" }
<details>
<summary>
Note on version compatibility with Noir
</summary>
The version of this library matches the version of Noir. The patch version may be different if a bugfix or a new feature is added for the same version of Noir. E.g., this library version v0.36.0 and this library version v0.36.1 are compatible with noir@v0.36.0.
</details>Usage
let result = webauthn::verify_signature(
// [u8; 32] - x coordinate of WebAuthn public key generated by `credentials.create`
public_key_x,
// [u8; 32] - y coordinate of WebAuthn public key generated by `credentials.create`
public_key_y,
// [u8; 64] - signature generated by `credentials.get`
signature,
// BoundedVec<u8, 256> - clientDataJSON generated `credentials.get`
client_data_json,
// BoundedVec<u8, 64> - authenticatorData generated `credentials.get`
authenticator_data,
// [u8; 32] - challenge generated `credentials.get`
challenge,
// u32 - index of challenge in clientDataJSON
challenge_index,
);
assert(result, "webauthn signature verification failed");
Benchmarks
TODO