summaryrefslogtreecommitdiff
path: root/sys/src/libsec
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-12-16 21:18:20 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-12-16 21:18:20 +0100
commitefd3ac8a2328d1baf55c296a00807052473d549e (patch)
tree3e0851312267fee156a3cfb67aea5b4faebbfb76 /sys/src/libsec
parentb6f04b77e3d11699d664d0ca7d0ba991f9599acc (diff)
libmp: add mpfield() function for fast field arithmetic
instead of testing for special field primes each time in mpmod(), make it explicit with a mpfiled() function that tests a modulus N to be of some special form that can be reduced more efficiently with some precalculation, and replaces N with a Mfield* when it can. the Mfield*'s are recognized by mpmod() as they have the MPfield flag set and provide a function pointer that executes the fast reduction.
Diffstat (limited to 'sys/src/libsec')
0 files changed, 0 insertions, 0 deletions