ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
portable_bignum.cpp File Reference

Software Montgomery modexp - the bignum backend for a vendor with no accelerator. More...

Go to the source code of this file.

Classes

struct  PC_CRYPTO_HOT::Group14Ctx
 

Namespaces

namespace  PC_CRYPTO_HOT
 

Functions

void bn_expmod_group14 (pc_bignum *out, const pc_bignum *base, const pc_bignum *exp)
 

Detailed Description

Software Montgomery modexp - the bignum backend for a vendor with no accelerator.

Selected EXPLICITLY by a vendor profile that sets PC_HAS_HW_BIGNUM 0. It is never a fallback: the core declares bn_expmod_group14() and links whatever backend the vendor provides, so linking none is an undefined reference and linking two is a duplicate definition. Both fail the build.

Software crypto is a legitimate choice and on some parts the only one - what must not happen is arriving here by default. This implementation is data-dependent and NOT constant time (SECURITY.md, timing), so a vendor whose silicon can do the modexp in hardware must never end up on it silently; with no weak symbol anywhere in the chain, it cannot.

Definition in file portable_bignum.cpp.

Function Documentation

◆ bn_expmod_group14()

void bn_expmod_group14 ( pc_bignum out,
const pc_bignum base,
const pc_bignum exp 
)