library and tool to XOR bip39 seeds https://github.com/moparisthebest/seedxor
Go to file
2021-08-23 23:09:41 +02:00
src Fix doc test and clippy warnings 2021-08-23 23:09:41 +02:00
.gitignore Implement first draft 2021-08-22 22:04:55 +02:00
Cargo.lock Implement first draft 2021-08-22 22:04:55 +02:00
Cargo.toml Implement XOR and test it 2021-08-23 19:11:10 +02:00
LICENSE Initial commit 2021-08-22 18:55:59 +02:00
README.md Implement XOR and test it 2021-08-23 19:11:10 +02:00

seed-xor

seed-xor builds on top of rust-bip39 and lets you XOR 24-word mnemonics as defined in Coldcard docs.

Future versions will also allow you to XOR different seed lengths.

Example

// Coldcard example: https://github.com/Coldcard/firmware/blob/master/docs/seed-xor.md
let a_str = "romance wink lottery autumn shop bring dawn tongue range crater truth ability miss spice fitness easy legal release recall obey exchange recycle dragon room";
let b_str = "lion misery divide hurry latin fluid camp advance illegal lab pyramid unaware eager fringe sick camera series noodle toy crowd jeans select depth lounge";
let c_str = "vault nominee cradle silk own frown throw leg cactus recall talent worry gadget surface shy planet purpose coffee drip few seven term squeeze educate";
let result_str = "silent toe meat possible chair blossom wait occur this worth option bag nurse find fish scene bench asthma bike wage world quit primary indoor";

let a = Mnemonic::from_str(a_str).unwrap();
let b = Mnemonic::from_str(b_str).unwrap();
let c = Mnemonic::from_str(c_str).unwrap();
let result = Mnemonic::from_str(result_str).unwrap();

assert_eq!(result, a ^ b ^ c);

Useful resources