{"id":29928533,"url":"https://github.com/nxm-rs/keycard","last_synced_at":"2026-05-20T05:37:35.980Z","repository":{"id":288592746,"uuid":"957333958","full_name":"nxm-rs/keycard","owner":"nxm-rs","description":"Blazing-fast Keycard SDK and CLI in Rust","archived":false,"fork":false,"pushed_at":"2025-04-18T22:15:54.000Z","size":157,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T12:47:51.539Z","etag":null,"topics":["cryptography","ethereum","keycard","rust","smartcard"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nxm-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-30T05:11:55.000Z","updated_at":"2025-04-18T22:18:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"3efdbd55-f746-4d4e-acc2-91432d22624e","html_url":"https://github.com/nxm-rs/keycard","commit_stats":null,"previous_names":["nullisxyz/keycard","nxm-rs/keycard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nxm-rs/keycard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxm-rs%2Fkeycard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxm-rs%2Fkeycard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxm-rs%2Fkeycard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxm-rs%2Fkeycard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nxm-rs","download_url":"https://codeload.github.com/nxm-rs/keycard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxm-rs%2Fkeycard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268401591,"owners_count":24244461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","ethereum","keycard","rust","smartcard"],"created_at":"2025-08-02T14:03:41.026Z","updated_at":"2026-05-20T05:37:30.943Z","avatar_url":"https://github.com/nxm-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nexum-keycard: Rust Implementation for Keycards\n\n**NOTE: This repo is merged and moved into the [nexum](https://github.com/nxm-rs/nexum) repo**\n\n`nexum-keycard` is a comprehensive toolkit for interacting with Keycards - secure smart cards designed for blockchain applications and cryptocurrency key management. This implementation provides a complete solution for Keycard operations in Rust.\n\n[![docs.rs](https://img.shields.io/docsrs/nexum-keycard/latest)](https://docs.rs/nexum-keycard)\n[![Crates.io](https://img.shields.io/crates/v/nexum-keycard)](https://crates.io/crates/nexum-keycard)\n\nBuild secure blockchain applications with hardware-backed security and the power of Rust.\n\n## Installation\n\nThe easiest way to get started is to add the core crate:\n\n```sh\ncargo add nexum-keycard\n```\n\nFor blockchain signing capabilities:\n\n```sh\ncargo add nexum-keycard-signer\n```\n\nFor the command-line interface:\n\n```sh\ncargo install nexum-keycard-cli\n```\n\n## Quick Start\n\n```rust\nuse nexum_keycard::{Keycard, PcscDeviceManager, CardExecutor, Error};\n\nfn main() -\u003e Result\u003c(), Error\u003e {\n    // Create a PC/SC transport\n    let manager = PcscDeviceManager::new()?;\n    let readers = manager.list_readers()?;\n    let reader = readers.iter().find(|r| r.has_card()).expect(\"No card present\");\n    let transport = manager.open_reader(reader.name())?;\n\n    // Create a card executor\n    let mut executor = CardExecutor::new_with_defaults(transport);\n\n    // Create a Keycard instance and select the applet\n    let mut keycard = Keycard::new(\u0026mut executor);\n    let app_info = keycard.select_keycard()?;\n\n    println!(\"Selected Keycard with instance: {}\", app_info.instance_uid);\n    println!(\"Applet version: {}\", app_info.version);\n\n    // Initialize a new card (if needed)\n    if !app_info.initialized() {\n        let secrets = keycard.init(None, None, None)?;\n        println!(\"Card initialized with:\\nPIN: {}\\nPUK: {}\\nPairing password: {}\",\n                 secrets.pin(), secrets.puk(), secrets.pairing_password());\n    }\n\n    Ok(())\n}\n```\n\n## Overview\n\nThis repository contains the following crates:\n\n- [`nexum-keycard`]: Core functionality for interacting with Keycards\n- [`nexum-keycard-signer`]: Alloy signer implementation for blockchain operations\n- [`nexum-keycard-cli`]: Command-line interface for Keycard management\n\n[`nexum-keycard`]: https://github.com/nxm-rs/keycard/tree/main/crates/keycard\n[`nexum-keycard-signer`]: https://github.com/nxm-rs/keycard/tree/main/crates/signer\n[`nexum-keycard-cli`]: https://github.com/nxm-rs/keycard/tree/main/crates/cli\n\n## Features\n\n- 🔐 **Secure Channel Communication** - Encrypted and authenticated channel to the card\n- 🔑 **Key Management** - Generate, export, and manage keys on the Keycard\n- 📝 **Credential Management** - Set and update PINs, PUKs, and pairing passwords\n- 🔍 **Status Information** - Retrieve detailed info about the card status\n- 🔄 **BIP32/39 Support** - Key derivation path support and mnemonic generation\n- 📊 **Data Storage** - Store and retrieve custom data on the card\n- 📱 **Factory Reset** - Complete card reset when needed\n- 🌐 **Blockchain Integration** - Built-in support for Ethereum transaction signing\n\n## Documentation \u0026 Examples\n\nFor detailed documentation on each crate, please check their individual `README` files:\n\n- [`nexum-keycard` `README`](./crates/keycard/README.md) - Core Keycard functionality\n- [`nexum-keycard-signer` `README`](./crates/signer/README.md) - Blockchain signer implementation\n- [`nexum-keycard-cli` `README`](./crates/cli/README.md) - Command-line interface\n\n## Command-Line Interface\n\nnexum-keycard includes a comprehensive CLI for managing Keycards:\n\n```sh\n# List available readers\nnexum-keycard-cli list\n\n# Initialize a new card\nnexum-keycard-cli init\n\n# Generate a new key pair\nnexum-keycard-cli generate-key\n\n# Sign data\nnexum-keycard-cli sign 0123456789abcdef --path m/44'/60'/0'/0/0\n```\n\n## Architecture\n\n`nexum-keycard` is built on a layered architecture:\n\n1. **APDU Transport Layer** - Handles low-level communication with card readers (via `nexum-apdu-*` crates)\n2. **Secure Channel Layer** - Provides encryption and authentication for sensitive operations\n3. **Keycard Command Layer** - Implements the Keycard protocol and commands\n4. **Application Layer** - High-level APIs for key management and card operations\n\n## License\n\nLicensed under the [AGPL License](LICENSE) or http://www.gnu.org/licenses/agpl-3.0.html.\n\n## Contributions\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you shall be licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxm-rs%2Fkeycard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnxm-rs%2Fkeycard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxm-rs%2Fkeycard/lists"}