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
commitf6216c4942c752ffe868edfb72aa06624b3729c7 (patch)
tree390418ea78c1bb8661c9e66a852271884d86bbb5 /src/lib/libcrypto/man/DH_generate_parameters.3
parentb22a3107d98c7a393e6474146840a843c66daac5 (diff)
downloadopenbsd-f6216c4942c752ffe868edfb72aa06624b3729c7.tar.gz
openbsd-f6216c4942c752ffe868edfb72aa06624b3729c7.tar.bz2
openbsd-f6216c4942c752ffe868edfb72aa06624b3729c7.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