std1.0.0-beta-7 SafeC docs

std :: crypto::bignum

Function std::bn_mod_exp_secret

#include <std/crypto/bignum.h> source ยท definition

int bn_mod_exp_secret(
    const &BnMont m,
    []const unsigned char base,
    []const unsigned char exp,
    []unsigned char out,
)

out = base^exp mod m in constant time for a secret exponent (fixed 4-bit windows over every exponent bit, table entries read by masked scans). exp_len bytes of exponent are processed regardless of value.