summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_gen.c
diff options
context:
space:
mode:
authorjsing <>2023-01-31 05:48:39 +0000
committerjsing <>2023-01-31 05:48:39 +0000
commitd984e83f80012236dbd144f0263f290c7ce95c8a (patch)
treeef7e412f740877e380f978d13e04e25f0af2bb54 /src/lib/libcrypto/dsa/dsa_gen.c
parent4fa795073d8bd6eef6356b0a3cee6eaa70c93988 (diff)
downloadopenbsd-d984e83f80012236dbd144f0263f290c7ce95c8a.tar.gz
openbsd-d984e83f80012236dbd144f0263f290c7ce95c8a.tar.bz2
openbsd-d984e83f80012236dbd144f0263f290c7ce95c8a.zip
Provide bn_umul_hilo().
The bignum code needs to be able to multiply two words, producing a double word result. Some architectures do not have native support for this, hence a pure C version is required. bn_umul_hilo() provides this functionality. There are currently two implementations, both of which are branch free. The first uses bitwise operations for the carry, while the second uses accumulators. The accumulator version uses fewer instructions, however requires more variables/registers and seems to be slower, at least on amd64/i386. The accumulator version may be faster on architectures that have more registers available. Further testing can be performed and one of the two implementations can be removed at a later date. ok tb@
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_gen.c')
0 files changed, 0 insertions, 0 deletions