rust-cktap

Crates.iorust-cktap
lib.rsrust-cktap
version0.1.0
created_at2025-09-26 20:22:54.203624+00
updated_at2025-09-26 20:22:54.203624+00
descriptionA Rust implementation of the Coinkite Tap Protocol (cktap) for use with SATSCARD, TAPSIGNER, and SATSCHIP products.
homepage
repositoryhttps://github.com/notmandatory/rust-cktap
max_upload_size
id1856549
size136,530
Steve Myers (notmandatory)

documentation

README

rust-cktap

License CI Audit rustc

A Rust implementation of the Coinkite Tap Protocol (cktap) for use with SATSCARD, TAPSIGNER, and SATSCHIP products.

This project provides PC/SC APDU message encoding and decoding, cvc authentication, certificate chain verification, and card response verification.

It is up to the crate user to send and receive the raw cktap APDU messages via NFC to the card by implementing the CkTransport trait. An example implementation is provided using the optional rust pcsc crate. Mobile users are expected to implement CkTransport using the iOS or Android provided libraries.

Supported Features

Shared Commands

SATSCARD-Only Commands

TAPSIGNER-Only Commands

Automated and CLI Testing with Emulator

Prerequisites

  1. Install dependencies for cktap emulator

Run tests with emulator

just test

Run CLI with emulated card reader

just start # for SATSCARD emulator
just start -t # for TAPSIGNER emulator
just run_emu --help
just run_emu certs
just run_emu read
just stop # stop emulator

Manual Testing with real cards

Prerequisites

  1. Get USB PCSC NFC card reader, for example:
  2. Get Coinkite SATSCARD, TAPSIGNER, or SATSCHIP cards
  3. Install card reader PCSC driver
  4. Connect USB PCSC NFC reader to desktop system
  5. Place SATSCARD, TAPSIGNER, or SATSCHIP on reader

Run CLI with desktop USB PCSC NFC card reader

just run --help
just run certs
just run read

Minimum Supported Rust Version (MSRV)

This library should always compile with any valid combination of features on Rust 1.85.0.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 0

cargo fmt