keys: add a test for X/Y > P decoding case
This commit is contained in:
parent
6c471ecd98
commit
fa0537758f
1 changed files with 6 additions and 0 deletions
|
@ -69,6 +69,12 @@ func TestDecodeFromStringBadCompressed(t *testing.T) {
|
|||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestDecodeFromStringBadXMoreThanP(t *testing.T) {
|
||||
str := "02ffffffff00000001000000000000000000000001ffffffffffffffffffffffff"
|
||||
_, err := NewPublicKeyFromString(str)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestDecodeFromStringNotOnCurve(t *testing.T) {
|
||||
str := "04ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
_, err := NewPublicKeyFromString(str)
|
||||
|
|
Loading…
Reference in a new issue