Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olehmisar/noir_webauthn
https://github.com/olehmisar/noir_webauthn
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/olehmisar/noir_webauthn
- Owner: olehmisar
- License: apache-2.0
- Created: 2024-10-24T12:24:13.000Z (23 days ago)
- Default Branch: master
- Last Pushed: 2024-10-24T17:22:15.000Z (23 days ago)
- Last Synced: 2024-10-25T14:15:30.856Z (22 days ago)
- Language: Noir
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-noir - WebAuthn/Passkeys - WebAuthn/Passkeys signature verification. Verifies signatures produced by `credentials.get` (Get Coding / Libraries)
README
# 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:
```toml
[dependencies]
webauthn = { tag = "v0.36.0", git = "https://github.com/olehmisar/noir_webauthn" }
```Note on version compatibility with Noir
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 [email protected].
## Usage
```rs
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 - clientDataJSON generated `credentials.get`
client_data_json,
// BoundedVec - 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