Rust library to interact with Security Keys, used by Firefox
Перейти к файлу
J.C. Jones 20becda783
Merge pull request #90 from baloo/baloo/ctap/adjust-comments
ctap: adjust comments about clientdata hashing
2019-10-09 13:33:16 -07:00
cose Retrofit older api and implement assertion 2019-04-22 23:27:45 +00:00
examples Retrofit older api and implement assertion 2019-04-22 23:27:45 +00:00
fuzz Issue #50 - Rename project to `authenticator-rs` with the package name `authenticator` 2019-03-27 10:50:54 -07:00
src ctap: adjust comments about clientdata hashing 2019-05-02 18:07:06 +00:00
tests/common integration test: basic idea how to mock devices 2019-04-04 21:20:45 +00:00
.clippy.toml Fix #35 - Run Clippy at TravisCI, and clean up Clippy warnings (#70) 2018-10-25 12:00:37 +02:00
.gitignore Fix #35 - Run Clippy at TravisCI, and clean up Clippy warnings (#70) 2018-10-25 12:00:37 +02:00
.travis.yml clippy updates for rust 1.31.0 2018-12-14 10:52:06 -07:00
Cargo.toml Update CTAP2 branch version to 0.3.0 and add baloo to authors 2019-05-03 11:02:34 -07:00
LICENSE Remove white space at the beginning of the license 2017-09-19 15:42:24 +02:00
README.md README update for CTAP2 branch 2019-05-03 10:55:26 -07:00
rustfmt.toml Run rustfmt, and configure Travis to enforce rustfmt. 2017-07-27 10:00:53 -07:00

README.md

A Rust library for interacting with CTAP1/CTAP2 Security Keys

Build Status Maturity Level

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

** This is the CTAP2 branch, it is UNSTABLE. The main branch is stable. **

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

Usage

There's only a simple example function that tries to register and sign right now. It uses env_logger for logging, which you configure with the RUST_LOG environment variable:

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

Proper usage should be to call into this library from something else - e.g., Firefox. There are some C 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 nightly
cargo install --git https://github.com/rust-fuzz/cargo-fuzz/

cargo +nightly fuzz run u2f_read -- -max_len=512
cargo +nightly fuzz run u2f_read_write -- -max_len=512