summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_vrf.c
diff options
context:
space:
mode:
authorjsing <>2023-02-02 18:39:26 +0000
committerjsing <>2023-02-02 18:39:26 +0000
commit6dde0660e73e2597e14e06a5b2d1c9b84bf66d89 (patch)
tree1674698c28777afc06c9e776cbb2058197484d33 /src/lib/libcrypto/dsa/dsa_vrf.c
parentb038ca2d2e8fa273b344804a2561d8aad704bdcc (diff)
downloadopenbsd-6dde0660e73e2597e14e06a5b2d1c9b84bf66d89.tar.gz
openbsd-6dde0660e73e2597e14e06a5b2d1c9b84bf66d89.tar.bz2
openbsd-6dde0660e73e2597e14e06a5b2d1c9b84bf66d89.zip
Refactor BN_uadd() and BN_usub().
Unlike bn_add_words()/bn_sub_words(), the s2n-bignum bignum_add() and bignum_sub() functions correctly handle inputs with differing word lengths. This means that they can be called directly, without needing to fix up any remaining words manually. Split BN_uadd() in two - the default bn_add() implementation calls bn_add_words(), before handling the carry for any remaining words. Likewise split BN_usub() in two - the default bn_sub() implementation calls bn_sub_words(), before handling the borrow for any remaining words. On amd64, provide an implementation of bn_add() that calls s2n-bignum's bignum_add() directly, similarly with an implementation of bn_sub() that calls s2n-bignum's bignum_sub() directly. ok tb@
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_vrf.c')
0 files changed, 0 insertions, 0 deletions