mbedtls/library
Jethro Beekman d2df936e67 Fix parsing of PKCS#8 encoded Elliptic Curve keys.
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.
2018-03-22 18:01:18 -07:00
..
.gitignore
aes.c Add missing MBEDTLS_DEPRECATED_REMOVED guards 2018-02-21 19:16:20 +01:00
aesni.c
arc4.c
asn1parse.c
asn1write.c
base64.c
bignum.c Merge branch 'development-restricted' into iotssl-1306-rsa-is-vulnerable-to-bellcore-glitch-attack 2018-03-06 11:55:21 +00:00
blowfish.c
camellia.c
ccm.c
certs.c
cipher.c
cipher_wrap.c
cmac.c
CMakeLists.txt Update version to 2.8.0 2018-03-16 16:25:12 +00:00
ctr_drbg.c ctr_drbg: Typo fix in the file description comment. 2018-02-10 11:11:41 +02:00
debug.c
des.c
dhm.c Merge remote-tracking branch 'upstream-restricted/pr/410' into development-restricted 2018-01-26 18:43:04 +00:00
ecdh.c
ecdsa.c Merge remote-tracking branch 'upstream-public/pr/1027' into development 2018-01-09 10:42:03 +00:00
ecjpake.c Add support for alternative ECJPAKE implementation 2018-01-24 10:36:22 +00:00
ecp.c
ecp_curves.c
entropy.c Merge branch 'development' into development-restricted 2018-01-25 17:28:31 +00:00
entropy_poll.c
error.c Merge branch 'development' into development-restricted 2018-01-30 17:04:47 +00:00
gcm.c
havege.c
hmac_drbg.c
Makefile Update version to 2.7.0 2018-02-02 18:09:45 +00:00
md.c Merge branch 'development' into development-restricted 2018-01-25 17:28:31 +00:00
md2.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
md4.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
md5.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
md_wrap.c New MD API: rename functions from _ext to _ret 2018-01-22 11:54:42 +01:00
memory_buffer_alloc.c Merge branch 'pr_679' into development-proposed 2018-03-13 00:13:29 +01:00
net_sockets.c
oid.c pkcs5v2: add support for additional hmacSHA algorithms 2018-02-08 17:18:15 +08:00
padlock.c
pem.c Merge remote-tracking branch 'upstream-public/pr/778' into development-proposed 2018-03-12 23:45:08 +01:00
pk.c
pk_wrap.c
pkcs5.c pkcs5v2: add support for additional hmacSHA algorithms 2018-02-08 17:18:15 +08:00
pkcs11.c
pkcs12.c
pkparse.c Fix parsing of PKCS#8 encoded Elliptic Curve keys. 2018-03-22 18:01:18 -07:00
pkwrite.c
platform.c Merge remote-tracking branch 'upstream-public/pr/1079' into development-proposed 2018-03-11 00:45:10 +01:00
ripemd160.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
rsa.c Merge branch 'development-restricted' into iotssl-1306-rsa-is-vulnerable-to-bellcore-glitch-attack 2018-03-06 11:55:21 +00:00
rsa_internal.c Add explicit type cast to avoid truncation warning 2018-01-03 09:27:40 +00:00
sha1.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
sha256.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
sha512.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
ssl_cache.c
ssl_ciphersuites.c
ssl_cli.c Merge remote-tracking branch 'upstream-public/pr/1440' into development-proposed 2018-03-15 08:23:35 +00:00
ssl_cookie.c
ssl_srv.c Merge remote-tracking branch 'upstream-restricted/pr/410' into development-restricted 2018-01-26 18:43:04 +00:00
ssl_ticket.c
ssl_tls.c Merge remote-tracking branch 'upstream-public/pr/1296' into HEAD 2018-03-11 00:44:14 +01:00
threading.c
timing.c Fix alarm(0) failure on mingw32 2018-01-29 10:24:50 +01:00
version.c
version_features.c Merge branch 'prr_424' into development-proposed 2018-02-22 16:15:01 +01:00
x509.c
x509_create.c
x509_crl.c x509: CRL: reject unsupported critical extensions 2018-03-14 09:15:02 +01:00
x509_crt.c Merge remote-tracking branch 'upstream-restricted/pr/398' into development-restricted-proposed 2018-03-13 17:18:06 +01:00
x509_csr.c
x509write_crt.c New MD API: rename functions from _ext to _ret 2018-01-22 11:54:42 +01:00
x509write_csr.c
xtea.c