DEV Community

Discussion on: Creating and Remembering a Strong Passphrase

Collapse
 
simbo1905 profile image
Simon Massey

You can backup your passphrase using Shamir's secret sharing scheme. You decide how many shares will be needed to recover the passphrase and how may shares exist in total. You then distribute the shares to safe places in case you ever need them. I know a cryptocurrency wallet that uses this algorithm for users to be able to always recover their bitcoins.

You might decide five shares in total and that at a minimum three must be combined to recover the passphrase. You can then distribute them. You might give one share to each of three trusted friends and write down two shares and lock one you office and one in your apartment. That way if you ever forget your phrase you can recover three shares and recover your passphrase. Meanwhile, it's very hard for anyone else to obtain three of the five shares to steal your passphrase. In the Bitcoin scenario, you can list the location of all the shares in your so that your digital wallet passphrase can be recovered by your heirs.

I ported a Java implementation of Shamir’s scheme to JavaScript and published it on npm. It is called simply “shamir”. The code is up on github.