30#ifndef PROTOCORE_SSH_RSA_H
31#define PROTOCORE_SSH_RSA_H
35#if PROTOCORE_ENABLE_SSH_RSA
46#define SSH_RSA_KEY_DER_MAX 1700
56#define SSH_RSA_PUBKEY_ALG "ssh-rsa"
59#define SSH_RSA_PUBKEY_ALG_LEN 7
62#define SSH_RSA_SIG_ALG_SHA256 "rsa-sha2-256"
65#define SSH_RSA_SIG_ALG_SHA512 "rsa-sha2-512"
68#define SSH_RSA_PUBKEY_BLOB_MAX (4 + 7 + 4 + 1 + 4 + 4 + 1 + 256)
86 protocore_rsa_hash hash;
96} SshRsaEncodePubkeyArgs;
120 SshRsaSignArgs sign_args;
121 SshRsaEncodePubkeyArgs encode_pubkey_args;
127extern SshRsaVars SshRsaV;
132 void (*
const load_pubkey)(uint8_t *work);
133 void (*
const sign)(uint8_t *work);
134 void (*
const encode_pubkey)(uint8_t *work);
139void protocore_ssh_rsa_load_pubkey(uint8_t *work);
140void protocore_ssh_rsa_sign(uint8_t *work);
141void protocore_ssh_rsa_encode_pubkey(uint8_t *work);
147static const SshRsaNs SshRsa __attribute__((unused)) = {
148 .load_pubkey = protocore_ssh_rsa_load_pubkey,
149 .sign = protocore_ssh_rsa_sign,
150 .encode_pubkey = protocore_ssh_rsa_encode_pubkey,
160extern SshRsaPubKey ssh_host_pubkey;
171uint8_t *protocore_ssh_rsa_span(
void);
#define PROTOCORE_RSA_KEY_BYTES
RSA-2048 PKCS#1 v1.5 signature primitive (RFC 8017) - verify + software sign.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS