Added test for Lambda parameter computation
This commit is contained in:
1 file changed
+10
@@ -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) {
|
func TestEncryptDecryptSmall(t *testing.T) {
|
||||||
p := big.NewInt(13)
|
p := big.NewInt(13)
|
||||||
q := big.NewInt(11)
|
q := big.NewInt(11)
|
||||||
|
|||||||
Reference in new issue
Block a user