Go to the source code of this file.
|
| SHARKSSL_API int | SharkSslPSAEdDSAKey_generate (SharkSslPSAEdDSAKey *o, U16 bits, int prehash) |
| |
| SHARKSSL_API int | SharkSslPSAEdDSAKey_importPrivate (SharkSslPSAEdDSAKey *o, const U8 *seed, U16 seedLen, U16 bits, int prehash) |
| |
| SHARKSSL_API int | SharkSslPSAEdDSAKey_importPublic (SharkSslPSAEdDSAKey *o, const U8 *publicKey, U16 publicKeyLen, U16 bits, int prehash) |
| |
| SHARKSSL_API int | SharkSslPSAEdDSAKey_exportPublic (const SharkSslPSAEdDSAKey *o, U8 *publicKey, U16 publicKeySize, U16 *publicKeyLen) |
| |
| SHARKSSL_API int | SharkSslPSAEdDSAKey_sign (const SharkSslPSAEdDSAKey *o, const U8 *message, U32 messageLen, U8 *signature, U16 signatureSize, U16 *signatureLen) |
| |
| SHARKSSL_API int | SharkSslPSAEdDSAKey_verify (const SharkSslPSAEdDSAKey *o, const U8 *message, U32 messageLen, const U8 *signature, U16 signatureLen) |
| |
| SHARKSSL_API int | SharkSslASN1Create_CSRWithPSAEdDSAKey (struct SharkSslASN1Create *o, const SharkSslPSAEdDSAKey *key, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType) |
| | Create a PKCS#10 CSR using a private PureEdDSA PSA handle The key must be Ed25519 or Ed448 and permit message signing. More...
|
| |
| SHARKSSL_API int | SharkSslPSAEdDSAKey_destructor (SharkSslPSAEdDSAKey *o) |
| |
See Choose a SharkSSL API for build scope and the owning API layer.
◆ SharkSslPSAEdDSAKey
A volatile PSA Ed25519 or Ed448 key.
PureEdDSA signs the message; HashEdDSA uses SHA-512 for Ed25519ph and SHAKE256-512 for Ed448ph. Signatures are the RFC 8032 raw R||S encoding.
◆ SharkSslASN1Create_CSRWithPSAEdDSAKey()
Create a PKCS#10 CSR using a private PureEdDSA PSA handle The key must be Ed25519 or Ed448 and permit message signing.
This creates a request, not an issued certificate.
Inputs and the private key remain owned by the caller. Requires a PureEdDSA Ed25519 or Ed448 key; prehash keys are rejected.
- Parameters
-
| o | SharkSslASN1Create *; required freshly initialized writer with an empty caller-owned buffer (ptr=end). Retrieve the resulting DER with SharkSslASN1Create_getDataLen. |
| key | const SharkSslPSAEdDSAKey *; required live private signing-key context, borrowed for the call; public-only keys are rejected. |
| certDN | SharkSslCertDN *; required subject distinguished name, borrowed for the call. |
| SAN | const char *; optional NUL-terminated SAN string using SharkSslASN1Create_CSR syntax; NULL omits this extension. |
| keyUsage | SharkSslBitExtReq *; optional requested key-usage extension, or NULL. |
| nsCertType | SharkSslBitExtReq *; optional Netscape certificate-type extension, or NULL. |
- Returns
- int: 0 on success; nonzero on invalid input, insufficient writer space, allocation/signing failure, or unsupported key/hash. Discard the writer output after failure.
◆ SharkSslPSAEdDSAKey_destructor()
◆ SharkSslPSAEdDSAKey_exportPublic()
| SHARKSSL_API int SharkSslPSAEdDSAKey_exportPublic |
( |
const SharkSslPSAEdDSAKey * |
o, |
|
|
U8 * |
publicKey, |
|
|
U16 |
publicKeySize, |
|
|
U16 * |
publicKeyLen |
|
) |
| |
◆ SharkSslPSAEdDSAKey_generate()
| SHARKSSL_API int SharkSslPSAEdDSAKey_generate |
( |
SharkSslPSAEdDSAKey * |
o, |
|
|
U16 |
bits, |
|
|
int |
prehash |
|
) |
| |
◆ SharkSslPSAEdDSAKey_importPrivate()
| SHARKSSL_API int SharkSslPSAEdDSAKey_importPrivate |
( |
SharkSslPSAEdDSAKey * |
o, |
|
|
const U8 * |
seed, |
|
|
U16 |
seedLen, |
|
|
U16 |
bits, |
|
|
int |
prehash |
|
) |
| |
◆ SharkSslPSAEdDSAKey_importPublic()
| SHARKSSL_API int SharkSslPSAEdDSAKey_importPublic |
( |
SharkSslPSAEdDSAKey * |
o, |
|
|
const U8 * |
publicKey, |
|
|
U16 |
publicKeyLen, |
|
|
U16 |
bits, |
|
|
int |
prehash |
|
) |
| |
◆ SharkSslPSAEdDSAKey_sign()
| SHARKSSL_API int SharkSslPSAEdDSAKey_sign |
( |
const SharkSslPSAEdDSAKey * |
o, |
|
|
const U8 * |
message, |
|
|
U32 |
messageLen, |
|
|
U8 * |
signature, |
|
|
U16 |
signatureSize, |
|
|
U16 * |
signatureLen |
|
) |
| |
◆ SharkSslPSAEdDSAKey_verify()
| SHARKSSL_API int SharkSslPSAEdDSAKey_verify |
( |
const SharkSslPSAEdDSAKey * |
o, |
|
|
const U8 * |
message, |
|
|
U32 |
messageLen, |
|
|
const U8 * |
signature, |
|
|
U16 |
signatureLen |
|
) |
| |