Added test for Lambda parameter computation

This commit is contained in:
Piotr Dyraga committed 2018-05-23 18:43:14 +02:00
1 parent 622644f19d
commit f550c00e74
1 file changed
+10
+10
View File
@@ -40,6 +40,16 @@ func TestComputeMu(t *testing.T) {
}
}
func TestComputeLambda(t *testing.T) {
a := big.NewInt(5)
b := big.NewInt(7)
expected := big.NewInt(12)
if !reflect.DeepEqual(expected, computeLamda(a, b)) {
t.Error("lambda is not correctly computed")
}
}
func TestEncryptDecryptSmall(t *testing.T) {
p := big.NewInt(13)
q := big.NewInt(11)