Hackathon project, not production ready (yet)

Overview

Ledger Nano PIV Application

This is a Ledger Hackathon project targeted on building a PIV compatible Ledger Nano X/S+ application.

The focus of this application is to be compatible with AGE Yubikey plugin.

During the Hackathon we made some choices:

  • The application is stateless. Retired slots value are derived from the seed.
  • No PIN or PUK as the Ledger Nano operating system already prompt a PIN.

Building

If you have never used Rust on your machine, you might start by installing rustup.

This application requires Rust Nightly and some C headers,

rustup default nightly
rustup component add rust-src

# On Ubuntu
sudo apt install clang gcc-arm-none-eabi gcc-multilib

# On Fedora
sudo dnf install clang arm-none-eabi-gcc arm-none-eabi-newlib

# On ArchLinux
sudo pacman -S clang arm-none-eabi-gcc arm-none-eabi-newlib

Then you should be able to build this application using cargo-ledger,

cargo install --git https://github.com/LedgerHQ/cargo-ledger
cd /path/to/ledger-nano-piv/
cargo ledger

Loading

cargo-ledger is able to generate a hex file and a manifest for ledgerctl. To directly load the application on the connected device, you may run:

cargo ledger load

Usage

Please look at USAGE.md for instructions on how to use Ledger Nano PIV with multiple applications on different operating systems.

Testing

One can for example use speculos.

In a first console:

cargo run

In a second one:

pytest test/ -v -s

References

You might also like...
Yet another gem miner

Rusty Pickaxe Multithreaded CPU miner for Provably Rare Gems, written in Rust. There is also closed-source GPU version, waiting to be released. Config

Bijou is a tiny yet fast encrypted file system.

Bijou ✨💎✨ Bijou (['bi:ʒu], French for "jewel") is a tiny yet fast encrypted filesystem, built upon RocksDB. Bijou provides a FUSE interface, as well

A Rust port of the password primitives used in Django Project.

Rust DjangoHashers A Rust port of the password primitives used in Django Project. Django's django.contrib.auth.models.User class has a few methods to

Temporary edit external crates that your project depends on

rhack You want to quickly put a sneaky macro kind of like dbg! into external crates to find out how some internal data structure works? If so rhack is

Source project for the Internet Computer software
Source project for the Internet Computer software

The Internet Computer is the world’s first blockchain that runs at web speed and can increase its capacity without bound. Like the Internet (which is composed of many machines adhering to TCP/IP protocol) and blockchain protocols (such as Bitcoin and Ethereum).

HyperCube is a free and open source blockchain project for everyone to use.

XPZ Public Chain HyperCube is a free and open source blockchain project for everyone to use. 日本語 简体中文 正體中文 HyperCube Wiki Wha is HyperCube HyperCube i

This is the Repo used to learn blockchain development in conjusction with the CyberGen NFT Project.

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

Terra Trophies is a copy of Ethereum's POAP project for Terra

Terra Trophies Terra Trophies is a copy of Ethereum's POAP project for Terra. It allows anyone to create digital badges for participants of events, or

Secret contract for Anons project.

Snip-721 Protocal by Baedrik template with several edits Minting Limits mint() caps tokens max at 580 mint() will keep count of how many anons each ad

Comments
  • USB-CCID is not recognized by pkcs11-tool

    USB-CCID is not recognized by pkcs11-tool

    This may be a bug in the SDK. We need to do more USB traffic analysis to understand what is going on. There are also some kernel warnings during USB enumeration.

    opened by aiooss-ledger 1
  • Application crash on Ledger Nano S+

    Application crash on Ledger Nano S+

    Application is working inside speculos, but when running on a real device it freezes to a black screen.

    Bisecting commits shows that this regression was introduced in https://github.com/aiooss-ledger/ledger-nano-piv/commit/91b21cc3e3d825ca7c6df0572f8805ff616667bf. I suspect a out of memory due to the lack of compiler optimization.

    opened by aiooss-ledger 1
Owner
Ledger
Trusted hardware for blockchain applications
Ledger
The Polkadot Hackathon Global Series North America edition is the second in a series of hackathons that brings the cutting edge of blockchain to a global community.

Polkadot Hackathon Project We are translating Uniswap v2 to Ink. Dependencies Install cargo-contract for building Ink contracts: cargo install dylint-

Kristiyan Dilov 3 Jun 28, 2022
Firmware, application and documentation for the hackathon

eclipsecon-2022-hackathon WORK IN PROGRESS This repository contains software, firmware and documentation for the EclipseCon 2022 hackathon. Bluetooth

Eclipse IoT Working Group 6 Oct 27, 2022
Implementation of Sunny's Mesh Security talk (Hackathon / Prototype status)

mesh-security (Hackathon / Prototype status) An implementation of Sunny's Mesh Security talk from Cosmoverse 2022. This should run on any CosmWasm ena

CosmWasm 83 Apr 17, 2023
WASM wrapper of mozjpeg, ready for the browser

mozjpeg-wasm This library wraps mozjpeg-sys and exposes a few functions to perform decoding, encoding and simple transformation on JPEG images using m

Tommaso 25 Nov 17, 2022
De-chained Ready-to-play ink! playground

DRink! Dechained Ready-to-play ink! playground drink.mp4 What is DRink? DRink! aims providing support for ink! developers. It comes in two parts: drin

Cardinal 9 Jun 23, 2023
A fresh FRAME-based Substrate node, ready for hacking

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Web 3 | Mobile | Blockchain Full Stack Engineer 6 Jun 23, 2023
reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no extra setup alongside exposing a API ready to query the data.

reth-indexer reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no e

Josh Stevens 306 Jul 12, 2023
Multilayered Linkable Spontaneous Anonymous Group - Implemented as is from paper. Not Monero specific

MLSAG This is a pure Rust implementation of the Multilayered Linkable Spontaneous Anonymous Group construction. This implementation has not been revie

Crate Crypto 19 Dec 4, 2022
BTM is an incremental data backup mechanism that does not require downtime.

BTM Blockchain Time Machine. BTM is an incremental data backup mechanism that does not require downtime.

漢 2 Mar 27, 2022
Simple (not simplest) UST vault that integrate with Anchor Protocol

Simple (not simplest) UST Vault Building a simple UST Vault that generate yield from Anchor while also have UST reserved for lending, and etc. This co

Kiettiphong Manovisut 2 May 3, 2022