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.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/bn/check_bn_tests.go b/crypto/bn/check_bn_tests.go
index 9a1b65e7..0d2042e1 100644
--- a/crypto/bn/check_bn_tests.go
+++ b/crypto/bn/check_bn_tests.go
@@ -247,6 +247,11 @@ func main() {
}
}
}
+ case "ModInv":
+ if checkKeys(test, "A", "M", "ModInv") {
+ r := new(big.Int).ModInverse(test.Values["A"], test.Values["M"])
+ checkResult(test, "A ^ -1 (mod M)", "ModInv", r)
+ }
default:
fmt.Fprintf(os.Stderr, "Line %d: unknown test type %q.\n", test.LineNumber, test.Type)
}