Skip to content

Merge development into API spec branch #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1206 commits
Select commit Hold shift + click to select a range
e086652
Test the length of cipher_update output
gilles-peskine-arm Feb 19, 2019
3971c10
Merge pull request #53 from gilles-peskine-arm/storage_spec-initial
Patater Feb 20, 2019
e254f85
Fix ChangeLog entry to correct release version
Feb 20, 2019
97eaea9
Merge pull request #32 from itayzafrir/ipc-support-64-bit-key-ids
Patater Feb 20, 2019
fe96fbe
Initialize PSA Crypto operation contexts
Patater Feb 20, 2019
b281f74
psa: example: Initialize operation contexts
Patater Feb 20, 2019
3497323
Initialize PSA Crypto operation contexts
Patater Feb 20, 2019
5483461
Merge pull request #62 from gilles-peskine-arm/psa-stream_cipher_upda…
Patater Feb 20, 2019
c8569bc
Move key id validity check into its own function
gilles-peskine-arm Feb 19, 2019
e988a66
Fix PSA_MAX_PERSISTENT_KEY_IDENTIFIER to mean what it says
gilles-peskine-arm Feb 18, 2019
5b229a0
Support encoding an owner in key file IDs
gilles-peskine-arm Feb 19, 2019
69d7c8b
Declare a psa_key_file_id_t layout with an owner field
gilles-peskine-arm Feb 19, 2019
572f067
PSA crypto service: encode the key owner (ITS backend only)
gilles-peskine-arm Feb 19, 2019
72f40c6
Merge pull request #59 from gilles-peskine-arm/psa-its-64_bit_interna…
Patater Feb 20, 2019
93e2111
psa: Be compatible with deprecated constants
Patater Feb 20, 2019
11eca71
Update the encoding of owners in key file identifiers
gilles-peskine-arm Feb 20, 2019
252ef28
psa: Disallow use of invalid MAC contexts
Patater Feb 15, 2019
ab43997
psa: Disallow use of invalid cipher contexts
Patater Feb 15, 2019
a0f625a
psa: Disallow use of invalid hash contexts
Patater Feb 15, 2019
11aa7ee
psa: Extend hash bad order test
Patater Feb 19, 2019
36ee5d0
psa: Disallow repeated setup
Patater Feb 19, 2019
c8ed00a
Merge pull request #65 from Patater/deprecated-constants-compat
Patater Feb 20, 2019
1ac5e6a
Merge pull request #64 from gilles-peskine-arm/storage_spec-key_file_id
Patater Feb 20, 2019
e236c2a
psa: Don't abort when operations are invalid
Patater Feb 20, 2019
5e6d24c
psa: Add backwards compatible error codes
Patater Feb 21, 2019
c37fff9
Merge pull request #67 from Patater/deprecated-psa-errors
Patater Feb 21, 2019
13cf3ec
Fix typo in documentation
gilles-peskine-arm Nov 7, 2018
bf61ca7
Merge pull request #58 from Patater/disallow-invalid-context
Patater Feb 21, 2019
552563b
Add test case for ecdh_calc_secret
gilles-peskine-arm Nov 7, 2018
c4dff06
Add test case for ecdh_get_params with mismatching group
gilles-peskine-arm Nov 7, 2018
0b1b71d
Fix ecdh_get_params with mismatching group
gilles-peskine-arm Nov 7, 2018
ccf8ba0
Add changelog entry for mbedtls_ecdh_get_params robustness
gilles-peskine-arm Nov 7, 2018
1ce51e4
Forbid setting MBEDTLS_ECP_RESTARTABLE and MBEDTLS_USE_PSA_CRYPTO_C
Feb 22, 2019
241b524
Disable restartable ECC in full config PSA test in all.sh
Feb 22, 2019
0ae63f7
Merge remote-tracking branch 'origin/pr/2383' into development
Patater Feb 21, 2019
d9516b5
Merge remote-tracking branch 'origin/pr/2407' into development
Patater Feb 21, 2019
8963b03
Merge remote-tracking branch 'origin/pr/2411' into development
Patater Feb 21, 2019
9f47f82
Merge remote-tracking branch 'origin/pr/2391' into development
Patater Feb 21, 2019
461bd3d
Merge remote-tracking branch 'origin/pr/2454' into development
Patater Feb 21, 2019
415620c
Merge remote-tracking branch 'origin/pr/2105' into development
Patater Feb 22, 2019
caca307
crypto: Update submodule to Mbed Crypto 1.0.0d6
Patater Feb 22, 2019
43f564f
Define MBEDTLS_ECDH_LEGACY_CONTEXT in config.h
gilles-peskine-arm Feb 22, 2019
e023c80
Test undefining MBEDTLS_ECDH_LEGACY_CONTEXT in all.sh
gilles-peskine-arm Feb 22, 2019
3081629
Fix mbedtls_ecdh_get_params with new ECDH context
gilles-peskine-arm Feb 22, 2019
85fd913
Fix typo in check_config.h
Feb 22, 2019
d247762
Merge remote-tracking branch 'origin/pr/2460' into development
Patater Feb 22, 2019
e895342
Merge remote-tracking branch 'origin/pr/2427' into development
Patater Feb 22, 2019
86016a0
Merge remote-tracking branch 'origin/pr/2338' into development
Patater Feb 22, 2019
a778a94
Add little endian import to Bignum
yanesca Feb 13, 2019
59b813c
Add Montgomery points to ecp_point_read_binary
yanesca Feb 13, 2019
171a7ef
Add mbedtls_ecp_read_key
yanesca Feb 15, 2019
e344d0f
Add little endian export to Bignum
yanesca Feb 19, 2019
ab0f71a
ECDH: Add test vectors for Curve25519
yanesca Feb 20, 2019
7caf8e4
Add Montgomery points to ecp_point_write_binary
yanesca Feb 20, 2019
81cefed
psa: Explicitly include platform_util.h
Patater Feb 25, 2019
ffbd7e8
Improve mbedtls_ecp_point_read_binary tests
yanesca Feb 25, 2019
e23a693
Merge pull request #70 from Patater/include-platform-util
Patater Feb 26, 2019
f426e0f
Smoke-test operation contexts after setup+abort
gilles-peskine-arm Feb 25, 2019
9ab61b6
Fix cleanup in psa_cipher_setup
gilles-peskine-arm Feb 25, 2019
9e0a4a5
Test abort after failed setup
gilles-peskine-arm Feb 25, 2019
72f8348
Merge pull request #72 from gilles-peskine-arm/psa-fix_setup_cleanup
Patater Feb 26, 2019
60848e6
Don't reuse CRT from initial handshake during renegotiation
Feb 5, 2019
f852b1c
Break overly long line in definition of mbedtls_ssl_get_session()
Feb 5, 2019
1294a0b
Introduce helper function to clear peer CRT from session structure
Feb 5, 2019
a028c5b
Introduce CRT counter to CRT chain parsing function
Feb 5, 2019
4a55f63
Introduce helper to check for no-CRT notification from client
Feb 5, 2019
7a955a0
Clear peer's CRT chain outside before parsing new one
Feb 5, 2019
6bdfab2
Unify state machine update in mbedtls_ssl_parse_certificate()
Feb 5, 2019
2148993
Use helper macro to detect whether some ciphersuite uses CRTs
Feb 5, 2019
7177a88
Introduce helper function to determine whether suite uses server CRT
Feb 5, 2019
28f2fcd
Add helper function to check whether a CRT msg is expected
Feb 7, 2019
77adddc
Make use of macro and helper detecting whether CertRequest allowed
Feb 7, 2019
fcd9e71
Don't progress TLS state machine on peer CRT chain parsing error
Feb 5, 2019
6863619
Introduce helper function for peer CRT chain verification
Feb 5, 2019
c7bd780
Allow passing any X.509 CRT chain to ssl_parse_certificate_chain()
Feb 5, 2019
52055ae
Give ssl_session_copy() external linkage
Feb 6, 2019
aee8717
Simplify session cache implementation via mbedtls_ssl_session_copy()
Feb 6, 2019
0329f75
Increase robustness and documentation of ticket implementation
Feb 6, 2019
8273df8
Re-classify errors on missing peer CRT
Feb 6, 2019
4a82c1c
Improve documentation of mbedtls_ssl_get_peer_cert()
Feb 5, 2019
bb278f5
Add configuration option to remove peer CRT after handshake
Feb 5, 2019
8d84fd8
Update version_features.c
Feb 7, 2019
9198ad1
Extend mbedtls_ssl_session by buffer holding peer CRT digest
Feb 5, 2019
6bbd94c
Compute digest of peer's end-CRT in mbedtls_ssl_parse_certificate()
Feb 5, 2019
177475a
Mitigate triple handshake attack by comparing digests only
Feb 5, 2019
3dad311
Parse and verify peer CRT chain in local variable
Feb 5, 2019
c5fcbb3
Add peer CRT digest to session tickets
Feb 6, 2019
c966bd1
Remove peer CRT from tickets if !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
Feb 6, 2019
a887d1a
Remove peer CRT from cache if !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
Feb 6, 2019
494dd7a
Add raw public key buffer bounds to mbedtls_x509_crt struct
Feb 6, 2019
7517312
Add field for peer's raw public key to TLS handshake param structure
Feb 6, 2019
a274753
Make a copy of peer's raw public key after verifying its CRT chain
Feb 6, 2019
c7d7e29
Adapt ssl_write_encrypted_pms() to use raw public key
Feb 6, 2019
be7f508
Adapt ssl_get_ecdh_params_from_cert() to use raw public key
Feb 6, 2019
a6899bb
Adapt client-side signature verification to use raw public key
Feb 6, 2019
a1ab9be
Adapt server-side signature verification to use raw public key
Feb 6, 2019
57b33c9
Use mbedtls_ssl_get_peer_cert() to query peer cert in cert_app
Feb 7, 2019
2a831a4
Adapt client auth detection in ssl_parse_certificate_verify()
Feb 7, 2019
abe6f66
Remove peer CRT from mbedtls_ssl_session if new option is disabled
Feb 7, 2019
94cc26d
Adapt session ticket implementation to removal of `peer_cert` field
Feb 7, 2019
6d1986e
Adapt mbedtls_ssl_session_copy() to removal of `peer_cert` field
Feb 7, 2019
13c327d
Adapt ssl_clear_peer_cert() to removal of `peer_cert` field
Feb 7, 2019
b6c5eca
Adapt mbedtls_ssl_parse_certificate() to removal of peer_cert field
Feb 7, 2019
d0aac14
Add dependency to ssl-opt.sh tests which need peer CRT debug info
Feb 7, 2019
e682457
Guard mbedtls_ssl_get_peer_cert() by new compile-time option
Feb 7, 2019
e31505d
Adapt ChangeLog
Feb 7, 2019
b9d4479
Correct compile-time guards for ssl_clear_peer_cert()
Feb 8, 2019
ae553dd
Free peer's public key as soon as it's no longer needed
Feb 8, 2019
0056eab
Parse peer's CRT chain in-place from the input buffer
Feb 8, 2019
6b8fbab
Free peer CRT chain immediately after verifying it
Feb 8, 2019
545ced4
Add test for !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE to all.sh
Feb 19, 2019
1aed777
Remove misleading and redundant guard around restartable ECC field
Feb 22, 2019
3acc9b9
Remove question in comment about verify flags on cli vs. server
Feb 25, 2019
accc599
Set peer CRT length only after successful allocation
Feb 25, 2019
3fd3f5e
Fix indentation of Doxygen comment in ssl_internal.h
Feb 25, 2019
fd7f298
Improve documentation of MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
Feb 25, 2019
958efeb
Improve documentation of mbedtls_ssl_get_peer_cert()
Feb 25, 2019
a9766c2
ssl_client2: Extract peer CRT info from verification callback
Feb 25, 2019
fe9aec4
Reintroduce numerous ssl-opt.sh tests if !MBEDTLS_SSL_KEEP_PEER_CERT
Feb 25, 2019
a1051b4
ssl_client2: Zeroize peer CRT info buffer when reconnecting
Feb 26, 2019
fe4ef0c
Add config sanity check for !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
Feb 26, 2019
6883874
Fix typo in SSL ticket documentation
Feb 26, 2019
62d58ed
Add debug output in case of assertion failure
Feb 26, 2019
353a6f0
Fix typo in documentation of ssl_parse_certificate_chain()
Feb 26, 2019
bd5580a
Add further debug statements on assertion failures
Feb 26, 2019
23699ef
ssl_client2: Reset peer CRT info string on reconnect
Feb 26, 2019
775655e
Update programs/ssl/query_config.c
Feb 26, 2019
e5670f2
Remove unnecessary cast from ECP test
yanesca Feb 25, 2019
7780096
Fix typo in ECP module
yanesca Feb 25, 2019
b65853c
Improve documentation of mbedtls_ecp_read_key
yanesca Feb 25, 2019
28eb06d
ECP: Catch unsupported import/export
yanesca Feb 26, 2019
4ffdbe0
Add more tests for ecp_read_key
yanesca Feb 26, 2019
df9295b
Make ecp_get_type public
yanesca Feb 26, 2019
bf42408
Improve ECP test names
yanesca Feb 26, 2019
52ff8e9
Fix ECDH secret export for Mongomery curves
yanesca Feb 26, 2019
f607813
ECP: remove extra whitespaces
yanesca Feb 26, 2019
bdf75eb
Add missing compile time guard in ssl_client2
Feb 27, 2019
54ba3eb
ECP: Clarify test descriptions
yanesca Feb 27, 2019
a9d6ba2
Merge remote-tracking branch 'tls/development' into development
Patater Feb 27, 2019
a78c958
Merge remote-tracking branch 'tls/pr/2028' into development
Patater Feb 27, 2019
6e95914
Add new function mbedtls_asn1_write_named_bitstring()
Sep 26, 2018
7067f81
Add tests for (named) bitstring to suite_asn1write
Sep 26, 2018
d8233f7
Improve docs for named bitstrings and their usage
Oct 8, 2018
d588ff7
Add ChangeLog entry for unused bits in bitstrings
Sep 26, 2018
412ddf3
Fix typo in x509write test data
Feb 11, 2019
ce04951
Fix ChangeLog entry to correct release version
Feb 20, 2019
1e198f5
Update the crypto submodule to a78c958
simonbutcher Feb 28, 2019
84d9d27
Fix unused variable warning in ssl_parse_certificate_coordinate()
Mar 1, 2019
4a51228
Reduce priority of 3DES ciphersuites
Oct 30, 2018
22a8905
Fix wording of ChangeLog and 3DES_REMOVE docs
Nov 26, 2018
2dadab7
Exclude 3DES tests in test scripts
Jan 8, 2019
bdfba79
Fix documentation for 3DES removal
Feb 11, 2019
f8dffb3
Clarify 3DES changes in ChangeLog
Feb 19, 2019
419bd00
Adjust DES exclude lists in test scripts
Feb 19, 2019
aa946b2
Fix failure in SSLv3 per-version suites test
mpg Mar 1, 2019
56b9a93
Update query_config.c
mpg Mar 1, 2019
700cbac
Merge remote-tracking branch 'public/pr/2448' into development
simonbutcher Mar 1, 2019
bbed914
Merge remote-tracking branch 'public/pr/2447' into development
simonbutcher Mar 1, 2019
74ac6e3
Merge remote-tracking branch 'public/pr/2028' into development
simonbutcher Mar 1, 2019
195bdde
Merge remote-tracking branch 'restricted/pr/528' into development
simonbutcher Mar 1, 2019
535ee4a
Merge remote-tracking branch 'public/pr/2421' into development
simonbutcher Mar 1, 2019
800a71c
The specification document is now a single PDF
gilles-peskine-arm Mar 5, 2019
7df1bec
Merge remote-tracking branch 'origin/pr/1520' into development
Patater Mar 5, 2019
c851b08
Merge remote-tracking branch 'origin/pr/1818' into development
Patater Mar 5, 2019
6b47a6c
Merge remote-tracking branch 'origin/pr/2100' into development
Patater Mar 5, 2019
db2c2ce
Merge remote-tracking branch 'origin/pr/2158' into development
Patater Mar 5, 2019
41e1986
Merge remote-tracking branch 'origin/pr/2293' into development
Patater Mar 5, 2019
0a9f9b2
Merge remote-tracking branch 'origin/pr/2317' into development
Patater Mar 5, 2019
eb0195d
Merge remote-tracking branch 'origin/pr/2239' into development
Patater Mar 5, 2019
a96f4fe
Merge remote-tracking branch 'origin/pr/2380' into development
Patater Mar 5, 2019
bea98b4
Remove Diffie-Hellman examples
yanesca Mar 5, 2019
c3044a6
Remove trailing whitespace
gilles-peskine-arm Mar 6, 2019
e5c025c
Fix Doxygen warnings
gilles-peskine-arm Mar 6, 2019
c079f56
Pass check-files.py
gilles-peskine-arm Mar 6, 2019
32668ce
Pacify check-names.sh
gilles-peskine-arm Mar 6, 2019
03a6030
Merge pull request #248 from ARMmbed/dreemkiller_rename_driver
Patater Mar 6, 2019
2b9eb0b
Merge remote-tracking branch 'tls/development' into development
Patater Mar 7, 2019
98c2208
Merge pull request #80 from yanesca/iotcrypt-685-rewrite-dh-example
Patater Mar 7, 2019
6d9cb25
Merge pull request #82 from gilles-peskine-arm/psa-crypto-docs-1.0-beta2
Patater Mar 7, 2019
30fae8e
programs/Makefile: List all programs one by one
Patater Dec 20, 2018
bce557d
configs: Update example PSA config
Patater Feb 22, 2019
95666b7
pkey/rsa_genkey: Remove commented out code
Patater Feb 22, 2019
47a3635
selftest: Remove X.509 selftest
Patater Nov 2, 2018
bf564c7
pkey: Remove dependency on X.509
Patater Oct 26, 2018
ebbc5f7
md: Remove dependency on X.509
Patater Feb 22, 2019
de0a41b
ecp: Remove dependency on TLS and X.509
Patater Nov 2, 2018
ed16ca7
dhm: Remove dependency on TLS
Patater Feb 26, 2019
9b90f2e
all.sh: Remove dependency on TLS, NET, and X.509
Patater Nov 2, 2018
d808771
asn1: Remove dependency on X.509
Patater Nov 5, 2018
03c60de
query_config: Move to programs/test
Patater Feb 28, 2019
4c1fdb5
cpp_dummy_build: Remove X.509 dependency
Patater Feb 21, 2019
e23737c
recursion.pl: Don't depend on X.509
Patater Feb 27, 2019
fa30c33
programs: psa: Remove dependency on platform.h
Patater Dec 21, 2018
2b725ef
cpp_dummy_build: Remove dependency on compat-1.3.h
Patater Dec 19, 2018
9afb2e9
Remove tests that depend on TLS or X.509
Patater Nov 2, 2018
120d571
tests: Use parent module includes when used as a submodule
Patater Mar 7, 2019
1264c2a
tests: Exclude version suite when used as a submodule
Patater Mar 7, 2019
b478bb6
tests: Add a crypto prefix to submodule tests
Patater Mar 7, 2019
a52c059
Merge pull request #74 from Patater/break-non-crypto-dependencies
Patater Mar 13, 2019
b78b300
tests: Test crypto via the crypto submodule
Patater Oct 29, 2018
c9391b0
Update crypto submodule to Mbed Crypto development
Patater Mar 13, 2019
2184ef6
tests: Use globbing in test suite exclusion list
Patater Mar 13, 2019
5f54497
Import ITS header files
gilles-peskine-arm Feb 24, 2019
601bd53
Fix up ITS header files for internal use in crypto
gilles-peskine-arm Feb 24, 2019
6194dc2
Implement PSA ITS over files
gilles-peskine-arm Nov 16, 2018
bc1f272
Tests for PSA ITS over files
gilles-peskine-arm Nov 16, 2018
b0c642a
Tests for PSA ITS over stdio files
gilles-peskine-arm Feb 24, 2019
2379348
Support ITS over file in PSA crypto
gilles-peskine-arm Feb 24, 2019
e435f23
Remove psa_crypto_storage_file
gilles-peskine-arm Feb 24, 2019
088b77f
Merge psa_crypto_storage_its into psa_crypto_storage
gilles-peskine-arm Feb 24, 2019
5e80d91
Remove psa_crypto_storage_backend.h
gilles-peskine-arm Feb 24, 2019
6bf4bae
Remove compilation option MBEDTLS_PSA_HAS_ITS_IO
gilles-peskine-arm Feb 24, 2019
e3dbdd8
Gate entropy injection through a dedicated configuration option
gilles-peskine-arm Feb 25, 2019
fad3a3e
Fix build error with MSVC on 64-bit systems
gilles-peskine-arm Feb 25, 2019
d7929e7
Fix copypasta in test data
gilles-peskine-arm Mar 15, 2019
b55de7e
Merge pull request #69 from gilles-peskine-arm/psa-its_over_file
Patater Mar 15, 2019
0a504c0
tests: Add library to include path when used as submodule
Patater Mar 15, 2019
82b3b83
Merge pull request #87 from Patater/submodule-library-include
Patater Mar 15, 2019
57f4d9e
Update crypto submodule to test with private headers
Patater Mar 15, 2019
9714510
all.sh: Generate seedfile for crypto submodule tests
Patater Mar 18, 2019
3f8d784
Update library version to 2.17.0
Patater Mar 19, 2019
11ee071
Add certificate policy of type any policy id
Mar 25, 2019
3b11c85
Add changeLog entry
Mar 25, 2019
d5d01a0
Merge remote-tracking branch 'origin/pr/2525' into development
Patater Mar 26, 2019
3930e18
Merge remote-tracking branch 'origin/pr/2509' into development
Patater Mar 27, 2019
c73fde7
Merge remote-tracking branch 'origin/pr/2531' into development
Patater Mar 27, 2019
0ea3377
Merge remote-tracking branch 'restricted/pr/552' into development
Patater Mar 27, 2019
57773d4
Merge remote-tracking branch 'restricted/pr/551' into development
Patater Mar 27, 2019
c70a3c7
Merge remote-tracking branch 'tls/development' into development
Patater Mar 28, 2019
3135184
Merge remote-tracking branch 'upstream-crypto/development' into psa-a…
gilles-peskine-arm Apr 9, 2019
1e2730b
Update usage of PSA_ALG_ECDH so that test_suite_psa_crypto compiles
gilles-peskine-arm Apr 9, 2019
b467934
Use Windows-specific renaming function
dgreen-arm Apr 10, 2019
fdda7de
Use function-like macro for Windows renaming
dgreen-arm Apr 11, 2019
86095bc
Document rename_replace_existing macro
dgreen-arm Apr 11, 2019
f9ee633
Fix confusion between HMAC algorithm and the corresponding hash
gilles-peskine-arm Apr 11, 2019
125a1e9
Merge pull request #90 from dgreen-arm/fix-its-file-on-windows
Patater Apr 15, 2019
0216fe1
Implement psa_key_agreement_raw_shared_secret
gilles-peskine-arm Apr 11, 2019
2e46e9c
Add exercise_key for raw key agreement
gilles-peskine-arm Apr 11, 2019
04ee2d2
Update key agreement policy tests for the new derivation API
gilles-peskine-arm Apr 11, 2019
77f40d8
Quick fix of key agreement setup tests for the new derivation API
gilles-peskine-arm Apr 11, 2019
f8831c2
Remove obsolete test case "ECDH-only public key"
gilles-peskine-arm Apr 11, 2019
f0cba73
New test function for raw agreement
gilles-peskine-arm Apr 11, 2019
f8a9d94
Test multipart key agreement with ECDH+HKDF
gilles-peskine-arm Apr 11, 2019
a52460c
Algorithm encoding: move two bits from derivation to agreement
gilles-peskine-arm Apr 11, 2019
882e57e
psa_constant_names: support key agreement algorithms
gilles-peskine-arm Apr 11, 2019
c88644d
Remove "TODO" comments
gilles-peskine-arm Apr 12, 2019
ab4b201
fixup! Key derivation by small input steps: proof-of-concept
gilles-peskine-arm Apr 12, 2019
22c5151
Use unsigned int for bitfields
gilles-peskine-arm Apr 12, 2019
2b522db
fixup! Key derivation by small input steps: proof-of-concept
gilles-peskine-arm Apr 12, 2019
a780f24
Merge remote-tracking branch 'upstream-crypto/development' into psa-a…
gilles-peskine-arm Apr 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ compiler:
- gcc
sudo: false
cache: ccache

# blocklist
branches:
except:
- development-psa
- coverity_scan

script:
- tests/scripts/recursion.pl library/*.c
- tests/scripts/check-generated-files.sh
Expand All @@ -15,13 +22,8 @@ script:
- make
- make test
- programs/test/selftest
- OSSL_NO_DTLS=1 tests/compat.sh
- tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
- tests/scripts/test-ref-configs.pl
- tests/scripts/curves.pl
- tests/scripts/key-exchanges.pl
after_failure:
- tests/scripts/travis-log-failure.sh
env:
global:
secure: "barHldniAfXyoWOD/vcO+E6/Xm4fmcaUoC9BeKW+LwsHqlDMLvugaJnmLXkSpkbYhVL61Hzf3bo0KPJn88AFc5Rkf8oYHPjH4adMnVXkf3B9ghHCgznqHsAH3choo6tnPxaFgOwOYmLGb382nQxfE5lUdvnM/W/psQjWt66A1+k="
Expand All @@ -34,7 +36,7 @@ addons:
coverity_scan:
project:
name: "ARMmbed/mbedtls"
notification_email: [email protected]
notification_email: [email protected]
build_command_prepend:
build_command: make
branch_pattern: coverity_scan
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ if(ENABLE_TESTING)
ADD_CUSTOM_TARGET(covtest
COMMAND make test
COMMAND programs/test/selftest
COMMAND tests/compat.sh
COMMAND tests/ssl-opt.sh
)

ADD_CUSTOM_TARGET(lcov
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ When backporting to these branches please observe the following rules:

2. All bug fixes that correct a defect that is also present in an LTS branch must be backported to that LTS branch. If a bug fix introduces a change to the API such as a new function, the fix should be reworked to avoid the API change. API changes without very strong justification are unlikely to be accepted.

3. If a contribution is a new feature or enhancement, no backporting is required. Exceptions to this may be addtional test cases or quality improvements such as changes to build or test scripts.
3. If a contribution is a new feature or enhancement, no backporting is required. Exceptions to this may be additional test cases or quality improvements such as changes to build or test scripts.

It would be highly appreciated if contributions are backported to LTS branches in addition to the [development branch](https://github.com/ARMmbed/mbedtls/tree/development) by contributors.

Currently maintained LTS branches are:

1. [mbedtls-2.1](https://github.com/ARMmbed/mbedtls/tree/mbedtls-2.1)
1. [mbedtls-2.7](https://github.com/ARMmbed/mbedtls/tree/mbedtls-2.7)

2. [mbedtls-2.7](https://github.com/ARMmbed/mbedtls/tree/mbedtls-2.7)
1. [mbedtls-2.16](https://github.com/ARMmbed/mbedtls/tree/mbedtls-2.16)


Tests
Expand Down
224 changes: 216 additions & 8 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,218 @@
mbed TLS ChangeLog (Sorted per branch, date)

= mbed TLS 2.xx.x branch released xxxx-xx-xx
= mbed TLS x.x.x branch released xxxx-xx-xx

Features
* Add the Any Policy certificate policy oid, as defined in
rfc 5280 section 4.2.1.4.

Bugfix
* Fix private key DER output in the key_app_writer example. File contents
were shifted by one byte, creating an invalid ASN.1 tag. Fixed by
Christian Walther in #2239.

Changes
* Server's RSA certificate in certs.c was SHA-1 signed. In the default
mbedTLS configuration only SHA-2 signed certificates are accepted.
This certificate is used in the demo server programs, which lead the
client programs to fail at the peer's certificate verification
due to an unacceptable hash signature. The certificate has been
updated to one that is SHA-256 signed. Fix contributed by
Illya Gerasymchuk.
* Return from various debugging routines immediately if the
provided SSL context is unset.
* Remove dead code from bignum.c in the default configuration.
Found by Coverity, reported and fixed by Peter Kolbus (Garmin). Fixes #2309.
* Add test for minimal value of MBEDTLS_MPI_WINDOW_SIZE to all.sh.
Contributed by Peter Kolbus (Garmin).

= mbed TLS 2.17.0 branch released 2019-03-19

Features
* Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`
which allows copy-less parsing of DER encoded X.509 CRTs,
at the cost of additional lifetime constraints on the input
buffer, but at the benefit of reduced RAM consumption.
* Add a new function mbedtls_asn1_write_named_bitstring() to write ASN.1
named bitstring in DER as required by RFC 5280 Appendix B.
* Add MBEDTLS_REMOVE_3DES_CIPHERSUITES to allow removing 3DES ciphersuites
from the default list (enabled by default). See
https://sweet32.info/SWEET32_CCS16.pdf.

API Changes
* Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`.
See the Features section for more information.
* Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert()
for the benefit of saving RAM, by disabling the new compile-time
option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for
API stability). Disabling this option makes mbedtls_ssl_get_peer_cert()
always return NULL, and removes the peer_cert field from the
mbedtls_ssl_session structure which otherwise stores the peer's
certificate.

Security
* Make mbedtls_ecdh_get_params return an error if the second key
belongs to a different group from the first. Before, if an application
passed keys that belonged to different group, the first key's data was
interpreted according to the second group, which could lead to either
an error or a meaningless output from mbedtls_ecdh_get_params. In the
latter case, this could expose at most 5 bits of the private key.

Bugfix
* Fix a compilation issue with mbedtls_ecp_restart_ctx not being defined
when MBEDTLS_ECP_ALT is defined. Reported by jwhui. Fixes #2242.
* Run the AD too long test only if MBEDTLS_CCM_ALT is not defined.
Raised as a comment in #1996.
* Reduce the stack consumption of mbedtls_mpi_fill_random() which could
previously lead to a stack overflow on constrained targets.
* Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions
in the header files, which missed the precompilation check. #971
* Fix returning the value 1 when mbedtls_ecdsa_genkey failed.
* Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326.
* Remove the mbedtls namespacing from the header file, to fix a "file not found"
build error. Fixed by Haijun Gu #2319.
* Fix signed-to-unsigned integer conversion warning
in X.509 module. Fixes #2212.
* Reduce stack usage of `mpi_write_hlp()` by eliminating recursion.
Fixes #2190.
* Fix false failure in all.sh when backup files exist in include/mbedtls
(e.g. config.h.bak). Fixed by Peter Kolbus (Garmin) #2407.
* Ensure that unused bits are zero when writing ASN.1 bitstrings when using
mbedtls_asn1_write_bitstring().
* Fix issue when writing the named bitstrings in KeyUsage and NsCertType
extensions in CSRs and CRTs that caused these bitstrings to not be encoded
correctly as trailing zeroes were not accounted for as unused bits in the
leading content octet. Fixes #1610.

Changes
* Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx()
from the cipher abstraction layer. Fixes #2198.
* Reduce RAM consumption during session renegotiation by not storing
the peer CRT chain and session ticket twice.
* Include configuration file in all header files that use configuration,
instead of relying on other header files that they include.
Inserted as an enhancement for #1371
* Add support for alternative CSR headers, as used by Microsoft and defined
in RFC 7468. Found by Michael Ernst. Fixes #767.
* Correct many misspellings. Fixed by MisterDA #2371.
* Provide an abstraction of vsnprintf to allow alternative implementations
for platforms that don't provide it. Based on contributions by Joris Aerts
and Nathaniel Wesley Filardo.
* Fix clobber list in MIPS assembly for large integer multiplication.
Previously, this could lead to functionally incorrect assembly being
produced by some optimizing compilers, showing up as failures in
e.g. RSA or ECC signature operations. Reported in #1722, fix suggested
by Aurelien Jarno and submitted by Jeffrey Martin.
* Reduce the complexity of the timing tests. They were assuming more than the
underlying OS actually guarantees.
* Fix configuration queries in ssl-opt.h. #2030
* Ensure that ssl-opt.h can be run in OS X. #2029
* Re-enable certain interoperability tests in ssl-opt.sh which had previously
been disabled for lack of a sufficiently recent version of GnuTLS on the CI.
* Ciphersuites based on 3DES now have the lowest priority by default when
they are enabled.

= mbed TLS 2.16.0 branch released 2018-12-21

Features
* Add a new config.h option of MBEDTLS_CHECK_PARAMS that enables validation
of parameters in the API. This allows detection of obvious misuses of the
API, such as passing NULL pointers. The API of existing functions hasn't
changed, but requirements on parameters have been made more explicit in
the documentation. See the corresponding API documentation for each
function to see for which parameter values it is defined. This feature is
disabled by default. See its API documentation in config.h for additional
steps you have to take when enabling it.

API Changes
* The following functions in the random generator modules have been
deprecated and replaced as shown below. The new functions change
the return type from void to int to allow returning error codes when
using MBEDTLS_<MODULE>_ALT for the underlying AES or message digest
primitive. Fixes #1798.
mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret()
mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret()
* Extend ECDH interface to enable alternative implementations.
* Deprecate error codes of the form MBEDTLS_ERR_xxx_INVALID_KEY_LENGTH for
ARIA, CAMELLIA and Blowfish. These error codes will be replaced by
the more generic per-module error codes MBEDTLS_ERR_xxx_BAD_INPUT_DATA.
* Additional parameter validation checks have been added for the following
modules - AES, ARIA, Blowfish, CAMELLIA, CCM, GCM, DHM, ECP, ECDSA, ECDH,
ECJPAKE, SHA, Chacha20 and Poly1305, cipher, pk, RSA, and MPI.
Where modules have had parameter validation added, existing parameter
checks may have changed. Some modules, such as Chacha20 had existing
parameter validation whereas other modules had little. This has now been
changed so that the same level of validation is present in all modules, and
that it is now optional with the MBEDTLS_CHECK_PARAMS flag which by default
is off. That means that checks which were previously present by default
will no longer be.

New deprecations
* Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update
in favor of functions that can return an error code.

Bugfix
* Fix for Clang, which was reporting a warning for the bignum.c inline
assembly for AMD64 targets creating string literals greater than those
permitted by the ISO C99 standard. Found by Aaron Jones. Fixes #482.
* Fix runtime error in `mbedtls_platform_entropy_poll()` when run
through qemu user emulation. Reported and fix suggested by randombit
in #1212. Fixes #1212.
* Fix an unsafe bounds check when restoring an SSL session from a ticket.
This could lead to a buffer overflow, but only in case ticket authentication
was broken. Reported and fix suggested by Guido Vranken in #659.
* Add explicit integer to enumeration type casts to example program
programs/pkey/gen_key which previously led to compilation failure
on some toolchains. Reported by phoenixmcallister. Fixes #2170.
* Fix double initialization of ECC hardware that made some accelerators
hang.
* Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence
of check for certificate/key matching. Reported by Attila Molnar, #507.

= mbed TLS 2.15.1 branch released 2018-11-30

Changes
* Update the Mbed Crypto submodule to version 0.1.0b2.

= mbed TLS 2.15.0 branch released 2018-11-23

Features
* Add an experimental build option, USE_CRYPTO_SUBMODULE, to enable use of
Mbed Crypto as the source of the cryptography implementation.
* Add an experimental configuration option, MBEDTLS_PSA_CRYPTO_C, to enable
the PSA Crypto API from Mbed Crypto when additionally used with the
USE_CRYPTO_SUBMODULE build option.

Changes
* Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx()
from the cipher abstraction layer. Fixes #2198.

= mbed TLS 2.14.1 branch released 2018-11-30

Security
* Fix timing variations and memory access variations in RSA PKCS#1 v1.5
decryption that could lead to a Bleichenbacher-style padding oracle
attack. In TLS, this affects servers that accept ciphersuites based on
RSA decryption (i.e. ciphersuites whose name contains RSA but not
(EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute), Robert Gillham
(University of Adelaide), Daniel Genkin (University of Michigan),
Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom
(University of Adelaide, Data61). The attack is described in more detail
in the paper available here: http://cat.eyalro.net/cat.pdf CVE-2018-19608
* In mbedtls_mpi_write_binary(), don't leak the exact size of the number
via branching and memory access patterns. An attacker who could submit
a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing
of the decryption and not its result could nonetheless decrypt RSA
plaintexts and forge RSA signatures. Other asymmetric algorithms may
have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham,
Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom.
* Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG
modules.

API Changes
* The new functions mbedtls_ctr_drbg_update_ret() and
mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update()
and mbedtls_hmac_drbg_update() respectively, but the new functions
report errors whereas the old functions return void. We recommend that
applications use the new functions.

= mbed TLS 2.14.0 branch released 2018-11-19

Expand Down Expand Up @@ -229,7 +437,7 @@ Security
1.2, that allowed a local attacker, able to execute code on the local
machine as well as manipulate network packets, to partially recover the
plaintext of messages under some conditions by using a cache attack
targetting an internal MD/SHA buffer. With TLS or if
targeting an internal MD/SHA buffer. With TLS or if
mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if
the same secret (for example a HTTP Cookie) has been repeatedly sent over
connections manipulated by the attacker. Connections using GCM or CCM
Expand Down Expand Up @@ -1115,7 +1323,7 @@ Bugfix
* Fix potential build failures related to the 'apidoc' target, introduced
in the previous patch release. Found by Robert Scheck. #390 #391
* Fix issue in Makefile that prevented building using armar. #386
* Fix memory leak that occured only when ECJPAKE was enabled and ECDHE and
* Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and
ECDSA was disabled in config.h . The leak didn't occur by default.
* Fix an issue that caused valid certificates to be rejected whenever an
expired or not yet valid certificate was parsed before a valid certificate
Expand Down Expand Up @@ -1357,7 +1565,7 @@ API Changes
You now need to link to all of them if you use TLS for example.
* All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace.
Some names have been further changed to make them more consistent.
Migration helpers scripts/rename.pl and include/mbedlts/compat-1.3.h are
Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are
provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt
* Renamings of fields inside structures, not covered by the previous list:
mbedtls_cipher_info_t.key_length -> key_bitlen
Expand Down Expand Up @@ -1412,7 +1620,7 @@ API Changes
* net_accept() gained new arguments for the size of the client_ip buffer.
* In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now
return void.
* ecdsa_write_signature() gained an addtional md_alg argument and
* ecdsa_write_signature() gained an additional md_alg argument and
ecdsa_write_signature_det() was deprecated.
* pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA.
* Last argument of x509_crt_check_key_usage() and
Expand Down Expand Up @@ -2947,7 +3155,7 @@ XySSL ChangeLog
not swapped on PadLock; also fixed compilation on older versions
of gcc (bug reported by David Barrett)
* Correctly handle the case in padlock_xcryptcbc() when input or
ouput data is non-aligned by falling back to the software
output data is non-aligned by falling back to the software
implementation, as VIA Nehemiah cannot handle non-aligned buffers
* Fixed a memory leak in x509parse_crt() which was reported by Greg
Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ ifndef WINDOWS
covtest:
$(MAKE) check
programs/test/selftest
tests/compat.sh
tests/ssl-opt.sh

lcov:
rm -rf Coverage
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,21 @@ Mbed Crypto is a reference implementation of the PSA cryptography API. It is wri

## Documentation

Since the Mbed Crypto library is a reference implementation of the PSA cryptography API, the library's API documentation is the PSA cryptography API specification. The PSA cryptography API specification consists of the following documents:
The Mbed Crypto library is a reference implementation of the PSA cryptography API. Please refer to the PSA Cryptography API documents for an overview of the library's interfaces and a detailed description of the types, macros and functions that it provides.

* The [PSA Cryptography API overview](docs/PSA_Crypto_API_Overview.pdf).
* The [PSA Cryptography API detailed function reference](docs/PSA_Crypto_API_Reference.pdf), which you can also browse in [HTML format](docs/html/modules.html).
There are currently a few deviations where the library does not yet implement the latest version of the specification. Please refer to the [compliance issues on Github](https://github.com/ARMmbed/mbed-crypto/labels/compliance) for an up-to-date list.

### PSA Cryptography API

You can read the [complete PSA cryptography API specification as a PDF document](https://github.com/ARMmbed/mbed-crypto/blob/psa-crypto-api/docs/PSA_Cryptography_API_Specification.pdf). The API reference is also available in [HTML format](https://htmlpreview.github.io/?https://github.com/ARMmbed/mbed-crypto/blob/psa-crypto-api/docs/html/modules.html).

### Browsable library documentation

To generate a local copy of the library documentation in HTML format:

1. Make sure that [Doxygen](http://www.doxygen.nl/) is installed. We use version 1.8.11 but slightly older or more recent versions should work.
1. Run `make apidoc`.
1. Browse `apidoc/index.html` or `apidoc/modules.html`.

## Compiling

Expand Down
Loading