Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rust library to interact with Security Keys, used by Firefox

License

NotificationsYou must be signed in to change notification settings

mozilla/authenticator-rs

Repository files navigation

Build StatusMaturity Level

This is a cross-platform library for interacting with Security Key-type devices via Rust.

  • Supported Platforms: Windows, Linux, FreeBSD, NetBSD, OpenBSD, and macOS.
  • Supported Transports: USB HID.
  • Supported Protocols:FIDO U2F over USB.CTAP2 support is forthcoming, with work being done in theunstablectap2 branch.

This library currently focuses on USB security keys, but is expected to be extended tosupport additional transports.

Usage

There's only a simple example function that tries to register and sign right now. It usesenv_logger for logging, which youconfigure with theRUST_LOG environment variable:

cargo build --example mainRUST_LOG=debug cargo run --example main

Proper usage should be to call into this library from something else - e.g., Firefox. There aresomeC headers exposed for the purpose.

Tests

There are some tests of the cross-platform runloop logic and the protocol decoder:

cargo test

Fuzzing

There are fuzzers for the USB protocol reader, basically fuzzing inputs from the HID layer.There are not (yet) fuzzers for the C API used by callers (such as Gecko).

To fuzz, you will need cargo-fuzz (the latest version from GitHub) as well as Rust Nightly.

rustup install nightlycargo install cargo-fuzzcargo +nightly fuzz run u2f_read -- -max_len=512cargo +nightly fuzz run u2f_read_write -- -max_len=512

About

Rust library to interact with Security Keys, used by Firefox

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors36

Languages


[8]ページ先頭

©2009-2025 Movatter.jp