From 771516ce3f541afaed326dd6a15c0e6f9969885c Mon Sep 17 00:00:00 2001 From: "Henry D. Case" Date: Tue, 31 Jul 2018 19:14:39 +0100 Subject: [PATCH] fixes sike tests --- kem/sike/sike_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kem/sike/sike_test.go b/kem/sike/sike_test.go index da75970..ffd540d 100644 --- a/kem/sike/sike_test.go +++ b/kem/sike/sike_test.go @@ -173,7 +173,7 @@ func TestNegativeKEM(t *testing.T) { ct, ss_e, err := Encapsulate(rand.Reader, pk) 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) 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") // make ciphertext wrong - ct[0] ^= ct[0] + ct[0] = ct[0] - 1 decSs1, err := Decapsulate(sk, pk, ct) checkErr(t, err, "pre-requisite for a test failed")