summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/DH_generate_parameters.3
diff options
context:
space:
mode:
authortb <>2022-07-13 06:28:22 +0000
committertb <>2022-07-13 06:28:22 +0000
commit8b358918b2a2c074ff9f2cbb06b17014e7108a2c (patch)
tree390418ea78c1bb8661c9e66a852271884d86bbb5 /src/lib/libcrypto/man/DH_generate_parameters.3
parent8b803997ba3a0e375884475ca58ace2454076604 (diff)
downloadopenbsd-8b358918b2a2c074ff9f2cbb06b17014e7108a2c.tar.gz
openbsd-8b358918b2a2c074ff9f2cbb06b17014e7108a2c.tar.bz2
openbsd-8b358918b2a2c074ff9f2cbb06b17014e7108a2c.zip
Integer square root and perfect square test
This adds an implementation of the integer square root using a variant of Newton's method with adaptive precision. The implementation is based on a pure Python description of cpython's math.isqrt(). This algorithm is proven to be correct with a tricky but very neat loop invariant: https://github.com/mdickinson/snippets/blob/master/proofs/isqrt/src/isqrt.lean Using this algorithm instead of Newton method, implement Algorithm 1.7.3 (square test) from H. Cohen, "A course in computational algebraic number theory" to detect perfect squares. ok jsing
Diffstat (limited to 'src/lib/libcrypto/man/DH_generate_parameters.3')
0 files changed, 0 insertions, 0 deletions