37#ifndef SHARKSSL_PSA_CONSUMER_ECDSA_H
38#define SHARKSSL_PSA_CONSUMER_ECDSA_H
43#if !SHARKSSL_PSA_CONSUMER
44#error SharkSslPSAConsumerECDSA.h requires SHARKSSL_PSA_CONSUMER
65 const U8 *privateKey, U16 privateKeyLen);
68 const U8 *publicKey, U16 publicKeyLen);
70 U8 *publicKey, U16 publicKeySize, U16 *publicKeyLen);
72 const U8 *hash, U16 hashLen,
73 U8 *signature, U16 signatureSize, U16 *signatureLen);
75 const U8 *hash, U16 hashLen,
76 const U8 *signature, U16 signatureLen);
78 U8 *der, U16 derSize, U16 *derLen);
80 U8 *raw, U16 rawSize, U16 *rawLen);
81#if SHARKSSL_ENABLE_CSR_CREATION
TLS objects, certificate/session operations, and public-key interfaces.
See Choose a SharkSSL API for build scope and the owning API layer.
SHARKSSL_API int SharkSslPSAEcdsaKey_destructor(SharkSslPSAEcdsaKey *o)
SHARKSSL_API int SharkSslASN1Create_CSRWithPSAECDSAKey(struct SharkSslASN1Create *o, const SharkSslPSAEcdsaKey *key, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType)
Create a PKCS#10 CSR using a private P-256, P-384, or P-521 PSA handle The handle must permit ECDSA s...
SHARKSSL_API int SharkSslPSAEcdsa_rawToDer(U16 curveID, const U8 *raw, U16 rawLen, U8 *der, U16 derSize, U16 *derLen)
SHARKSSL_API int SharkSslPSAEcdsaKey_generate(SharkSslPSAEcdsaKey *o, U16 curveID, psa_algorithm_t hashAlg, int deterministic)
SHARKSSL_API int SharkSslPSAEcdsaKey_verifyRaw(const SharkSslPSAEcdsaKey *o, const U8 *hash, U16 hashLen, const U8 *signature, U16 signatureLen)
SHARKSSL_API int SharkSslPSAEcdsaKey_importPublic(SharkSslPSAEcdsaKey *o, U16 curveID, psa_algorithm_t hashAlg, int deterministic, const U8 *publicKey, U16 publicKeyLen)
struct SharkSslPSAEcdsaKey SharkSslPSAEcdsaKey
A volatile PSA key owned by this context Initialize once, then destroy before reusing it Signatures a...
SHARKSSL_API int SharkSslPSAEcdsaKey_exportPublic(const SharkSslPSAEcdsaKey *o, U8 *publicKey, U16 publicKeySize, U16 *publicKeyLen)
SHARKSSL_API int SharkSslPSAEcdsa_derToRaw(U16 curveID, const U8 *der, U16 derLen, U8 *raw, U16 rawSize, U16 *rawLen)
SHARKSSL_API int SharkSslPSAEcdsaKey_signRaw(const SharkSslPSAEcdsaKey *o, const U8 *hash, U16 hashLen, U8 *signature, U16 signatureSize, U16 *signatureLen)
SHARKSSL_API int SharkSslASN1Create_CSRWithPSAECDSAKeyHash(struct SharkSslASN1Create *o, const SharkSslPSAEcdsaKey *key, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType, U8 hashID)
Select a concrete digest when the signing key permits ECDSA(ANY_HASH).
SHARKSSL_API int SharkSslPSAEcdsaKey_importPrivate(SharkSslPSAEcdsaKey *o, U16 curveID, psa_algorithm_t hashAlg, int deterministic, const U8 *privateKey, U16 privateKeyLen)
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
A volatile PSA key owned by this context Initialize once, then destroy before reusing it Signatures a...
Definition: SharkSslPSAConsumerECDSA.h:54
U8 publicOnly
Definition: SharkSslPSAConsumerECDSA.h:58
psa_key_id_t handle
Definition: SharkSslPSAConsumerECDSA.h:55
U16 curveID
Definition: SharkSslPSAConsumerECDSA.h:57
psa_algorithm_t algorithm
Definition: SharkSslPSAConsumerECDSA.h:56