summaryrefslogtreecommitdiffstats
path: root/lib/rsa.go
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-11-20 16:07:03 -0500
committersiddharth ravikumar <s@ricketyspace.net>2022-11-20 16:07:03 -0500
commitc14e8eda830099f30e1a9aeb2fd4fdcef9cca94a (patch)
treeaa587a2cad5108612e70d1543f2fc94e88f1e727 /lib/rsa.go
parentdae4bb44dd901ffe8ac8db1fa7aa632cf8688928 (diff)
lib: `invmod` -> `InvMod`
Diffstat (limited to 'lib/rsa.go')
-rw-r--r--lib/rsa.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rsa.go b/lib/rsa.go
index ae264b8..24cd709 100644
--- a/lib/rsa.go
+++ b/lib/rsa.go
@@ -33,7 +33,7 @@ func biCopy(a, b *big.Int) *big.Int {
return a
}
-func invmod(a, n *big.Int) (*big.Int, error) {
+func InvMod(a, n *big.Int) (*big.Int, error) {
// Initialize.
t0 := big.NewInt(0)
t1 := big.NewInt(1)
@@ -97,7 +97,7 @@ func RSAGenKey() (*RSAPair, error) {
et := big.NewInt(0).Mul(p1, q1) // Totient `et`.
// Calculate private key `d`.
- d, err = invmod(e, et)
+ d, err = InvMod(e, et)
if err != nil {
continue // Inverse does not does. Try again.
}