aboutsummaryrefslogtreecommitdiff
path: root/numalgo.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-10-03 22:15:25 +0200
committertomsmeding <tom.smeding@gmail.com>2016-10-03 22:15:25 +0200
commitd24ab714b958b9fece4631076e240739ad0dd23f (patch)
tree7d4d35dc7a7b2a03863b9a5bbde9382e14b7d1aa /numalgo.h
parent2bf5effe95641667a1ed51c04eff7760f6a42ef4 (diff)
Progress
Diffstat (limited to 'numalgo.h')
-rw-r--r--numalgo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/numalgo.h b/numalgo.h
index 71e06f0..997a67c 100644
--- a/numalgo.h
+++ b/numalgo.h
@@ -8,4 +8,9 @@ Bigint egcd(const Bigint &a,const Bigint &b,Bigint &x,Bigint &y);
Bigint expmod(const Bigint &base,const Bigint &exponent,const Bigint &modulus);
+// Returns sqrt(n), rounded down if necessary
+Bigint isqrt(const Bigint &n);
+
int ilog2(uint64_t i);
+
+Bigint cryptrandom_big(const Bigint &upperbound); //Return value in [0,upperbound]