Browse Source

CLEANUP: Linting and doc updates.

pull/38/head
Tyler Smith 5 months ago
parent
commit
ef01d1e9e1
No known key found for this signature in database GPG Key ID: CA38F1A9BE0EC890
6 changed files with 125 additions and 222 deletions
  1. +3
    -53
      .gitignore
  2. +1
    -1
      LICENSE
  3. +38
    -20
      bip39.go
  4. +75
    -147
      bip39_test.go
  5. +5
    -1
      go.mod
  6. +3
    -0
      go.sum

+ 3
- 53
.gitignore View File

@ -1,56 +1,6 @@
# Executable from build
go-bip39
# Dev utils
.ackrc
# Compiled Object files, Static and Dynamic libs (Shared Objects)
coverage.out
*.o
*.a
*.so
*.db
# Temp files
*~
*.kate-swp
*.orig
debug
*.txt
*.log
# Editors
.vscode/
.idea/
peers.json
*.csv
*.gz
# Folders
_obj
_test
bin
pkg
.vagrant
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.block
*.entry
.DS_Store
*.out
.idea/
----*
# Dev artifacts
coverage.out

+ 1
- 1
LICENSE View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2018 Tyler Smith and contributors
Copyright (c) 2014-2020 Tyler Smith and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

+ 38
- 20
bip39.go View File

@ -19,13 +19,14 @@ import (
)
var (
// Some bitwise operands for working with big.Ints
// Some bitwise operands for working with big.Ints.
last11BitsMask = big.NewInt(2047)
shift11BitsMask = big.NewInt(2048)
bigOne = big.NewInt(1)
bigTwo = big.NewInt(2)
// used to isolate the checksum bits from the entropy+checksum byte array
// wordLengthChecksumMasksMapping is used to isolate the checksum bits from
//the entropy+checksum byte array.
wordLengthChecksumMasksMapping = map[int]*big.Int{
12: big.NewInt(15),
15: big.NewInt(31),
@ -33,9 +34,9 @@ var (
21: big.NewInt(127),
24: big.NewInt(255),
}
// used to use only the desired x of 8 available checksum bits.
// 256 bit (word length 24) requires all 8 bits of the checksum,
// and thus no shifting is needed for it (we would get a divByZero crash if we did)
// wordLengthChecksumShiftMapping is used to lookup the number of operand
// for shifting bits to handle checksums.
wordLengthChecksumShiftMapping = map[int]*big.Int{
12: big.NewInt(16),
15: big.NewInt(8),
@ -43,10 +44,10 @@ var (
21: big.NewInt(2),
}
// wordList is the set of words to use
// wordList is the set of words to use.
wordList []string
// wordMap is a reverse lookup map for wordList
// wordMap is a reverse lookup map for wordList.
wordMap map[string]int
)
@ -76,6 +77,7 @@ func init() {
func SetWordList(list []string) {
wordList = list
wordMap = map[string]int{}
for i, v := range wordList {
wordMap[v] = i
}
@ -95,16 +97,16 @@ func GetWordIndex(word string) (int, bool) {
// NewEntropy will create random entropy bytes
// so long as the requested size bitSize is an appropriate size.
//
// bitSize has to be a multiple 32 and be within the inclusive range of {128, 256}
// bitSize has to be a multiple 32 and be within the inclusive range of {128, 256}.
func NewEntropy(bitSize int) ([]byte, error) {
err := validateEntropyBitSize(bitSize)
if err != nil {
if err := validateEntropyBitSize(bitSize); err != nil {
return nil, err
}
entropy := make([]byte, bitSize/8)
_, err = rand.Read(entropy)
return entropy, err
_, _ = rand.Read(entropy) // err is always nil
return entropy, nil
}
// EntropyFromMnemonic takes a mnemonic generated by this library,
@ -117,16 +119,20 @@ func EntropyFromMnemonic(mnemonic string) ([]byte, error) {
}
// Decode the words into a big.Int.
b := big.NewInt(0)
var (
wordBytes [2]byte
b = big.NewInt(0)
)
for _, v := range mnemonicSlice {
index, found := wordMap[v]
if found == false {
if !found {
return nil, fmt.Errorf("word `%v` not found in reverse map", v)
}
var wordBytes [2]byte
binary.BigEndian.PutUint16(wordBytes[:], uint16(index))
b = b.Mul(b, shift11BitsMask)
b = b.Or(b, big.NewInt(0).SetBytes(wordBytes[:]))
b.Mul(b, shift11BitsMask)
b.Or(b, big.NewInt(0).SetBytes(wordBytes[:]))
}
// Build and add the checksum to the big.Int.
@ -145,6 +151,7 @@ func EntropyFromMnemonic(mnemonic string) ([]byte, error) {
// Generate the checksum and compare with the one we got from the mneomnic.
entropyChecksumBytes := computeChecksum(entropy)
entropyChecksum := big.NewInt(int64(entropyChecksumBytes[0]))
if l := len(mnemonicSlice); l != 24 {
checksumShift := wordLengthChecksumShiftMapping[l]
entropyChecksum.Div(entropyChecksum, checksumShift)
@ -225,8 +232,10 @@ func MnemonicToByteArray(mnemonic string, raw ...bool) ([]byte, error) {
// Convert word indices to a big.Int representing the entropy.
checksummedEntropy := big.NewInt(0)
modulo := big.NewInt(2048)
for _, v := range mnemonicSlice {
index := big.NewInt(int64(wordMap[v]))
checksummedEntropy.Mul(checksummedEntropy, modulo)
checksummedEntropy.Add(checksummedEntropy, index)
}
@ -260,6 +269,7 @@ func NewSeedWithErrorChecking(mnemonic string, password string) ([]byte, error)
if err != nil {
return nil, err
}
return NewSeed(mnemonic, password), nil
}
@ -278,7 +288,7 @@ func IsMnemonicValid(mnemonic string) bool {
}
// Appends to data the first (len(data) / 32)bits of the result of sha256(data)
// Currently only supports data up to 32 bytes
// Currently only supports data up to 32 bytes.
func addChecksum(data []byte) []byte {
// Get first byte of sha256
hash := computeChecksum(data)
@ -291,12 +301,13 @@ func addChecksum(data []byte) []byte {
// and then set the (new) right most bit equal to checksum bit at that index
// staring from the left
dataBigInt := new(big.Int).SetBytes(data)
for i := uint(0); i < checksumBitLength; i++ {
// Bitshift 1 left
dataBigInt.Mul(dataBigInt, bigTwo)
// Set rightmost bit if leftmost checksum bit is set
if uint8(firstChecksumByte&(1<<(7-i))) > 0 {
if firstChecksumByte&(1<<(7-i)) > 0 {
dataBigInt.Or(dataBigInt, bigOne)
}
}
@ -306,7 +317,8 @@ func addChecksum(data []byte) []byte {
func computeChecksum(data []byte) []byte {
hasher := sha256.New()
hasher.Write(data)
_, _ = hasher.Write(data) // This error is guaranteed to be nil
return hasher.Sum(nil)
}
@ -316,6 +328,7 @@ func validateEntropyBitSize(bitSize int) error {
if (bitSize%32) != 0 || bitSize < 128 || bitSize > 256 {
return ErrEntropyLengthInvalid
}
return nil
}
@ -326,8 +339,10 @@ func padByteSlice(slice []byte, length int) []byte {
if offset <= 0 {
return slice
}
newSlice := make([]byte, length)
copy(newSlice[offset:], slice)
return newSlice
}
@ -337,11 +352,13 @@ func compareByteSlices(a, b []byte) bool {
if len(a) != len(b) {
return false
}
for i := range a {
if a[i] != b[i] {
return false
}
}
return true
}
@ -356,5 +373,6 @@ func splitMnemonicWords(mnemonic string) ([]string, bool) {
if numOfWords%3 != 0 || numOfWords < 12 || numOfWords > 24 {
return nil, false
}
return words, true
}

+ 75
- 147
bip39_test.go View File

@ -1,10 +1,12 @@
package bip39
import (
"bytes"
"crypto/rand"
"encoding/hex"
"testing"
"github.com/tyler-smith/assert"
"github.com/tyler-smith/go-bip39/wordlists"
)
@ -15,19 +17,19 @@ type vector struct {
}
func TestGetWordList(t *testing.T) {
assertEqualStringSlices(t, wordlists.English, GetWordList())
assertEqualStringsSlices(t, wordlists.English, GetWordList())
}
func TestGetWordIndex(t *testing.T) {
for expectedIdx, word := range wordList {
actualIdx, ok := GetWordIndex(word)
assertTrue(t, ok)
assert.True(t, ok)
assertEqual(t, actualIdx, expectedIdx)
}
for _, word := range []string{"a", "set", "of", "invalid", "words"} {
actualIdx, ok := GetWordIndex(word)
assertFalse(t, ok)
assert.False(t, ok)
assertEqual(t, actualIdx, 0)
}
}
@ -35,50 +37,50 @@ func TestGetWordIndex(t *testing.T) {
func TestNewMnemonic(t *testing.T) {
for _, vector := range testVectors() {
entropy, err := hex.DecodeString(vector.entropy)
assertNil(t, err)
assert.Nil(t, err)
mnemonic, err := NewMnemonic(entropy)
assertNil(t, err)
assertEqualString(t, vector.mnemonic, mnemonic)
assert.Nil(t, err)
assert.EqualString(t, vector.mnemonic, mnemonic)
_, err = NewSeedWithErrorChecking(mnemonic, "TREZOR")
assertNil(t, err)
assert.Nil(t, err)
seed := NewSeed(mnemonic, "TREZOR")
assertEqualString(t, vector.seed, hex.EncodeToString(seed))
assert.EqualString(t, vector.seed, hex.EncodeToString(seed))
}
}
func TestNewMnemonicInvalidEntropy(t *testing.T) {
_, err := NewMnemonic([]byte{})
assertNotNil(t, err)
assert.NotNil(t, err)
}
func TestNewSeedWithErrorCheckingInvalidMnemonics(t *testing.T) {
for _, vector := range badMnemonicSentences() {
_, err := NewSeedWithErrorChecking(vector.mnemonic, "TREZOR")
assertNotNil(t, err)
assert.NotNil(t, err)
}
}
func TestIsMnemonicValid(t *testing.T) {
for _, vector := range badMnemonicSentences() {
assertFalse(t, IsMnemonicValid(vector.mnemonic))
assert.False(t, IsMnemonicValid(vector.mnemonic))
}
for _, vector := range testVectors() {
assertTrue(t, IsMnemonicValid(vector.mnemonic))
assert.True(t, IsMnemonicValid(vector.mnemonic))
}
}
func TestMnemonicToByteArrayInvalidMnemonic(t *testing.T) {
for _, vector := range badMnemonicSentences() {
_, err := MnemonicToByteArray(vector.mnemonic)
assertNotNil(t, err)
assert.NotNil(t, err)
}
_, err := MnemonicToByteArray("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon yellow")
assertNotNil(t, err)
assert.NotNil(t, err)
assertEqual(t, err, ErrInvalidMnemonic)
}
@ -86,23 +88,25 @@ func TestNewEntropy(t *testing.T) {
// Good tests.
for i := 128; i <= 256; i += 32 {
_, err := NewEntropy(i)
assertNil(t, err)
assert.Nil(t, err)
}
// Bad Values
for i := 0; i <= 256; i++ {
if i%8 != 0 {
_, err := NewEntropy(i)
assertNotNil(t, err)
assert.NotNil(t, err)
}
}
}
func TestMnemonicToByteArrayForDifferentArrayLangths(t *testing.T) {
func TestMnemonicToByteArrayForDifferentArrayLengths(t *testing.T) {
max := 1000
for i := 0; i < max; i++ {
//16, 20, 24, 28, 32
length := 16 + (i%5)*4
seed := make([]byte, length)
if n, err := rand.Read(seed); err != nil {
t.Errorf("%v", err)
} else if n != length {
@ -128,94 +132,54 @@ func TestPadByteSlice(t *testing.T) {
}
func TestCompareByteSlices(t *testing.T) {
assertTrue(t, compareByteSlices([]byte{}, []byte{}))
assertTrue(t, compareByteSlices([]byte{1}, []byte{1}))
assertFalse(t, compareByteSlices([]byte{1}, []byte{0}))
assertFalse(t, compareByteSlices([]byte{1}, []byte{}))
assertFalse(t, compareByteSlices([]byte{1}, nil))
assert.True(t, compareByteSlices([]byte{}, []byte{}))
assert.True(t, compareByteSlices([]byte{1}, []byte{1}))
assert.False(t, compareByteSlices([]byte{1}, []byte{0}))
assert.False(t, compareByteSlices([]byte{1}, []byte{}))
assert.False(t, compareByteSlices([]byte{1}, nil))
}
func TestMnemonicToByteArrayForZeroLeadingSeeds(t *testing.T) {
ms := []string{
"00000000000000000000000000000000",
"00a84c51041d49acca66e6160c1fa999",
"00ca45df1673c76537a2020bfed1dafd",
"0019d5871c7b81fd83d474ef1c1e1dae",
"00dcb021afb35ffcdd1d032d2056fc86",
"0062be7bd09a27288b6cf0eb565ec739",
"00dc705b5efa0adf25b9734226ba60d4",
"0017747418d54c6003fa64fade83374b",
"000d44d3ee7c3dfa45e608c65384431b",
"008241c1ef976b0323061affe5bf24b9",
"00a6aec77e4d16bea80b50a34991aaba",
"0011527b8c6ddecb9d0c20beccdeb58d",
"001c938c503c8f5a2bba2248ff621546",
"0002f90aaf7a8327698f0031b6317c36",
"00bff43071ed7e07f77b14f615993bac",
"00da143e00ef17fc63b6fb22dcc2c326",
"00ffc6764fb32a354cab1a3ddefb015d",
"0062ef47e0985e8953f24760b7598cdd",
"003bf9765064f71d304908d906c065f5",
"00993851503471439d154b3613947474",
"007ad0ffe9eae753a483a76af06dfa67",
"00091824db9ec19e663bee51d64c83cc",
"00f48ac621f7e3cb39b2012ac3121543",
"0072917415cdca24dfa66c4a92c885b4",
"0027ced2b279ea8a91d29364487cdbf4",
"00b9c0d37fb10ba272e55842ad812583",
"004b3d0d2b9285946c687a5350479c8c",
"00c7c12a37d3a7f8c1532b17c89b724c",
"00f400c5545f06ae17ad00f3041e4e26",
"001e290be10df4d209f247ac5878662b",
"00bf0f74568e582a7dd1ee64f792ec8b",
"00d2e43ecde6b72b847db1539ed89e23",
"00cecba6678505bb7bfec8ed307251f6",
"000aeed1a9edcbb4bc88f610d3ce84eb",
"00d06206aadfc25c2b21805d283f15ae",
"00a31789a2ab2d54f8fadd5331010287",
"003493c5f520e8d5c0483e895a121dc9",
"004706112800b76001ece2e268bc830e",
"00ab31e28bb5305be56e38337dbfa486",
"006872fe85df6b0fa945248e6f9379d1",
"00717e5e375da6934e3cfdf57edaf3bd",
"007f1b46e7b9c4c76e77c434b9bccd6b",
"00dc93735aa35def3b9a2ff676560205",
"002cd5dcd881a49c7b87714c6a570a76",
"0013b5af9e13fac87e0c505686cfb6bf",
"007ab1ec9526b0bc04b64ae65fd42631",
"00abb4e11d8385c1cca905a6a65e9144",
"00574fc62a0501ad8afada2e246708c3",
"005207e0a815bb2da6b4c35ec1f2bf52",
"00f3460f136fb9700080099cbd62bc18",
"007a591f204c03ca7b93981237112526",
"00cfe0befd428f8e5f83a5bfc801472e",
"00987551ac7a879bf0c09b8bc474d9af",
"00cadd3ce3d78e49fbc933a85682df3f",
"00bfbf2e346c855ccc360d03281455a1",
"004cdf55d429d028f715544ce22d4f31",
"0075c84a7d15e0ac85e1e41025eed23b",
"00807dddd61f71725d336cab844d2cb5",
"00422f21b77fe20e367467ed98c18410",
"00b44d0ac622907119c626c850a462fd",
"00363f5e7f22fc49f3cd662a28956563",
"000fe5837e68397bbf58db9f221bdc4e",
"0056af33835c888ef0c22599686445d3",
"00790a8647fd3dfb38b7e2b6f578f2c6",
"00da8d9009675cb7beec930e263014fb",
"00d4b384540a5bb54aa760edaa4fb2fe",
"00be9b1479ed680fdd5d91a41eb926d0",
"009182347502af97077c40a6e74b4b5c",
"00f5c90ee1c67fa77fd821f8e9fab4f1",
"005568f9a2dd6b0c0cc2f5ba3d9cac38",
"008b481f8678577d9cf6aa3f6cd6056b",
"00c4323ece5e4fe3b6cd4c5c932931af",
"009791f7550c3798c5a214cb2d0ea773",
"008a7baab22481f0ad8167dd9f90d55c",
"00f0e601519aafdc8ff94975e64c946d",
"0083b61e0daa9219df59d697c270cd31",
}
for _, m := range ms {
for _, m := range []string{
"00000000000000000000000000000000", "00a84c51041d49acca66e6160c1fa999",
"00ca45df1673c76537a2020bfed1dafd", "0019d5871c7b81fd83d474ef1c1e1dae",
"00dcb021afb35ffcdd1d032d2056fc86", "0062be7bd09a27288b6cf0eb565ec739",
"00dc705b5efa0adf25b9734226ba60d4", "0017747418d54c6003fa64fade83374b",
"000d44d3ee7c3dfa45e608c65384431b", "008241c1ef976b0323061affe5bf24b9",
"0011527b8c6ddecb9d0c20beccdeb58d", "001c938c503c8f5a2bba2248ff621546",
"0002f90aaf7a8327698f0031b6317c36", "00bff43071ed7e07f77b14f615993bac",
"00da143e00ef17fc63b6fb22dcc2c326", "00ffc6764fb32a354cab1a3ddefb015d",
"0062ef47e0985e8953f24760b7598cdd", "003bf9765064f71d304908d906c065f5",
"00993851503471439d154b3613947474", "00a6aec77e4d16bea80b50a34991aaba",
"007ad0ffe9eae753a483a76af06dfa67", "00091824db9ec19e663bee51d64c83cc",
"00f48ac621f7e3cb39b2012ac3121543", "0072917415cdca24dfa66c4a92c885b4",
"0027ced2b279ea8a91d29364487cdbf4", "00b9c0d37fb10ba272e55842ad812583",
"004b3d0d2b9285946c687a5350479c8c", "00c7c12a37d3a7f8c1532b17c89b724c",
"00f400c5545f06ae17ad00f3041e4e26", "001e290be10df4d209f247ac5878662b",
"00bf0f74568e582a7dd1ee64f792ec8b", "00d2e43ecde6b72b847db1539ed89e23",
"00cecba6678505bb7bfec8ed307251f6", "000aeed1a9edcbb4bc88f610d3ce84eb",
"00d06206aadfc25c2b21805d283f15ae", "00a31789a2ab2d54f8fadd5331010287",
"003493c5f520e8d5c0483e895a121dc9", "004706112800b76001ece2e268bc830e",
"00ab31e28bb5305be56e38337dbfa486", "006872fe85df6b0fa945248e6f9379d1",
"00717e5e375da6934e3cfdf57edaf3bd", "007f1b46e7b9c4c76e77c434b9bccd6b",
"00dc93735aa35def3b9a2ff676560205", "002cd5dcd881a49c7b87714c6a570a76",
"0013b5af9e13fac87e0c505686cfb6bf", "007ab1ec9526b0bc04b64ae65fd42631",
"00abb4e11d8385c1cca905a6a65e9144", "00574fc62a0501ad8afada2e246708c3",
"005207e0a815bb2da6b4c35ec1f2bf52", "00f3460f136fb9700080099cbd62bc18",
"007a591f204c03ca7b93981237112526", "00cfe0befd428f8e5f83a5bfc801472e",
"00987551ac7a879bf0c09b8bc474d9af", "00cadd3ce3d78e49fbc933a85682df3f",
"00bfbf2e346c855ccc360d03281455a1", "004cdf55d429d028f715544ce22d4f31",
"0075c84a7d15e0ac85e1e41025eed23b", "00807dddd61f71725d336cab844d2cb5",
"00422f21b77fe20e367467ed98c18410", "00b44d0ac622907119c626c850a462fd",
"00363f5e7f22fc49f3cd662a28956563", "000fe5837e68397bbf58db9f221bdc4e",
"0056af33835c888ef0c22599686445d3", "00790a8647fd3dfb38b7e2b6f578f2c6",
"00da8d9009675cb7beec930e263014fb", "00d4b384540a5bb54aa760edaa4fb2fe",
"00be9b1479ed680fdd5d91a41eb926d0", "009182347502af97077c40a6e74b4b5c",
"00f5c90ee1c67fa77fd821f8e9fab4f1", "005568f9a2dd6b0c0cc2f5ba3d9cac38",
"008b481f8678577d9cf6aa3f6cd6056b", "00c4323ece5e4fe3b6cd4c5c932931af",
"009791f7550c3798c5a214cb2d0ea773", "008a7baab22481f0ad8167dd9f90d55c",
"00f0e601519aafdc8ff94975e64c946d", "0083b61e0daa9219df59d697c270cd31",
} {
seed, _ := hex.DecodeString(m)
mnemonic, err := NewMnemonic(seed)
@ -223,8 +187,7 @@ func TestMnemonicToByteArrayForZeroLeadingSeeds(t *testing.T) {
t.Errorf("%v", err)
}
_, err = MnemonicToByteArray(mnemonic)
if err != nil {
if _, err = MnemonicToByteArray(mnemonic); err != nil {
t.Errorf("Failed for %x - %v", seed, mnemonic)
}
}
@ -268,15 +231,15 @@ func TestEntropyFromMnemonicInvalidMnemonicSize(t *testing.T) {
func testEntropyFromMnemonic(t *testing.T, bitSize int) {
for i := 0; i < 512; i++ {
expectedEntropy, err := NewEntropy(bitSize)
assertNil(t, err)
assertTrue(t, len(expectedEntropy) != 0)
assert.Nil(t, err)
assert.True(t, len(expectedEntropy) != 0)
mnemonic, err := NewMnemonic(expectedEntropy)
assertNil(t, err)
assertTrue(t, len(mnemonic) != 0)
assert.Nil(t, err)
assert.True(t, len(mnemonic) != 0)
actualEntropy, err := EntropyFromMnemonic(mnemonic)
assertNil(t, err)
assert.Nil(t, err)
assertEqualByteSlices(t, expectedEntropy, actualEntropy)
}
}
@ -429,47 +392,18 @@ func badMnemonicSentences() []vector {
}
}
func assertNil(t *testing.T, object interface{}) {
if object != nil {
t.Errorf("Expected nil, got %v", object)
}
}
func assertNotNil(t *testing.T, object interface{}) {
if object == nil {
t.Error("Expected not nil")
}
}
func assertTrue(t *testing.T, a bool) {
if !a {
t.Error("Expected true, got false")
}
}
func assertFalse(t *testing.T, a bool) {
if a {
t.Error("Expected false, got true")
}
}
func assertEqual(t *testing.T, a, b interface{}) {
if a != b {
t.Errorf("Objects not equal, expected `%s` and got `%s`", a, b)
}
}
func assertEqualString(t *testing.T, a, b string) {
if a != b {
t.Errorf("Strings not equal, expected `%s` and got `%s`", a, b)
}
}
func assertEqualStringSlices(t *testing.T, a, b []string) {
func assertEqualStringsSlices(t *testing.T, a, b []string) {
if len(a) != len(b) {
t.Errorf("String slices not equal, expected %v and got %v", a, b)
return
}
for i := range a {
if a[i] != b[i] {
t.Errorf("String slices not equal, expected %v and got %v", a, b)
@ -479,14 +413,8 @@ func assertEqualStringSlices(t *testing.T, a, b []string) {
}
func assertEqualByteSlices(t *testing.T, a, b []byte) {
if len(a) != len(b) {
if !bytes.Equal(a, b) {
t.Errorf("Byte slices not equal, expected %v and got %v", a, b)
return
}
for i := range a {
if a[i] != b[i] {
t.Errorf("Byte slices not equal, expected %v and got %v", a, b)
return
}
}
}

+ 5
- 1
go.mod View File

@ -2,4 +2,8 @@ module github.com/tyler-smith/go-bip39
go 1.14
require golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
require (
github.com/tyler-smith/assert v1.0.1
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/text v0.3.0
)

+ 3
- 0
go.sum View File

@ -1,7 +1,10 @@
github.com/tyler-smith/assert v1.0.1 h1:AymyVNGyHOAVaDUEo0WouAMB/wwi5NdbJTDb7lsfFGk=
github.com/tyler-smith/assert v1.0.1/go.mod h1:oPc3QyIN2k0t/9Xp0sNhi3suiWuGXzIcdf/dbKQ6QGk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

Loading…
Cancel
Save