#webauthn #passkeys #fido2 #webauthn-relying-party

no-std kangoufu

A strictly compliant, no_std portable WebAuthn Relying Party implementation

1 unstable release

Uses new Rust 2024

0.1.0 Jul 12, 2026

#55 in #fido2

MIT/Apache

71KB
1.5K SLoC

kangoufu

no_std WebAuthn Relying Party implementation.

Usage

See cargo doc.

Example registration:

use kangoufu::{RelyingParty, DefaultEnv};

let mut env = DefaultEnv;
let rp = RelyingParty::new("Example", "example.com", "https://example.com");

let options = rp.generate_registration_options(
    &mut env,
    b"user_id",
    "user@example.com",
    "John Doe"
).unwrap();

Example verification:

use kangoufu::{RelyingParty, RegistrationVerificationOptions, UserVerificationRequirement};

let rp = RelyingParty::new("Example", "example.com", "https://example.com");
let options = RegistrationVerificationOptions {
    expected_challenge_b64url: "challenge".into(),
    user_verification: UserVerificationRequirement::Preferred,
    allow_cross_origin: false,
};

let verified = rp.verify_registration(client_data, att_obj, &options).unwrap();

// Save the credential details
let credential_id = &verified.credential_id;
let public_key = &verified.public_key;
let sign_count = verified.sign_count;

// Access useful metadata about the authenticator
println!("AAGUID: {}", verified.aaguid_string()); // Helper to get UUID format
println!("Attestation Format: {}", verified.attestation_fmt);
println!("Backed Up: {}", verified.is_backed_up);
println!("User Verified: {}", verified.is_user_verified);

Dependencies

~3.5–7MB
~140K SLoC