A Rust implementation for Cardano key derivation and COSE Sign1 message signing using BIP39 mnemonics.
- ✅ BIP39 mnemonic phrase support
- ✅ BIP32 key derivation using
from_bip39_entropy - ✅ Cardano stake key derivation (m/1852'/1815'/0'/2/0)
- ✅ Cardano stake address (reward address) generation
- ✅ COSE Sign1 format message signing with custom headers
- ✅ Ed25519 signature verification
CRITICAL SECURITY PROCEDURE: To ensure maximum security when handling your mnemonic phrase, follow these steps exactly. Your mnemonic phrase should never be entered while connected to the internet.
- Build the project first to download all dependencies:
cargo build --release- Disconnect from the internet completely
- Update the mnemonic phrase in the
mnemonic_phrasevariable indaedalue/src/main.rs - Set your message to sign in the
messagevariable indaedalue/src/main.rs - Build again with your changes:
cargo build --release- Run the application:
# Run with cargo
cargo run
# Or run the release binary directly
./target/release/daedalue- Format the disk and reinstall the OS to completely remove any traces of the mnemonic phrase
The application will output:
- Public key (hex encoded)
- Cardano stake address (bech32 format)
- Message being signed
- COSE Sign1 formatted signature (hex encoded)
- Signature verification result
bip39(2.2) - BIP39 mnemonic phrase handlingcardano-serialization-lib(15.0) - Cardano cryptographic operations and BIP32 key derivationserde_cbor(0.11) - CBOR serialization for COSE formathex(0.4) - Hexadecimal encoding/decodinganyhow(1.0) - Error handling
This implementation uses Cardano's standard BIP32 key derivation with from_bip39_entropy to create the root key from the mnemonic seed. The key derivation follows the standard BIP32-Ed25519 specification used by Cardano.
The COSE Sign1 format follows the CBOR Object Signing and Encryption (COSE) standard for message authentication, with custom protected headers including the algorithm identifier (-8 for EdDSA) and the Cardano address.
Note: This implementation was successfully used to claim the glacier drop. Reference implementation available at: https://github.com/whs-dot-hk/message-signing/blob/test/examples/rust/src/main.rs