37#ifndef SHARKSSL_PSA_CONSUMER_RSA_H
38#define SHARKSSL_PSA_CONSUMER_RSA_H
42#if (!SHARKSSL_PSA_CONSUMER)
43#error SharkSslPSAConsumerRSA.h requires SHARKSSL_PSA_CONSUMER
73 U8 *privateDer, U16 privateDerSize,
76 U8 *publicDer, U16 publicDerSize,
79 const U8 *label, U8 *ciphertext,
80 U16 plaintextLen, U16 labelLen,
81 U16 ciphertextSize, U16 *ciphertextLen);
83 const U8 *label, U8 *plaintext,
84 U16 ciphertextLen, U16 labelLen,
85 U16 plaintextSize, U16 *plaintextLen);
87 U8 *signature, U16 *signatureLen,
88 U16 hashLen, U16 signatureSize);
90 const U8 *signature, U16 hashLen,
92#if (SHARKSSL_ENABLE_CSR_CREATION && SHARKSSL_ENABLE_RSA)
TLS objects, certificate/session operations, and public-key interfaces.
SHARKSSL_API int SharkSslPSARSAKey_verifyHash(const SharkSslPSARSAKey *o, const U8 *hash, const U8 *signature, U16 hashLen, U16 signatureLen)
SHARKSSL_API int SharkSslPSARSAKey_exportPrivate(const SharkSslPSARSAKey *o, U8 *privateDer, U16 privateDerSize, U16 *privateDerLen)
SHARKSSL_API int SharkSslPSARSAKey_exportPublic(const SharkSslPSARSAKey *o, U8 *publicDer, U16 publicDerSize, U16 *publicDerLen)
struct SharkSslPSARSAKey SharkSslPSARSAKey
An RSA key owned by the external PSA provider.
SHARKSSL_API int SharkSslPSARSAKey_decrypt(const SharkSslPSARSAKey *o, const U8 *ciphertext, const U8 *label, U8 *plaintext, U16 ciphertextLen, U16 labelLen, U16 plaintextSize, U16 *plaintextLen)
SHARKSSL_API int SharkSslPSARSAKey_destructor(SharkSslPSARSAKey *o)
SHARKSSL_API int SharkSslPSARSAKey_importPrivate(SharkSslPSARSAKey *o, const U8 *privateDer, psa_algorithm_t alg, int exportable, U16 privateDerLen)
SHARKSSL_API int SharkSslASN1Create_CSRWithPSARSAKey(struct SharkSslASN1Create *o, const SharkSslPSARSAKey *key, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType)
Create a PKCS#10 CSR with a non-exportable RSA private key The key policy must select PKCS#1 v1....
SHARKSSL_API int SharkSslPSARSAKey_importPublic(SharkSslPSARSAKey *o, const U8 *publicDer, psa_algorithm_t alg, U16 publicDerLen)
SHARKSSL_API int SharkSslPSARSAKey_signHash(const SharkSslPSARSAKey *o, const U8 *hash, U8 *signature, U16 *signatureLen, U16 hashLen, U16 signatureSize)
SHARKSSL_API int SharkSslPSARSAKey_encrypt(const SharkSslPSARSAKey *o, const U8 *plaintext, const U8 *label, U8 *ciphertext, U16 plaintextLen, U16 labelLen, U16 ciphertextSize, U16 *ciphertextLen)
SHARKSSL_API int SharkSslPSARSAKey_generate(SharkSslPSARSAKey *o, psa_algorithm_t alg, int exportable, U16 bits)
uint32_t psa_key_id_t
Definition: crypto.h:60
uint32_t psa_algorithm_t
Definition: crypto.h:58
Opaque object used when creating ASN.1 encoded data.
Definition: SharkSslASN1.h:249
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/nss_tech_notes/nss_tech_note3 http://to...
Definition: SharkSslASN1.h:260
Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions.
Definition: SharkSSL.h:739
An RSA key owned by the external PSA provider.
Definition: SharkSslPSAConsumerRSA.h:57
U8 exportable
Definition: SharkSslPSAConsumerRSA.h:62
U8 publicOnly
Definition: SharkSslPSAConsumerRSA.h:61
psa_algorithm_t alg
Definition: SharkSslPSAConsumerRSA.h:59
psa_key_id_t handle
Definition: SharkSslPSAConsumerRSA.h:58
U16 bits
Definition: SharkSslPSAConsumerRSA.h:60