 |
CycloneTCP CycloneSSL CycloneCrypto
1.9.6
|
Go to the documentation of this file.
32 #define TRACE_LEVEL CRYPTO_TRACE_LEVEL
45 #if (PEM_SUPPORT == ENABLED)
109 oid = privateKeyInfo->
oid;
110 oidLen = privateKeyInfo->
oidLen;
112 #if (RSA_SUPPORT == ENABLED)
123 #if (DSA_SUPPORT == ENABLED)
133 #if (EC_SUPPORT == ENABLED)
143 #if (ED25519_SUPPORT == ENABLED)
154 #if (ED448_SUPPORT == ENABLED)
218 #if (RSA_SUPPORT == ENABLED)
235 #if (DSA_SUPPORT == ENABLED)
245 #if (EC_SUPPORT == ENABLED)
255 #if (ED25519_SUPPORT == ENABLED)
266 #if (ED448_SUPPORT == ENABLED)
335 rsaPrivateKey->
n = tag.
value;
355 rsaPrivateKey->
e = tag.
value;
375 rsaPrivateKey->
d = tag.
value;
395 rsaPrivateKey->
p = tag.
value;
415 rsaPrivateKey->
q = tag.
value;
500 if(dsaParams != NULL)
616 dsaPrivateKey->
x = tag.
value;
666 ecPrivateKey->
d = tag.
value;
727 eddsaPrivateKey->
d = tag.
value;
747 #if (RSA_SUPPORT == ENABLED)
752 oid = privateKeyInfo->
oid;
753 oidLen = privateKeyInfo->
oidLen;
883 #if (DSA_SUPPORT == ENABLED)
968 #if (EC_SUPPORT == ENABLED)
1019 #if (ED25519_SUPPORT == ENABLED)
1040 #if (ED448_SUPPORT == ENABLED)
error_t pkcs8ParsePrivateKeyInfo(const uint8_t *data, size_t length, Pkcs8PrivateKeyInfo *privateKeyInfo)
Parse PrivateKeyInfo structure.
Pkcs8RsaPrivateKey rsaPrivateKey
Ed25519 elliptic curve (constant-time implementation)
Arbitrary precision integer.
const uint8_t X25519_OID[3]
const uint8_t EC_PUBLIC_KEY_OID[7]
const uint8_t RSASSA_PSS_OID[9]
error_t asn1ReadTag(const uint8_t *data, size_t length, Asn1Tag *tag)
Read an ASN.1 tag from the input stream.
error_t x509ParseDsaParameters(const uint8_t *data, size_t length, X509DsaParameters *dsaParams)
Parse DSA domain parameters.
error_t mpiImport(Mpi *r, const uint8_t *data, uint_t length, MpiFormat format)
Octet string to integer conversion.
#define ED25519_PRIVATE_KEY_LEN
int_t oidComp(const uint8_t *oid1, size_t oidLen1, const uint8_t *oid2, size_t oidLen2)
Compare object identifiers.
error_t asn1ReadOid(const uint8_t *data, size_t length, Asn1Tag *tag)
Read an object identifier from the input stream.
Pkcs8EcPrivateKey ecPrivateKey
error_t asn1ReadOctetString(const uint8_t *data, size_t length, Asn1Tag *tag)
Read an octet string from the input stream.
error_t pkcs8ParsePrivateKeyAlgo(const uint8_t *data, size_t length, size_t *totalLength, Pkcs8PrivateKeyInfo *privateKeyInfo)
Parse PrivateKeyAlgorithm structure.
error_t pkcs8ParseEddsaPrivateKey(const uint8_t *data, size_t length, Pkcs8EddsaPrivateKey *eddsaPrivateKey)
Parse CurvePrivateKey structure.
#define ASN1_CLASS_UNIVERSAL
error_t asn1ReadInt32(const uint8_t *data, size_t length, Asn1Tag *tag, int32_t *value)
Read a 32-bit integer from the input stream.
X509DsaParameters dsaParams
General definitions for cryptographic algorithms.
Pkcs8EddsaPrivateKey eddsaPrivateKey
error_t pkcs8ParseRsaPrivateKey(const uint8_t *data, size_t length, Pkcs8RsaPrivateKey *rsaPrivateKey)
Parse RSAPrivateKey structure.
error_t pkcs8ImportEddsaPrivateKey(const Pkcs8PrivateKeyInfo *privateKeyInfo, EddsaPrivateKey *privateKey)
Import an EdDSA private key.
error_t asn1CheckOid(const Asn1Tag *tag, const uint8_t *oid, size_t length)
Check ASN.1 tag against a specified OID.
const uint8_t ED448_OID[3]
Mpi dq
second factor's CRT exponent
const uint8_t ED25519_OID[3]
const uint8_t RSA_ENCRYPTION_OID[9]
const uint8_t X448_OID[3]
#define ED448_PRIVATE_KEY_LEN
#define cryptoMemset(p, value, length)
#define ASN1_CLASS_CONTEXT_SPECIFIC
error_t pkcs8ImportEcPrivateKey(const Pkcs8PrivateKeyInfo *privateKeyInfo, Mpi *privateKey)
Import an EC private key.
error_t x509ParseEcParameters(const uint8_t *data, size_t length, X509EcParameters *ecParams)
Parse ECParameters structure.
error_t pkcs8ImportDsaPrivateKey(const Pkcs8PrivateKeyInfo *privateKeyInfo, DsaPrivateKey *privateKey)
Import an DSA private key.
error_t pkcs8ParseEcPrivateKey(const uint8_t *data, size_t length, X509EcParameters *ecParams, Pkcs8EcPrivateKey *ecPrivateKey)
Parse ECPrivateKey structure.
Mpi dp
First factor's CRT exponent.
Parsing of ASN.1 encoded keys.
Pkcs8DsaPrivateKey dsaPrivateKey
#define TRACE_DEBUG_MPI(p, a)
error_t asn1ReadSequence(const uint8_t *data, size_t length, Asn1Tag *tag)
Read an ASN.1 sequence from the input stream.
X509EcParameters ecParams
Ed448 elliptic curve (constant-time implementation)
error_t asn1CheckTag(const Asn1Tag *tag, bool_t constructed, uint_t objClass, uint_t objType)
Enforce the type of a specified tag.
error_t pkcs8ImportRsaPrivateKey(const Pkcs8PrivateKeyInfo *privateKeyInfo, RsaPrivateKey *privateKey)
Import an RSA private key.
error_t pkcs8ParseDsaPrivateKey(const uint8_t *data, size_t length, X509DsaParameters *dsaParams, Pkcs8DsaPrivateKey *dsaPrivateKey)
Parse DSAPrivateKey structure.
ASN.1 (Abstract Syntax Notation One)