x509_sign_verify.c
const EcCurveInfo * x509GetCurveInfo(const uint8_t *oid, size_t length)
Get the elliptic curve that matches the specified OID.
Definition: x509_common.c:910
error_t x509ImportRsaPublicKey(const X509SubjectPublicKeyInfo *publicKeyInfo, RsaPublicKey *publicKey)
Import an RSA public key.
Definition: x509_key_parse.c:563
error_t x509VerifyRsaPssSignature(const X509OctetString *tbsData, const HashAlgo *hashAlgo, size_t saltLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
RSA-PSS signature verification.
Definition: x509_sign_verify.c:270
void ecInitDomainParameters(EcDomainParameters *params)
Initialize EC domain parameters.
Definition: ec.c:51
error_t ecImport(const EcDomainParameters *params, EcPoint *r, const uint8_t *data, size_t length)
Convert an octet string to an EC point.
Definition: ec.c:365
error_t ed448VerifySignature(const uint8_t *publicKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, uint8_t flag, const uint8_t *signature)
EdDSA signature verification.
Definition: ed448.c:404
error_t x509VerifyEd25519Signature(const X509OctetString *tbsData, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
Ed25519 signature verification.
Definition: x509_sign_verify.c:573
void ecFreeDomainParameters(EcDomainParameters *params)
Release EC domain parameters.
Definition: ec.c:72
error_t x509VerifySignature(const X509OctetString *tbsData, const X509SignAlgoId *signAlgoId, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
Certificate signature verification.
Definition: x509_sign_verify.c:78
error_t ecLoadDomainParameters(EcDomainParameters *params, const EcCurveInfo *curveInfo)
Load EC domain parameters.
Definition: ec.c:90
error_t x509ImportDsaPublicKey(const X509SubjectPublicKeyInfo *publicKeyInfo, DsaPublicKey *publicKey)
Import a DSA public key.
Definition: x509_key_parse.c:633
error_t x509VerifyEcdsaSignature(const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
ECDSA signature verification.
Definition: x509_sign_verify.c:415
void ecdsaInitSignature(EcdsaSignature *signature)
Initialize an ECDSA signature.
Definition: ecdsa.c:69
__weak_func error_t ecdsaVerifySignature(const EcDomainParameters *params, const EcPublicKey *publicKey, const uint8_t *digest, size_t digestLen, const EcdsaSignature *signature)
ECDSA signature verification.
Definition: ecdsa.c:507
error_t x509VerifyEd448Signature(const X509OctetString *tbsData, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
Ed448 signature verification.
Definition: x509_sign_verify.c:619
General definitions for cryptographic algorithms.
error_t x509GetSignHashAlgo(const X509SignAlgoId *signAlgoId, X509SignatureAlgo *signAlgo, const HashAlgo **hashAlgo)
Get the signature and hash algorithms that match the specified identifier.
Definition: x509_common.c:377
error_t x509VerifyRsaSignature(const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
RSA signature verification.
Definition: x509_sign_verify.c:203
error_t(* X509SignVerifyCallback)(const X509OctetString *tbsData, const X509SignAlgoId *signAlgoId, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
Signature verification callback function.
Definition: x509_sign_verify.h:48
error_t dsaVerifySignature(const DsaPublicKey *key, const uint8_t *digest, size_t digestLen, const DsaSignature *signature)
DSA signature verification.
Definition: dsa.c:585
error_t rsassaPkcs1v15Verify(const RsaPublicKey *key, const HashAlgo *hash, const uint8_t *digest, const uint8_t *signature, size_t signatureLen)
RSASSA-PKCS1-v1_5 signature verification operation.
Definition: rsa.c:838
error_t x509RegisterSignVerifyCallback(X509SignVerifyCallback callback)
Register signature verification callback function.
Definition: x509_sign_verify.c:55
RSA/DSA/ECDSA/EdDSA signature verification.
error_t x509VerifySm2Signature(const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
SM2 signature verification.
Definition: x509_sign_verify.c:505
error_t rsassaPssVerify(const RsaPublicKey *key, const HashAlgo *hash, size_t saltLen, const uint8_t *digest, const uint8_t *signature, size_t signatureLen)
RSASSA-PSS signature verification operation.
Definition: rsa.c:1079
error_t dsaReadSignature(const uint8_t *data, size_t length, DsaSignature *signature)
Read an ASN.1 encoded DSA signature.
Definition: dsa.c:349
error_t ecdsaReadSignature(const uint8_t *data, size_t length, EcdsaSignature *signature)
Read an ASN.1 encoded ECDSA signature.
Definition: ecdsa.c:260
error_t ed25519VerifySignature(const uint8_t *publicKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, uint8_t flag, const uint8_t *signature)
EdDSA signature verification.
Definition: ed25519.c:429
error_t sm2VerifySignature(const EcDomainParameters *params, const EcPublicKey *publicKey, const HashAlgo *hashAlgo, const char_t *id, size_t idLen, const void *message, size_t messageLen, const EcdsaSignature *signature)
SM2 signature verification.
Definition: sm2.c:216
Parsing of ASN.1 encoded keys.
error_t x509VerifyDsaSignature(const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature)
DSA signature verification.
Definition: x509_sign_verify.c:337
Debugging facilities.