ike_sign_generate.c
error_t ikeGenerateRsaPssSignature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, const HashAlgo *hashAlgo, size_t saltLen, uint8_t *signature, size_t *signatureLen)
RSA-PSS signature generation.
Definition: ike_sign_generate.c:402
error_t ed25519GenerateSignatureEx(const uint8_t *privateKey, const uint8_t *publicKey, const DataChunk *messageChunks, const void *context, uint8_t contextLen, uint8_t flag, uint8_t *signature)
EdDSA signature generation.
Definition: ed25519.c:271
error_t ikeGenerateSignature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, uint8_t *authMethod, uint8_t *signature, size_t *signatureLen)
Signature generation.
Definition: ike_sign_generate.c:57
void ecInitDomainParameters(EcDomainParameters *params)
Initialize EC domain parameters.
Definition: ec.c:51
error_t ikeGenerateEd448Signature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, uint8_t *signature, size_t *signatureLen)
Ed448 signature generation.
Definition: ike_sign_generate.c:691
void eddsaInitPrivateKey(EddsaPrivateKey *key)
Initialize an EdDSA private key.
Definition: eddsa.c:73
error_t ikeGenerateRsaSignature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, const HashAlgo *hashAlgo, uint8_t *signature, size_t *signatureLen)
RSA signature generation.
Definition: ike_sign_generate.c:342
error_t ikeDigestSignedOctets(IkeSaEntry *sa, const HashAlgo *hashAlgo, const uint8_t *id, size_t idLen, uint8_t *digest, bool_t initiator)
Digest signed octets.
Definition: ike_sign_misc.c:937
error_t pemImportDsaPrivateKey(const char_t *input, size_t length, const char_t *password, DsaPrivateKey *privateKey)
Decode a PEM file containing a DSA private key.
Definition: pem_import.c:676
error_t pemImportRsaPrivateKey(const char_t *input, size_t length, const char_t *password, RsaPrivateKey *privateKey)
Decode a PEM file containing an RSA private key.
Definition: pem_import.c:389
void ecFreeDomainParameters(EcDomainParameters *params)
Release EC domain parameters.
Definition: ec.c:72
RSA/DSA/ECDSA/EdDSA signature generation.
error_t ikeSelectSignAlgoId(IkeCertType certType, const HashAlgo *hashAlgo, X509SignAlgoId *signAlgoId)
Select the algorithm identifier that matches the specified certificate type and hash algorithms.
Definition: ike_sign_misc.c:300
error_t ikeGetSignedOctets(IkeSaEntry *sa, const uint8_t *id, size_t idLen, uint8_t *macId, DataChunk *messageChunks, bool_t initiator)
Retrieve the octets to be signed using EdDSA.
Definition: ike_sign_misc.c:863
error_t ikeGenerateEcdsaSignature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, const EcCurveInfo *curveInfo, const HashAlgo *hashAlgo, uint8_t *signature, size_t *signatureLen, IkeSignFormat format)
ECDSA signature generation.
Definition: ike_sign_generate.c:535
error_t ed448GenerateSignatureEx(const uint8_t *privateKey, const uint8_t *publicKey, const DataChunk *messageChunks, const void *context, uint8_t contextLen, uint8_t flag, uint8_t *signature)
EdDSA signature generation.
Definition: ed448.c:258
error_t ecLoadDomainParameters(EcDomainParameters *params, const EcCurveInfo *curveInfo)
Load EC domain parameters.
Definition: ec.c:90
error_t mpiExport(const Mpi *a, uint8_t *data, uint_t length, MpiFormat format)
Integer to octet string conversion.
Definition: mpi.c:709
PEM file import functions.
__weak_func error_t ecdsaGenerateSignature(const PrngAlgo *prngAlgo, void *prngContext, const EcDomainParameters *params, const EcPrivateKey *privateKey, const uint8_t *digest, size_t digestLen, EcdsaSignature *signature)
ECDSA signature generation.
Definition: ecdsa.c:397
error_t ikeGenerateDsaSignature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, const HashAlgo *hashAlgo, uint8_t *signature, size_t *signatureLen, IkeSignFormat format)
DSA signature generation.
Definition: ike_sign_generate.c:462
error_t rsassaPssSign(const PrngAlgo *prngAlgo, void *prngContext, const RsaPrivateKey *key, const HashAlgo *hash, size_t saltLen, const uint8_t *digest, uint8_t *signature, size_t *signatureLen)
RSASSA-PSS signature generation operation.
Definition: rsa.c:959
void ecdsaInitSignature(EcdsaSignature *signature)
Initialize an ECDSA signature.
Definition: ecdsa.c:69
error_t dsaGenerateSignature(const PrngAlgo *prngAlgo, void *prngContext, const DsaPrivateKey *key, const uint8_t *digest, size_t digestLen, DsaSignature *signature)
DSA signature generation.
Definition: dsa.c:484
error_t ikeGenerateDigitalSignature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, IkeAuthData *authData, size_t *authDataLen)
Digital signature generation.
Definition: ike_sign_generate.c:172
error_t x509FormatSignatureAlgo(const X509SignAlgoId *signatureAlgo, uint8_t *output, size_t *written)
Format SignatureAlgorithm structure.
Definition: x509_sign_format.c:53
error_t ikeFormatEcdsaSignature(EcDomainParameters *params, const EcdsaSignature *signature, uint8_t *data, size_t *length, IkeSignFormat format)
ECDSA signature formatting.
Definition: ike_sign_misc.c:113
error_t pemImportEddsaPrivateKey(const char_t *input, size_t length, const char_t *password, EddsaPrivateKey *privateKey)
Decode a PEM file containing a EdDSA private key.
Definition: pem_import.c:1450
IKEv2 (Internet Key Exchange Protocol)
error_t pemImportEcPrivateKey(const char_t *input, size_t length, const char_t *password, EcPrivateKey *privateKey)
Decode a PEM file containing an EC private key.
Definition: pem_import.c:1163
error_t ikeGenerateEd25519Signature(IkeSaEntry *sa, const uint8_t *id, size_t idLen, uint8_t *signature, size_t *signatureLen)
Ed25519 signature generation.
Definition: ike_sign_generate.c:617
error_t rsassaPkcs1v15Sign(const RsaPrivateKey *key, const HashAlgo *hash, const uint8_t *digest, uint8_t *signature, size_t *signatureLen)
RSASSA-PKCS1-v1_5 signature generation operation.
Definition: rsa.c:705
IKEv2 algorithm negotiation.
Debugging facilities.
const HashAlgo * ikeSelectSignHashAlgo(IkeSaEntry *sa, uint16_t preferredHashAlgoId)
Select the hash algorithm to be used for signing.
Definition: ike_sign_misc.c:765
error_t ikeFormatDsaSignature(const DsaSignature *signature, uint8_t *data, size_t *length, IkeSignFormat format)
DSA signature formatting.
Definition: ike_sign_misc.c:55