Encrypt or decrypt 12, 15, 18, 21 or 24 BIP39 codewords array (so-called "seed phrase" or "recovery phrase") using exclusive OR (XOR)/Vernam cipher (a.k.a. One Time Pad). If not input by a user, an encryption key is automatically generated at random. Encryption with such a key preserves integrity of BIP-39 checksums of all keys (that's distinct while also compatible with SeedXOR implementation).
Usage: BIP39-XOR.sh [-s] [codewords...] [XOR] [codewords...]
BIP39-XOR.sh [--auto-input]
EXAMPLES:
$ bash BIP39-XOR.sh time until select then return void float true false case catch depart
Encrypt into and output two complementary encryption keys encoded in BIP39 codewords.
$ bash BIP39-XOR.sh time until select then return void float true false case catch depart XOR age age age age age age age age age age age used
Use input keys to decrypt and output a key. Or, equivalently, encrypt an input key with another one and output two complementary encryption keys in BIP39 format.
$ bash BIP39-XOR.sh --auto-input
Generate input BIP-39 twelve codewords randomly and output two complementary encryption keys encoded in BIP39 codewords.
There are a few alternative methods to download and run the program on Windows, e.g.:
- Download and run the file: BIP39-XOR_setup.exe,
(BIP39-XOR on Windows - instructional video), - open PowerShell application and copy-paste this line:
powershell Invoke-WebRequest -URI "https://github.com/GregTonoski/BIP39-XOR/releases/download/v.6.0.0/busybox.exe" -OutFile "$HOME\busybox.exe" ; Invoke-WebRequest -URI "https://raw.githubusercontent.com/GregTonoski/BIP39-XOR/main/BIP39-XOR.sh" -OutFile "$HOME\BIP39-XOR.sh" ; Start-Process -FilePath "$HOME\busybox.exe" -ArgumentList "bash","$HOME\BIP39-XOR.sh"
The next time BIP39-XOR.sh the shorter command (without downloading) will start the program: cd $HOME; .\busybox.exe bash BIP39-XOR.sh
.
- The BIP39-XOR.sh will start by double-clicking the icon of the downloaded file or by a command line if any of the Git for Windows, MSYS2 or Cygwin is pre-installed (with the default file association settings).
- (recommended) Windows Subsytem for Linux if pre-installed then copy-paste this into the command prompt:
wsl.exe bash -c "cd ~ && wget -q https://raw.githubusercontent.com/GregTonoski/BIP39-XOR/main/BIP39-XOR.sh && bash BIP39-XOR.sh"
Download and run from a terminal by either:
wget -q "https://raw.githubusercontent.com/GregTonoski/BIP39-XOR/main/BIP39-XOR.sh" && bash BIP39-XOR.sh
or
curl -fsSL "https://raw.githubusercontent.com/GregTonoski/BIP39-XOR/main/BIP39-XOR.sh" > BIP39-XOR.sh && bash ./BIP39-XOR.sh
Optionally make the file executable ( $ chmod +x BIP39-XOR.sh
) to run it in by the shorter ./BIP39-XOR.sh
command subsequently.
MacOS: https://youtu.be/TT_Do5q8Yg8
Ubuntu Linux: https://youtu.be/D68SajCozKc
Open the BIP39-XOR.sh file from a terminal app, e.g. Termux or SSH.
Open the BIP39-XOR.sh file from a terminal app, e.g. iSH Shell, a-Shell, LibTerm etc. or SSH or Binbag or research AltStore PAL, UTM SE: Retro PC emulator etc.
The program is compatible with Portable Operating System Interface (POSIX) shells so should run on various electronic devices. The launch methods should be similar to the ones described for other systems altough may differ in details and depend on a device.