74#ifndef DETERMINISTICESPASYNCWEBSERVER_SSH_BIGNUM_H
75#define DETERMINISTICESPASYNCWEBSERVER_SSH_BIGNUM_H
87#define SSH_BN_LIMBS 64
User-facing configuration for DeterministicESPAsyncWebServer.
#define SSH_CRYPTO_WORK_SIZE
Shared scratch buffer for SSH big-number operations.
void bn_expmod_group14(SshBigNum *out, const SshBigNum *base, const SshBigNum *exp)
Compute out = base^exp mod group14_p.
int bn_cmp(const SshBigNum *a, const SshBigNum *b)
Compare two SshBigNum values.
void bn_to_bytes(uint8_t bytes[256], const SshBigNum *in)
Write a SshBigNum as a 256-byte big-endian array.
const SshBigNum group14_g
Generator for group-14: g = 2.
uint8_t crypto_work[SSH_CRYPTO_WORK_SIZE]
Global scratch buffer for big-number temporaries.
#define SSH_BN_LIMBS
Number of 32-bit limbs in a 2048-bit integer.
int bn_dh_validate(const SshBigNum *v)
Validate a received DH public value.
const SshBigNum group14_p
The RFC 3526 MODP group-14 prime (2048-bit).
void bn_from_bytes(SshBigNum *out, const uint8_t *bytes, size_t len)
Read a big-endian byte array of len bytes into a SshBigNum.
int bn_is_zero(const SshBigNum *a)
Return non-zero if a is zero (all limbs zero).
A 2048-bit unsigned integer stored as 64 little-endian 32-bit limbs.
uint32_t d[SSH_BN_LIMBS]
256 bytes of magnitude, little-endian limbs.