Image for post
Image for post
Photo by Simon Rae on Unsplash

abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus

What happens when you can’t access your cryptowallet, and you have forgotten your password? Well, hopefully, you have stored the encryption key used by storing a 12-word phase:

Image for post
Image for post
abandon
ability
able
about
above
absent
absorb
abstract
absurd
abuse
access
accident
account
accuse
achieve
package mainimport (	"encoding/hex"
"fmt"
"github.com/tyler-smith/go-bip39"
"os"
)
func main() { ent:="00000000000000000000000000000000"
argCount := len(os.Args[1:])
if (argCount>0) { ent= (os.Args[1])}
entropy,_ := hex.DecodeString(ent)
mnemonic, _ := bip39.NewMnemonic(entropy)
fmt.Printf("Random %x\n\n12-word phrase %s\n\n",entropy,mnemonic)
}
Random: 00a84c51041d49acca66e6160c1fa99912-word phrase: absent draw begin amused stand stool civil system bid genius tuna cram
package mainimport (	"encoding/hex"
"fmt"
"github.com/tyler-smith/go-bip39"
"os"
)
func main() {

mnemonic := "all hour make first leader extend hole alien behind guard gospel lava path output census museum junior mass reopen famous sing advance salt reform"
argCount := len(os.Args[1:])
if (argCount>0) { mnemonic= (os.Args[1])}
res:=bip39.IsMnemonicValid(mnemonic) seed := bip39.NewSeed(mnemonic, "TREZOR")
fmt.Println("Phrase:",mnemonic)
fmt.Println("Valid mnemonic:",res)
fmt.Println("Seed:",hex.EncodeToString(seed))
}
Phrase: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus
Password: BILL

Valid mnemonic: true
Seed: d184a269b4ea26dec12ed35e432e7d687a3b2b767a74e6b01b4009f991eda6dfbcc5f98e31409db7560a5640698094dcc190a0532f1360972e4cf3a8b594f936
import passlib.hash;
string = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus"
salt="mnemonicBILL"
from passlib.utils.pbkdf2 import get_prf,pbkdf2s2 = pbkdf2(string, salt, 2048, keylen=64, prf='hmac-sha512')
print s2.encode('hex')
d184a269b4ea26dec12ed35e432e7d687a3b2b767a74e6b01b4009f991eda6dfbcc5f98e31409db7560a5640698094dcc190a0532f1360972e4cf3a8b594f936

Conclusions

Any there you go. The best security that you can have for cryptocurrency is to keep a paper wallet, and not put your digital wallet on-line.

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. EU Citizen. Auld Reekie native. Old World Breaker. New World Creator.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store