Commit graph

9656 commits

Author SHA1 Message Date
Gilles Peskine 1d9b2832de Add a changelog entry for Everest ECDH (X25519) 2019-08-23 09:57:02 +01:00
Gilles Peskine 92a925c0bc Document that curve lists can include partially-supported curves
Document that a curve returned by mbedtls_ecp_curve_list() or
mbedtls_ecp_grp_id_list() may lack support for ECDH or ECDSA.

Add a corresponding changelog entry, under "API Changes" because we
have changed the behavior: formerly, these functions skipped ECDH-only
curves, although this was not documented.
2019-08-23 09:57:02 +01:00
Gilles Peskine da510dfa08 Add mbedtls_ecdh_can_do
All curves can currently do ECDH, but to make the API symmetric and
future-proof, add mbedtls_ecdh_can_do() to go with mbedtls_ecdsa_can_do().
2019-08-23 09:57:02 +01:00
Gilles Peskine 3bf192686b Fix build with gcc -Wshadow 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 711eba154f ECDH: Make benchmarks check MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 12e9241a38 3rdparty: Add additional build facilities for 3rd-party code 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger cb6c82bf81 config.h: Silence missing documentation warning 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 8914f01511 ECDH: Disable Everest by default 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 610763d807 ECDH: Fix file permission problem 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 6737f20157 ECDSA: Add mbedtls_ecdsa_can_do 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 5b66622164 ECDH: Exclude FStar and Hacl* from exported symbol checks 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 13e2bd77a3 Fix preprocessor directive recognition in list-enum-consts.pl 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 652d909284 Add new 3rdparty build scripts 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 3b8327b42a ECDH: Everest: Remove unnecessary file 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger cade42238c ECDH: Fix error checks in benchmark.c 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 853218d93f ECDH: Use LOCAL_CFLAGS instead of CFLAGS 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger b22fd9bb29 ECDH: Fix whitespace and doxygen comment 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger dcb9b6c007 ECDH: Add Everest Curve25519 to VS project files
This being the first 3rdparty-contribution, we may want to consider the
structure of the project file generation scripts. Perhaps add small,
constribution-specific scripts to each directory in 3rdparty instead of adding
all constraints to generate_visualc_files.pl?
2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 5a1e3f7af8 ECDH: Improve ECDH full handshake benchmark 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger d14995b0f3 ECDH: Rename full handshake benchmark 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 0d3888af4c ECDH: Add #ifdef filter to tests/scripts/list-enum-consts.pl
This allows the use of #ifdef ... #endif in enum definitions (e.g.,
mbedtls_ecdh_variant in ecdh.h).
2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger f5e9d71b28 ECDH: Add new (non-legacy) ECDH benchmark 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger cd5380abd5 ECDH: Include Everest Curve25519 in build scripts 2019-08-23 09:57:02 +01:00
Christoph M. Wintersteiger 20788e584d ECDH: Add Everest Curve25519 config.h option 2019-08-23 09:57:02 +01:00
Jaeden Amero 9ed851d27f Merge remote-tracking branch 'origin/pr/2767' into development
* origin/pr/2767:
  Rename local variables
  Update submodule
  Update Visual studio project file
  Move the examples to PSA 1.0
  Use psa_raw_key_agreement
  Remove calls to psa_allocate_key
  Make variable naming consistent
  Update psa_create_key to PSA 1.0
  Update psa_import_key to PSA 1.0
  Update psa_generator_abort to PSA 1.0
  Update psa_generator_read to PSA 1.0
  Update psa_crypto_generator_t to PSA 1.0
  Update psa_key_agreement to PSA 1.0
  Update GENERATOR_INIT macro to PSA 1.0
  Update KEYPAIR macros to PSA 1.0
2019-08-20 09:45:38 +01:00
Janos Follath da6ac01963 Rename local variables 2019-08-16 13:47:29 +01:00
Janos Follath edf6d5a025 Update submodule 2019-08-16 13:37:32 +01:00
Janos Follath 8e65c50202 Update Visual studio project file
Updating the submodule resulted in new header and source files, we need
to update the shipped project files too.
2019-08-16 13:37:32 +01:00
Janos Follath be4efc2b38 Move the examples to PSA 1.0 2019-08-16 13:37:32 +01:00
Janos Follath df3b0892ce Use psa_raw_key_agreement
In PSA 1.0 raw key agreement has been moved from
psa_key_derivation_key_agreement() to its own separate function call,
called psa_raw_key_agreement().
2019-08-16 13:37:32 +01:00
Janos Follath 1239d70870 Remove calls to psa_allocate_key
In PSA 1.0 keys are allocated implicitly by other functions
(like psa_import_key) and psa_allocate_key is not needed and does not
exist anymore.
2019-08-16 13:37:32 +01:00
Janos Follath 53b8ec27a2 Make variable naming consistent 2019-08-16 13:37:32 +01:00
Janos Follath 7bb5e6b4da Update psa_create_key to PSA 1.0 2019-08-16 13:37:32 +01:00
Janos Follath ed73b04c6e Update psa_import_key to PSA 1.0 2019-08-16 13:36:15 +01:00
Janos Follath bd096101b5 Update psa_generator_abort to PSA 1.0 2019-08-16 11:45:55 +01:00
Janos Follath 6de99db449 Update psa_generator_read to PSA 1.0 2019-08-16 11:45:55 +01:00
Janos Follath 8dee877e8a Update psa_crypto_generator_t to PSA 1.0 2019-08-16 11:45:55 +01:00
Janos Follath 7d7ded85fb Update psa_key_agreement to PSA 1.0 2019-08-16 11:45:55 +01:00
Janos Follath 7374ee6139 Update GENERATOR_INIT macro to PSA 1.0 2019-08-16 11:45:55 +01:00
Janos Follath 3d158ebd2f Update KEYPAIR macros to PSA 1.0 2019-08-16 11:45:53 +01:00
Jaeden Amero 8813fef228 Merge remote-tracking branch 'origin/pr/2756' into development
* origin/pr/2756:
  Update crypto to a repo with latest crypto
  Update Mbed Crypto
  tls: Remove duplicate psa_util.h include
  Remove unused cryptography test files
  Remove crypto C files
  Remove files sourced from Mbed Crypto
  config: Fix Doxygen link to MBEDTLS_PARAM_FAILED
  Use mbedtls-based path for includes
  check-names: Consider crypto-sourced header files
2019-08-16 10:12:09 +01:00
Jaeden Amero ec1f91799f Update crypto to a repo with latest crypto
Use a version of Mbed Crypto with 100% up-to-date crypto and tool
changes from Mbed TLS. This is necessary in order for the check params
feature to work in deprecated removed builds and for the arm5vte build
to succeed.
2019-08-15 16:42:21 +01:00
Jaeden Amero c5ad90a6a7 Update Mbed Crypto
Update Mbed Crypto to a version that supports its headers being used
from a parent project.
2019-08-15 15:44:50 +01:00
Jaeden Amero 922013e46d tls: Remove duplicate psa_util.h include
Don't include psa_util.h twice. It's enough to include it once.
2019-08-15 15:44:50 +01:00
Jaeden Amero 70de9dc052 Remove unused cryptography test files 2019-08-15 15:44:50 +01:00
Jaeden Amero a0aee30644 Remove crypto C files
Remove unused cryptography C files, as these are sourced from Mbed
Crypto now.
2019-08-15 15:44:50 +01:00
Jaeden Amero 815e9a21a3 Remove files sourced from Mbed Crypto
Remove cryptography related files and a few utility header files that
are shared between Mbed TLS and Mbed Crypto. Mbed TLS will use an Mbed
Crypto sourced version of each of these header files in order to ease
the maintenance burden of both libraries, and to make it easier to keep
Mbed TLS and Mbed Crypto in sync.

As part of removing cryptography related files, tell Doxygen to source
information from the removed the headers, so that it will consider them
for inclusion within Doxygen output.

Later, as part of the Mbed TLS 3.0 (API breaking version), we'll
restructure the organization of the 3 libraries a bit, to move some
things out of Mbed Crypto that don't belong there.

Candidates of not belonging in Mbed Crypto, but are in libmbedcrypto.so
for legacy reasons:
 - asn1.h
 - asn1write.h
 - base64.h
 - memory_buffer_alloc.h
 - platform.h
 - platform_time.h
 - platform_util.h
 - threading.h
 - timing.h
 - version.h
2019-08-15 15:44:50 +01:00
Jaeden Amero dbe4ff80cf config: Fix Doxygen link to MBEDTLS_PARAM_FAILED
Don't use `#` for linking to function-like macros.
2019-08-15 15:44:50 +01:00
Jaeden Amero 6609aef809 Use mbedtls-based path for includes
To help the build system find the correct include files, paths starting
with "mbedtls/" or "psa/" must be used. Otherwise, you can run into
build failures like the following when building Mbed Crypto as a
submodule.

    In file included from chachapoly.c:31:0:
    ../../include/mbedtls/chachapoly.h:43:10: fatal error: poly1305.h: No such file or directory
     #include "poly1305.h"
              ^~~~~~~~~~~~
    compilation terminated.
2019-08-15 15:44:50 +01:00
Jaeden Amero 78d9d0c1e9 check-names: Consider crypto-sourced header files
Many identifiers come from Mbed Crypto. Teach check-names.sh to look in
the crypto submodule for identifiers, to avoid incorrect test results.
2019-08-15 15:24:26 +01:00