mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 13:28:16 +00:00
d2df936e67
The relevant ASN.1 definitions for a PKCS#8 encoded Elliptic Curve key are: PrivateKeyInfo ::= SEQUENCE { version Version, privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, privateKey PrivateKey, attributes [0] IMPLICIT Attributes OPTIONAL } AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } ECParameters ::= CHOICE { namedCurve OBJECT IDENTIFIER -- implicitCurve NULL -- specifiedCurve SpecifiedECDomain } ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] ECParameters {{ NamedCurve }} OPTIONAL, publicKey [1] BIT STRING OPTIONAL } Because of the two optional fields, there are 4 possible variants that need to be parsed: no optional fields, only parameters, only public key, and both optional fields. Previously mbedTLS was unable to parse keys with "only parameters". Also, only "only public key" was tested. There was a test for "no optional fields", but it was labelled incorrectly as SEC.1 and not run because of a great renaming mixup. |
||
---|---|---|
.. | ||
.gitignore | ||
aes.c | ||
aesni.c | ||
arc4.c | ||
asn1parse.c | ||
asn1write.c | ||
base64.c | ||
bignum.c | ||
blowfish.c | ||
camellia.c | ||
ccm.c | ||
certs.c | ||
cipher.c | ||
cipher_wrap.c | ||
cmac.c | ||
CMakeLists.txt | ||
ctr_drbg.c | ||
debug.c | ||
des.c | ||
dhm.c | ||
ecdh.c | ||
ecdsa.c | ||
ecjpake.c | ||
ecp.c | ||
ecp_curves.c | ||
entropy.c | ||
entropy_poll.c | ||
error.c | ||
gcm.c | ||
havege.c | ||
hmac_drbg.c | ||
Makefile | ||
md.c | ||
md2.c | ||
md4.c | ||
md5.c | ||
md_wrap.c | ||
memory_buffer_alloc.c | ||
net_sockets.c | ||
oid.c | ||
padlock.c | ||
pem.c | ||
pk.c | ||
pk_wrap.c | ||
pkcs5.c | ||
pkcs11.c | ||
pkcs12.c | ||
pkparse.c | ||
pkwrite.c | ||
platform.c | ||
ripemd160.c | ||
rsa.c | ||
rsa_internal.c | ||
sha1.c | ||
sha256.c | ||
sha512.c | ||
ssl_cache.c | ||
ssl_ciphersuites.c | ||
ssl_cli.c | ||
ssl_cookie.c | ||
ssl_srv.c | ||
ssl_ticket.c | ||
ssl_tls.c | ||
threading.c | ||
timing.c | ||
version.c | ||
version_features.c | ||
x509.c | ||
x509_create.c | ||
x509_crl.c | ||
x509_crt.c | ||
x509_csr.c | ||
x509write_crt.c | ||
x509write_csr.c | ||
xtea.c |