ecdsa: enforce positive integers

This commit is contained in:
Daniel Cousens 2014-07-29 23:45:10 +10:00
parent 04bcbadc77
commit be3ce88a3a
2 changed files with 26 additions and 5 deletions
test/fixtures

View file

@ -104,6 +104,15 @@
"s": "3180566392414476763164587487324397066658063772201694230600609996154610926757"
}
},
{
"description": "Invalid r value (< 0)",
"d": "01",
"e": "01",
"signature": {
"r": "-01",
"s": "02"
}
},
{
"description": "Invalid r value (== 0)",
"d": "01",
@ -122,6 +131,15 @@
"s": "02"
}
},
{
"description": "Invalid s value (< 0)",
"d": "01",
"e": "01",
"signature": {
"r": "02",
"s": "-01"
}
},
{
"description": "Invalid s value (== 0)",
"d": "01",