1
0
mirror of https://github.com/henrydcase/nobs.git synced 2024-11-22 23:28:57 +00:00

fixes sike tests

This commit is contained in:
Henry Case 2018-07-31 19:14:39 +01:00
parent 2a25a09b4a
commit 771516ce3f

View File

@ -173,7 +173,7 @@ func TestNegativeKEM(t *testing.T) {
ct, ss_e, err := Encapsulate(rand.Reader, pk) ct, ss_e, err := Encapsulate(rand.Reader, pk)
checkErr(t, err, "pre-requisite for a test failed") checkErr(t, err, "pre-requisite for a test failed")
ct[0] ^= ct[0] ct[0] = ct[0] - 1
ss_d, err := Decapsulate(sk, pk, ct) ss_d, err := Decapsulate(sk, pk, ct)
checkErr(t, err, "decapsulation returns error when invalid ciphertext provided") checkErr(t, err, "decapsulation returns error when invalid ciphertext provided")
@ -207,7 +207,7 @@ func TestNegativeKEMSameWrongResult(t *testing.T) {
checkErr(t, err, "pre-requisite for a test failed") checkErr(t, err, "pre-requisite for a test failed")
// make ciphertext wrong // make ciphertext wrong
ct[0] ^= ct[0] ct[0] = ct[0] - 1
decSs1, err := Decapsulate(sk, pk, ct) decSs1, err := Decapsulate(sk, pk, ct)
checkErr(t, err, "pre-requisite for a test failed") checkErr(t, err, "pre-requisite for a test failed")