21#ifndef PROTOCORE_RSA_H
22#define PROTOCORE_RSA_H
26#if PROTOCORE_ENABLE_RSA
34#define PROTOCORE_RSA_SIG_BYTES 256
42 PROTOCORE_RSA_HASH_SHA256 = 0,
43 PROTOCORE_RSA_HASH_SHA512 = 1,
44 PROTOCORE_RSA_HASH_PSS_SHA256 = 2
48#define PROTOCORE_PKCS1_DIGESTINFO_LEN 19
51#define PROTOCORE_PKCS1_SHA512_DIGESTINFO_LEN 19
54extern const uint8_t protocore_pkcs1_sha256_digestinfo[PROTOCORE_PKCS1_DIGESTINFO_LEN];
57extern const uint8_t protocore_pkcs1_sha512_digestinfo[PROTOCORE_PKCS1_SHA512_DIGESTINFO_LEN];
72 protocore_rsa_hash hash;
82 protocore_rsa_hash hash;
124 RsaVerifyArgs verify_args;
125 RsaSignArgs sign_args;
135 void (*
const verify)(uint8_t *work);
136 void (*
const sign)(uint8_t *work);
141void protocore_rsa_verify(uint8_t *work);
142void protocore_rsa_sign(uint8_t *work);
148static const RsaNs Rsa __attribute__((unused)) = {
149 .verify = protocore_rsa_verify,
150 .sign = protocore_rsa_sign,
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.