Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn/check_bn_tests.go')
-rw-r--r--crypto/bn/check_bn_tests.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bn/check_bn_tests.go b/crypto/bn/check_bn_tests.go
index 61deee27..9e710d8b 100644
--- a/crypto/bn/check_bn_tests.go
+++ b/crypto/bn/check_bn_tests.go
@@ -211,6 +211,12 @@ func main() {
checkResult(test, "A / B", "Quotient", q)
checkResult(test, "A % B", "Remainder", r)
}
+ case "ModMul":
+ if checkKeys(test, "A", "B", "M", "ModMul") {
+ r := new(big.Int).Mul(test.Values["A"], test.Values["B"])
+ r = r.Mod(r, test.Values["M"])
+ checkResult(test, "A * B (mod M)", "ModMul", r)
+ }
default:
fmt.Fprintf(os.Stderr, "Line %d: unknown test type %q.\n", test.LineNumber, test.Type)
}