diff --git a/.gitignore b/.gitignore index b0f8afa44..a2e0a1518 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ __pycache__/ /build proto.gv* .DS_Store +crypto/tests/libtrezor-crypto.so.dSYM/ diff --git a/core/tests/test_trezor.crypto.bech32.py b/core/tests/test_trezor.crypto.bech32.py index 531d34534..57283af70 100644 --- a/core/tests/test_trezor.crypto.bech32.py +++ b/core/tests/test_trezor.crypto.bech32.py @@ -32,21 +32,27 @@ def segwit_scriptpubkey(witver, witprog): VALID_CHECKSUM = [ "A12UEL5L", + "a12uel5l", "an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1tt5tgs", "abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw", "11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc8247j", "split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", + "?1ezyfcl", ] INVALID_CHECKSUM = [ " 1nwldj5", "\x7F" + "1axkwrx", + "\x80" + "1eym55h", "an84characterslonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1569pvx", "pzry9x0s0muk", "1pzry9x0s0muk", "x1b4n0q5v", "li1dgmt3", "de1lg7wt\xff", + "A1G7SGD8", + "10a06t8", + "1qzzfhee", ] VALID_ADDRESS = [ diff --git a/crypto/tests/test_check_segwit.h b/crypto/tests/test_check_segwit.h index d661f328a..ac71ee086 100644 --- a/crypto/tests/test_check_segwit.h +++ b/crypto/tests/test_check_segwit.h @@ -2,18 +2,22 @@ static const char* valid_checksum[] = { "A12UEL5L", + "a12uel5l", "an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedchar" "actersbio1tt5tgs", "abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw", "11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq" "qqqqqqqqqqc8247j", "split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", + "?1ezyfcl", }; static const char* invalid_checksum[] = { " 1nwldj5", "\x7f" "1axkwrx", + "\x80" + "1eym55h" "an84characterslonghumanreadablepartthatcontainsthenumber1andtheexcludedcha" "ractersbio1569pvx", "pzry9x0s0muk", @@ -21,6 +25,9 @@ static const char* invalid_checksum[] = { "x1b4n0q5v", "li1dgmt3", "de1lg7wt\xff", + "A1G7SGD8", + "10a06t8", + "1qzzfhee", }; struct valid_address_data {