Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@RobinLinus
Last active October 2, 2022 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinLinus/fab3b9ede79da0d5418f882b73a49391 to your computer and use it in GitHub Desktop.
Save RobinLinus/fab3b9ede79da0d5418f882b73a49391 to your computer and use it in GitHub Desktop.

XOR Seed Splitting

A simple 2-of-3 seed splitting scheme for BIP39 seed phrases by Ruben Somsen.

Encrypt

  1. Split your 24 seed words into share_A and share_B of 12 words each.
  2. Pairwise XOR the words of the first share with the second share to derive the 12 words of share_C, the backup.
backup_1 = word_1 xor word_13
backup_2 = word_2 xor word_14
backup_3 = word_3 xor word_15
...
backup_12 = word_12 xor word_24

Decrypt

  1. If you have share_A and share_B just combine them.
  2. If you have the backup share_C and share_B then pairwise xor the words to derive the share_A.
word_1 = word_13 xor backup_1
word_2 = word_14 xor backup_2
word_3 = word_15 xor backup_3
...
word_12 = word_24 xor backup_12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment