Skip to content
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

Enable 64-bit bignum limbs and add optimized multiplication for Aarch64 #1964

Closed
wants to merge 1,931 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1931 commits
Select commit Hold shift + click to select a range
274a263
Make whitespace consistent
gilles-peskine-arm Jul 23, 2019
bfd322f
Use a key attribute structure in the internal storage interface
gilles-peskine-arm Jul 23, 2019
0e8d495
Add the lifetime to the key storage format
gilles-peskine-arm Jul 23, 2019
1df83d4
SE keys: implement persistent storage
gilles-peskine-arm Jul 23, 2019
8b96cad
SE drivers: implement persistent storage
gilles-peskine-arm Jul 23, 2019
1d04b05
Dear check-names, where you accept struct, also accept union.
gilles-peskine-arm Jul 23, 2019
bda5a21
Add psa_trusted_storage_linux persistent storage support for v1.0.0 APIs
simonqhughes Jul 10, 2019
9dd125d
Fix overly complex Doxygen markup
gilles-peskine-arm Jul 23, 2019
105f67f
Move the definition of psa_key_attributes_t to crypto_types.h
gilles-peskine-arm Jul 23, 2019
831ac72
Add transaction file and driver storage; new key file format
gilles-peskine-arm Jul 23, 2019
573bbc1
Error out if a driver tries to store more than ITS can handle
gilles-peskine-arm Jul 23, 2019
b992313
Merge pull request #180 from simonqhughes/feature-psa-storage
Patater Jul 24, 2019
7e36765
Add CMake option for explicitly link library to trusted_storage (#2)
Jul 15, 2019
6763fe4
Change LINK_WITH_TRUSTED_STORAGE option to OFF
Jul 24, 2019
28f8f30
SE keys: ensure that functions that lack support properly error out
gilles-peskine-arm Jul 24, 2019
89870eb
Cosmetic improvements in SE driver tests
gilles-peskine-arm Jul 24, 2019
f4ee662
SE keys: error out in key creation function that lack support
gilles-peskine-arm Jul 24, 2019
d1cd766
SE keys: test NOT_SUPPORTED error from generate_key
gilles-peskine-arm Jul 24, 2019
1057366
SE keys: test that no function goes crazy
gilles-peskine-arm Jul 24, 2019
d0e66b0
Turn off secure element support by default
gilles-peskine-arm Jul 24, 2019
f96aefe
Test with secure element support
gilles-peskine-arm Jul 24, 2019
75c126b
Explain some non-obvious parts of the code
gilles-peskine-arm Jul 24, 2019
4b73422
Transaction support: be more future-proof
gilles-peskine-arm Jul 24, 2019
456674d
Merge pull request #186 from simonqhughes/psa-storage-and-cmake-fix
Patater Jul 24, 2019
f77a6ac
Fix indentation
gilles-peskine-arm Jul 25, 2019
6a3dd89
Improve alignment in comments
gilles-peskine-arm Jul 25, 2019
adad813
psa_key_slot_is_external exists. Use it.
gilles-peskine-arm Jul 25, 2019
725f22a
Bug fix: save the driver's persistent data in destroy_key
gilles-peskine-arm Jul 25, 2019
60450a4
Improve comments
gilles-peskine-arm Jul 25, 2019
2e0f388
Don't explicitly dereference function pointers
gilles-peskine-arm Jul 25, 2019
0c3ae1f
Improve documentation of SE driver persistent state
gilles-peskine-arm Jul 25, 2019
340b127
psa_destroy_se_key: explain why the error is NOT_PERMITTED
gilles-peskine-arm Jul 25, 2019
4aea103
Bug fix: don't start a transaction for non-SE keys
gilles-peskine-arm Jul 25, 2019
f9bb29e
Add boilerplate to recover a transaction during init
gilles-peskine-arm Jul 25, 2019
2ea06fd
Improve documentation of transaction storage
gilles-peskine-arm Jul 25, 2019
66be51c
If starting a transaction fails, wipe the transaction data
gilles-peskine-arm Jul 25, 2019
adb1c52
Merge pull request #157 from gilles-peskine-arm/psa-se_driver-create_key
gilles-peskine-arm Jul 26, 2019
424f894
SE keys: store the bit size internally (partial implementation)
gilles-peskine-arm Jul 15, 2019
dc5bfe9
SE keys: implement and test psa_get_key_attributes
gilles-peskine-arm Jul 24, 2019
1801740
SE driver: report the bit size on key import
gilles-peskine-arm Jul 24, 2019
e60d1d0
SE keys: save the bit size in storage
gilles-peskine-arm Jul 24, 2019
fc321f1
SE keys: test that the bit size is saved and loaded correctly
gilles-peskine-arm Jul 24, 2019
aad3dab
Merge pull request #165 from gilles-peskine-arm/storage_spec-1.1.0-re…
Patater Jul 30, 2019
b84b6a6
Add some negative tests for policy checks
gilles-peskine-arm Jul 30, 2019
7e0cff9
Move attribute fields to a substructure
gilles-peskine-arm Jul 30, 2019
c744d99
Limit keys to 65528 bits
gilles-peskine-arm Jul 30, 2019
68cc433
Store key sizes in 16 bits in attributes
gilles-peskine-arm Jul 30, 2019
8dd1690
Merge remote-tracking branch 'tls/development' into development
Patater Jul 22, 2019
fe93bc4
Merge pull request #187 from Patater/tls-development-20190722
Patater Jul 31, 2019
8e33870
Use psa_core_key_attributes_t in key slots in memory
gilles-peskine-arm Jul 30, 2019
4ed0e6f
Switch storage functions over to psa_core_key_attributes_t
gilles-peskine-arm Jul 30, 2019
2431859
Take advantage of psa_core_key_attributes_t internally: key loading
gilles-peskine-arm Jul 30, 2019
b46bef2
Store the key size in the slot in memory
gilles-peskine-arm Jul 30, 2019
76aa09c
Take advantage of psa_core_key_attributes_t internally #2
gilles-peskine-arm Jul 31, 2019
41e50d2
Remove "allocated" flag from key slots
gilles-peskine-arm Jul 31, 2019
7c227ae
Test key creation with an invalid type (0 and nonzero)
gilles-peskine-arm Jul 31, 2019
6edfa29
Add test function for import with a bad policy
gilles-peskine-arm Jul 31, 2019
3825e14
Fix policy validity check on key creation.
gilles-peskine-arm Jul 31, 2019
1b8594a
More refactoring: consolidate attribute validation
gilles-peskine-arm Jul 31, 2019
72c8c5b
Merge remote-tracking branch 'upstream-crypto/development' into psa-a…
gilles-peskine-arm Jul 31, 2019
8b66389
Adjust secure element code to the new ITS interface
gilles-peskine-arm Jul 31, 2019
8908c5e
Make psa_calculate_key_bits return psa_key_bits_t
gilles-peskine-arm Jul 31, 2019
5386f6b
Fix PSA init/deinit in mbedtls_xxx tests when using PSA
gilles-peskine-arm Aug 1, 2019
21599b6
Return right error code.
jainvikas8 Aug 2, 2019
e3223d1
Merge pull request #199 from jainvikas8/dev/jainvikas8/fix-return-code
gilles-peskine-arm Aug 2, 2019
640804b
Merge pull request #191 from gilles-peskine-arm/psa-se_driver-key_bits
gilles-peskine-arm Aug 5, 2019
3963993
Merge 'mbedtls/development' into merge-crypto-development-20190806
gilles-peskine-arm Aug 6, 2019
1b9505c
Correct some comments
gilles-peskine-arm Aug 7, 2019
49232e8
Avoid a lowercase letter in a macro name
gilles-peskine-arm Aug 7, 2019
86cef2a
Merge pull request #204 from gilles-peskine-arm/merge-crypto-developm…
gilles-peskine-arm Aug 7, 2019
b1f6c5f
Fix copypasta in test data
gilles-peskine-arm Aug 7, 2019
a6b2f60
Fix double free in psa_generate_key when psa_generate_random fails
gilles-peskine-arm Aug 7, 2019
bdc96fd
Add tests to generate more random than MBEDTLS_CTR_DRBG_MAX_REQUEST
gilles-peskine-arm Aug 7, 2019
f181eca
Fix psa_generate_random for >1024 bytes
gilles-peskine-arm Aug 7, 2019
82a5711
Merge pull request #197 from gilles-peskine-arm/psa-refactor-attribut…
gilles-peskine-arm Aug 8, 2019
0c77b0e
Merge pull request #198 from gilles-peskine-arm/psa-api-1.0-beta-merg…
gilles-peskine-arm Aug 8, 2019
91e8c33
Add infrastructure for key attribute flags
gilles-peskine-arm Aug 2, 2019
74f3352
Add missing guard around a union field
gilles-peskine-arm Aug 2, 2019
c8000c0
Add slot_number attribute
gilles-peskine-arm Aug 2, 2019
5fe5e27
Test slot_number attribute
gilles-peskine-arm Aug 2, 2019
5a68056
Rename internal macro to pass check-names.sh
gilles-peskine-arm Aug 5, 2019
013f547
Fix erasure of external flags
gilles-peskine-arm Aug 7, 2019
094dac1
Fix copypasta
gilles-peskine-arm Aug 7, 2019
edbed56
Rename psa_internal_allocate_key_slot to psa_get_empty_key_slot
gilles-peskine-arm Aug 7, 2019
0a23322
Improve documentation of the allocate method
gilles-peskine-arm Aug 5, 2019
ae9964d
Add validate_slot_number method to SE drivers
gilles-peskine-arm Aug 5, 2019
46d9439
Support slot_number attribute when creating a key
gilles-peskine-arm Aug 5, 2019
0a11044
Test restarting after creating a key in a specific slot
gilles-peskine-arm Aug 5, 2019
8aa7e9b
Merge branch 'psa-api-1.0-beta' into merge-psa-api-branch-into-develo…
yanesca Aug 8, 2019
059d9d3
Merge pull request #182 from gilles-peskine-arm/ecp-factorize-reduction
gilles-peskine-arm Aug 8, 2019
311809a
Merge pull request #201 from gilles-peskine-arm/psa-se_driver-set_key…
gilles-peskine-arm Aug 8, 2019
849b05a
Fix PSA tests
yanesca Aug 9, 2019
9d75202
Clarify and expand the documentation of the allocate/create sequence
gilles-peskine-arm Aug 9, 2019
fdbc544
Merge pull request #192 from gilles-peskine-arm/psa-test-policy_bad_a…
gilles-peskine-arm Aug 9, 2019
b231d99
Merge pull request #202 from gilles-peskine-arm/psa-se_driver-choose_…
gilles-peskine-arm Aug 9, 2019
df17914
psa_start_key_creation: take the method as a parameter
gilles-peskine-arm Jul 15, 2019
e88c2c1
Pass the key creation method to drivers
gilles-peskine-arm Aug 5, 2019
d772958
New function mbedtls_psa_register_se_key
gilles-peskine-arm Aug 5, 2019
a5f8749
SE key registration: call p_validate_slot_number
gilles-peskine-arm Aug 5, 2019
49bd582
Test the call to p_validate_slot_number when registering a key
gilles-peskine-arm Aug 5, 2019
5a2d152
Merge pull request #183 from gilles-peskine-arm/psa-se_driver-registe…
gilles-peskine-arm Aug 9, 2019
f3801ff
Update import_key and generate_key SE methods to the current API
gilles-peskine-arm Aug 6, 2019
1179208
SE keys: implement and smoke-test p_generate
gilles-peskine-arm Aug 6, 2019
edc6424
SE driver support: Implement sign and verify hooks
gilles-peskine-arm Aug 7, 2019
eecadde
SE support: Test sign and verify hooks with a passthrough driver
gilles-peskine-arm Aug 7, 2019
c068ded
RAM test driver: improve key creation
gilles-peskine-arm Aug 9, 2019
af906f8
RAM test driver: implement export_public
gilles-peskine-arm Aug 9, 2019
8df72f2
SE generate/sign/verify tests: also test export_public
gilles-peskine-arm Aug 9, 2019
30e13eb
Merge pull request #211 from gilles-peskine-arm/psa-se_driver-generat…
gilles-peskine-arm Aug 12, 2019
1d57a20
Make TODO comments consistent
yanesca Aug 13, 2019
40244bc
Fix the license header of hkdf
Jul 31, 2019
b4e73e9
Add some design notes about multipart operation structures
gilles-peskine-arm Aug 13, 2019
3f7cd62
Document better what wiping a key slot does not do
gilles-peskine-arm Aug 13, 2019
8fe253a
SE keys: test that psa_destroy_key removes the key from storage
gilles-peskine-arm Aug 13, 2019
caec278
SE keys: make psa_destroy_key remove the key from storage
gilles-peskine-arm Aug 13, 2019
9ce31c4
Note about destroying a key with other open handles
gilles-peskine-arm Aug 13, 2019
4b7f340
Clean up status code handling inside psa_destroy_key
gilles-peskine-arm Aug 13, 2019
5da7b3e
Drivers must have a psa_destroy_key method
gilles-peskine-arm Aug 13, 2019
c9d7f94
Add issue numbers for some missing parts of secure element support
gilles-peskine-arm Aug 13, 2019
0b74cf8
Remove psa_key_derivation() and associated static functions
k-stachowiak Aug 13, 2019
012dcc4
Remove PSA_PRE_1_0_KEY_DERIVATION and the corresponding code
k-stachowiak Aug 13, 2019
bbdf310
Merge pull request #221 from gilles-peskine-arm/annotate_todo_comment…
gilles-peskine-arm Aug 14, 2019
317f940
Merge pull request #144 from gilles-peskine-arm/oss-fuzz-fix-build-cr…
gilles-peskine-arm Aug 14, 2019
0ed1df6
Merge pull request #184 from hanno-arm/ecp_restartable_offset
gilles-peskine-arm Aug 14, 2019
3794dec
Change the expected error for two key derivation tests
k-stachowiak Aug 14, 2019
9d20e1f
Merge remote-tracking branch 'tls/development' into development
Patater Aug 15, 2019
24b8f9f
Merge pull request #223 from Patater/tls-development-20190815
Patater Aug 15, 2019
b9b4f09
Document new error type returned from the key derivation API
k-stachowiak Aug 15, 2019
c26591a
Merge pull request #196 from RonEld/fix_license_header
Patater Aug 16, 2019
89e7655
Merge remote-tracking branch 'crypto/pr/212' into development
Patater Aug 16, 2019
e8ad49f
Remove unused TG variable in mbedtls_mpi_gcd()
krizhanovsky Aug 16, 2019
c95d9ee
Remove a redundant function call
Apr 14, 2019
bee4861
ECDH: Add Everest Curve25519 to 3rdparty/everest
Oct 25, 2018
2a9684e
ECDH: Add VS2010 support files for Everest Curve25519
Oct 25, 2018
de4fcf2
ECDH: Add new ECDH context for Everest Curve25519
Oct 25, 2018
d5fd766
ECDH: Include Everest Curve25519 in build scripts
Oct 25, 2018
696deda
ECDH: Add new (non-legacy) ECDH benchmark
Oct 25, 2018
c9f737b
ECDH: Enable Everest Curve25519 in ECDH/ECDSA/ECP
Oct 25, 2018
6817b9e
ECDH: Add #ifdef filter to tests/scripts/list-enum-consts.pl
Oct 25, 2018
65bab97
ECDH: Rename full handshake benchmark
Dec 6, 2018
78c9c46
ECDH: Fix typo in ecdh.c
Dec 6, 2018
fba94e9
ECDH: Fix error code in mbedtls_ecdsa_sign
Dec 6, 2018
fb72367
ECDH: Remove old code from mbedtls_everest_make_params
Dec 6, 2018
86e36c4
ECDH: Replace hex literal with decimal in ecp.c
Dec 6, 2018
6acfbb5
ECDH: Add #ifdef to cleanly disable the Everest code
Dec 7, 2018
79acf95
ECDH: Improve ECDH full handshake benchmark
Dec 7, 2018
48d26c2
ECDH: Add Everest Curve25519 to VS project files
Dec 6, 2018
4936beb
ECDH: Clean up the interface to Everest code
Dec 12, 2018
999f3b5
ECDH: Remove YOTTA config #define
Dec 14, 2018
c3cbdde
ECDH: Fix whitespace, permissions
Dec 14, 2018
34811a8
ECDH: Use LOCAL_CFLAGS instead of CFLAGS
Dec 14, 2018
3c44962
ECDH: Fix error checks in benchmark.c
Dec 14, 2018
24fbcef
ECDH: Everest: Remove unnecessary file
Dec 14, 2018
2e724a1
ECDH: Fix Everest ECDH side type
Jan 7, 2019
62dddd0
Add new 3rdparty build scripts
Dec 14, 2018
7cc4c68
Fix preprocessor directive recognition in list-enum-consts.pl
Dec 14, 2018
1083a25
ECDH: Exclude FStar and Hacl* from exported symbol checks
Dec 14, 2018
8a0f5bb
Make check-names.sh find the right names in 3rdparty
Dec 14, 2018
0082f9d
ECDSA: Add mbedtls_ecdsa_can_do
Jan 7, 2019
ea24394
ECDH: Fix whitespace and permission problems
Jan 7, 2019
78450a3
ECDH: Disables MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED by default
Jan 17, 2019
405b371
Silences missing documentation warning for MBEDTLS_ECDH_VARIANT_EVERE…
Jan 17, 2019
6ea2dea
3rdparty: Add additional build facilities for 3rd-party code
Jan 21, 2019
9597238
ECDH: Make benchmarks check MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED
Feb 6, 2019
1fdf2c2
Fix build with gcc -Wshadow
gilles-peskine-arm Feb 11, 2019
20b3ef3
Add mbedtls_ecdh_can_do
gilles-peskine-arm Feb 11, 2019
d2085f5
Document that curve lists can include partially-supported curves
gilles-peskine-arm Feb 11, 2019
41fb2c0
ECDSA: Refactor return value checks for mbedtls_ecdsa_can_do
Feb 15, 2019
02174b9
3rdparty: Fix Makefile coding conventions
Feb 15, 2019
20819af
3rdparty: Adjust .gitignore
Feb 15, 2019
f43e1d9
3rdparty: Remove unnecessary copy of license file
Feb 15, 2019
5833de7
3rdparty: Update description of MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
Feb 15, 2019
ef17e3b
ECDSA: Fix formatting
Feb 15, 2019
3ff60bc
ECDH/ECDSA: Fix indentation
Feb 15, 2019
2d4725f
3rdparty: Rename THIRDPARTY_OBJECTS
Feb 15, 2019
9b5e77e
3rdparty: Use LOCAL_FLAGS instead of CFLAGS
Feb 15, 2019
737df0c
Fix file permissions
Feb 15, 2019
4061f04
ECDH: Remove unnecessary #include
Feb 15, 2019
cb31073
ECP: add Curve448 to ecp_supported_curves
Feb 15, 2019
f21aba4
3rdparty: Fix Everest platform detection for CMake
Feb 15, 2019
fb779f1
3rdparty: Pull Everest x25519 key size into macro
Feb 15, 2019
088ef49
3rdparty: Make proper use of mbedtls_platform_zeroize in Everest x25519
Feb 15, 2019
537f41e
3rdparty: Updated comments for Everest x25519
Feb 15, 2019
efdf4d7
ECDH: Fix Everest x25519 make_public
Feb 15, 2019
ac0e64d
ECDH: Removed unnecessary calls to mbedtls_ecp_group_load in ECDH ben…
Feb 15, 2019
2be66d4
ECDH: Remove duplicate lines of code
Feb 18, 2019
2f563e3
ECDH: Fix memory leaks due to context re-initialization
Feb 18, 2019
8592958
ECDH: Use macro-based sizes in Everest x25519
Feb 18, 2019
1b73a71
3rdparty: Fix .gitignore
Feb 18, 2019
e7e74ba
3rdparty: Improve Everest README.md
Feb 18, 2019
30bc9ce
ECDH: Fix context initialization
Feb 18, 2019
d8c45d5
Revert "ECDH: Fix context initialization"
Feb 20, 2019
bfc8eb2
Revert "ECDH: Fix memory leaks due to context re-initialization"
Feb 20, 2019
3b58700
ECDH: Fix use of ECDH API in full handshake benchmark
Feb 20, 2019
cf5603f
ECDH: Fix inclusion of platform.h for proper use of MBEDTLS_ERR_PLATF…
Feb 20, 2019
7ec367f
3rdparty: don't claim armcc support in Everest Readme.md
Feb 20, 2019
2c69d10
3rdparty: Adjust use of Everest in ecp_supported_curves
Feb 22, 2019
6e0cac1
3rdparty: Fix Everest build to not depend on build-time macros
Feb 22, 2019
26b98e1
3rdparty: Fix newlines and trailing whitespace
Feb 26, 2019
ec70771
3rdparty: fix paths in Everest build scripts
Apr 5, 2019
d64e1e1
3rdparty: Fix Everest header installation
Apr 8, 2019
7b747fc
3rdparty: fix inclusion order of CMakeLists.txt
Apr 8, 2019
f8d4c88
Update generated files
Apr 12, 2019
6212617
Fix macros in benchmark.c
Apr 15, 2019
19d5c80
3rdparty: Added config checks for Everest
Apr 15, 2019
0969eee
3rdparty: Fix Everest's mbedtls_x25519_get_params
Apr 15, 2019
09a24b3
Add Everest components to all.sh
gilles-peskine-arm Apr 12, 2019
c25df68
Fix code style
Apr 16, 2019
20082cb
Correct 3rdparty include path for Mbed TLS
yanesca Aug 20, 2019
e2e1995
Rename AEAD macro to not use double underscores
AndrzejKurek Aug 21, 2019
712f7a8
Add a check for double underscores in identifiers in check-names.sh
AndrzejKurek Aug 21, 2019
572a16e
Merge branch 'psa-api-1.0-beta' into api-to-development
dgreen-arm Aug 21, 2019
ecfd050
Merge pull request #230 from AndrzejKurek/remove-double-underscore
dgreen-arm Aug 21, 2019
b090d5d
Merge pull request #231 from dgreen-arm/api-to-development
Patater Aug 21, 2019
8013f44
Make crypto_struct C++ compatible
Patater Aug 16, 2019
71dcefb
Remove Mbed Crypto headers from everest_inc
yanesca Aug 21, 2019
c9ad591
crypto_se_driver: add mock tests
AndrzejKurek Jul 10, 2019
9fd6b0c
crypto_se_driver: add key generation mock and test
AndrzejKurek Jul 10, 2019
903b5da
crypto_se_driver: add an error injection mechanism to the mocks
AndrzejKurek Jul 10, 2019
136901c
crypto_se_driver: add public key exporting test
AndrzejKurek Jul 11, 2019
b7656a8
crypto_se_driver: add signing mock test
AndrzejKurek Jul 11, 2019
f740b0a
crypto_se_driver: add verification mock test
AndrzejKurek Jul 11, 2019
4abb40c
Clean up core storage between tests
Patater Jul 30, 2019
74c932e
Parametrize key bits in import mock test
dgreen-arm Aug 16, 2019
0892d0f
Initialize key bits to max size + 1 in psa_import_key
dgreen-arm Aug 20, 2019
de4453d
Merge pull request #174 from dgreen-arm/psa-se-driver-hooks
Patater Aug 22, 2019
203491c
Remove duplicated information in psa_open_key
athoelke Aug 21, 2019
9741b11
Update psa_open_key documentation
athoelke Aug 21, 2019
3daba81
Update documentation for psa_close_key
athoelke Aug 21, 2019
07f16b7
Update documentation for psa_destroy_key
athoelke Aug 21, 2019
3c2b803
Cross reference 'key handles' from INVALID_HANDLE
athoelke Aug 22, 2019
8824dae
Editorial fixes.
athoelke Aug 22, 2019
b14a48b
Merge pull request #235 from athoelke/at-key-handles
Patater Aug 23, 2019
85c78b4
Merge pull request #225 from RonEld/iotssl_2739
Patater Aug 23, 2019
932e496
Merge pull request #224 from tempesta-tech/development
Patater Aug 27, 2019
884738a
getting_started: Update for PSA Crypto API 1.0b3
Patater Aug 16, 2019
c7529c9
crypto_extra: Use const seed for entropy injection
Patater Aug 19, 2019
f89cc69
psa: Don't duplicate policy initializer
Patater Aug 20, 2019
39f03fc
psa: Add PSA_KEY_ID_INIT
Patater Aug 20, 2019
e3cdf28
psa: Adapt set_key_id() for when owner is included
Patater Aug 20, 2019
6fa62a5
psa: Use application key ID where necessary
Patater Aug 20, 2019
21db2a9
Merge pull request #229 from k-stachowiak/IOTCRYPT-791-remove-legacy-…
Patater Aug 29, 2019
98d5685
Merge pull request #232 from Patater/psa-crypto-api-1.0b3
Patater Aug 29, 2019
f071654
Merge pull request #140 from yanesca/everest_integration
Patater Aug 29, 2019
a823d4c
HMAC DRBG: Split entropy-gathering requests to reduce request sizes
Aug 27, 2019
822b8f6
Merge pull request #238 from hanno-arm/hmac_drbg_entropy_incompatibil…
Patater Aug 30, 2019
03d2daf
Enable 64-bit limbs for all Aarch64 builds.
Ko- Aug 16, 2018
cc1871e
Add optimized bignum multiplication for Aarch64.
Ko- Aug 16, 2018
05cff95
Make GNUC-compatible compilers use the right mbedtls_t_udbl again on …
Ko- Aug 20, 2018
cb260bb
Fix -O0 build for Aarch64 bignum multiplication.
Ko- Aug 20, 2018
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
  •  
  •  
  •  
69 changes: 36 additions & 33 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
Note: This is just a template, so feel free to use/remove the unnecessary things
<!--

### Description
- Type: Bug | Enhancement\Feature Request | Question
- Priority: Blocker | Major | Minor

---------------------------------------------------------------
## Bug

**OS**
Mbed OS|linux|windows|

**mbed TLS build:**
Version: x.x.x or git commit id
OS version: x.x.x
Configuration: please attach config.h file where possible
Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Additional environment information:
************************************** WARNING **************************************

**Peer device TLS stack and version**
OpenSSL|GnuTls|Chrome|NSS(Firefox)|SecureChannel (IIS/Internet Explorer/Edge)|Other
Version:
The ciarcom bot parses this header automatically. Any deviation from the
template may cause the bot to automatically correct this header or may result in a
warning message, requesting updates.

**Expected behavior**
Please ensure that nothing follows the Issue request type section, all
issue details are within the Description section and no changes are made to the
template format (as detailed below).

**Actual behavior**
*************************************************************************************

**Steps to reproduce**
-->

----------------------------------------------------------------
## Enhancement\Feature Request

**Justification - why does the library need this feature?**

**Suggested enhancement**

-----------------------------------------------------------------
### Description

## Question
<!--
Required
Add detailed description of what you are reporting.
Good example: https://os.mbed.com/docs/latest/reference/workflow.html
Things to consider sharing:
- What target does this relate to?
- What toolchain (name + version) are you using?
- What tools (name + version - is it mbed-cli, online compiler or IDE) are you using?
- What is the SHA of Mbed OS (git log -n1 --oneline)?
- Steps to reproduce. (Did you publish code or a test case that exhibits the problem?)
-->


### Issue request type

<!--
Required
Please add only one X to one of the following types. Do not fill multiple types (split the issue otherwise.)
Please note this is not a GitHub task list, indenting the boxes or changing the format to add a '.' or '*' in front
of them would change the meaning incorrectly. The only changes to be made are to add a description text under the
description heading and to add a 'x' to the correct box.
-->
[ ] Question
[ ] Enhancement
[ ] Bug

**Please first check for answers in the [Mbed TLS knowledge Base](https://tls.mbed.org/kb), and preferably file an issue in the [Mbed TLS support forum](https://forums.mbed.com/c/mbed-tls)**
39 changes: 0 additions & 39 deletions .github/pull_request_template.md

This file was deleted.

4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,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:
- SEED=1
Expand Down
1 change: 1 addition & 0 deletions 3rdparty/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Makefile
11 changes: 11 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
list (APPEND thirdparty_src)
list (APPEND thirdparty_lib)
list (APPEND thirdparty_inc)
list (APPEND thirdparty_def)

add_subdirectory(everest)

set(thirdparty_src ${thirdparty_src} PARENT_SCOPE)
set(thirdparty_lib ${thirdparty_lib} PARENT_SCOPE)
set(thirdparty_inc ${thirdparty_inc} PARENT_SCOPE)
set(thirdparty_def ${thirdparty_def} PARENT_SCOPE)
5 changes: 5 additions & 0 deletions 3rdparty/Makefile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ifeq ($(INCLUDING_FROM_MBEDTLS), 1)
include ../crypto/3rdparty/everest/Makefile.inc
else
include ../3rdparty/everest/Makefile.inc
endif
2 changes: 2 additions & 0 deletions 3rdparty/everest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.o
Makefile
31 changes: 31 additions & 0 deletions 3rdparty/everest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
list (APPEND everest_src)
list (APPEND everest_inc)
list (APPEND everest_def)

set(everest_src
${CMAKE_CURRENT_SOURCE_DIR}/library/everest.c
${CMAKE_CURRENT_SOURCE_DIR}/library/x25519.c
${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519_joined.c
)

list(APPEND everest_inc ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/everest ${CMAKE_CURRENT_SOURCE_DIR}/include/everest/kremlib)

execute_process(COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/config.pl -f ${CMAKE_CURRENT_SOURCE_DIR}/../../include/mbedtls/config.h get MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED RESULT_VARIABLE result)

if(${result} EQUAL 0)

if(INSTALL_MBEDTLS_HEADERS)

install(DIRECTORY include/everest
DESTINATION include
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
FILES_MATCHING PATTERN "*.h")

endif(INSTALL_MBEDTLS_HEADERS)

endif()

set(thirdparty_src ${thirdparty_src} ${everest_src} PARENT_SCOPE)
set(thirdparty_inc ${thirdparty_inc} ${everest_inc} PARENT_SCOPE)
set(thirdparty_def ${thirdparty_def} ${everest_def} PARENT_SCOPE)
6 changes: 6 additions & 0 deletions 3rdparty/everest/Makefile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
THIRDPARTY_INCLUDES+=-I../3rdparty/everest/include -I../3rdparty/everest/include/everest -I../3rdparty/everest/include/everest/kremlib

THIRDPARTY_CRYPTO_OBJECTS+= \
../3rdparty/everest/library/everest.o \
../3rdparty/everest/library/x25519.o \
../3rdparty/everest/library/Hacl_Curve25519_joined.o
5 changes: 5 additions & 0 deletions 3rdparty/everest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The files in this directory stem from [Project Everest](https://project-everest.github.io/) and are distributed under the Apache 2.0 license.

This is a formally verified implementation of Curve25519-based handshakes. The C code is automatically derived from the (verified) [original implementation](https://github.com/project-everest/hacl-star/tree/master/code/curve25519) in the [F* language](https://github.com/fstarlang/fstar) by [KreMLin](https://github.com/fstarlang/kremlin). In addition to the improved safety and security of the implementation, it is also significantly faster than the default implementation of Curve25519 in mbedTLS.

The caveat is that not all platforms are supported, although the version in `everest/library/legacy` should work on most systems. The main issue is that some platforms do not provide a 128-bit integer type and KreMLin therefore has to use additional (also verified) code to simulate them, resulting in less of a performance gain overall. Explictly supported platforms are currently `x86` and `x86_64` using gcc or clang, and Visual C (2010 and later).
21 changes: 21 additions & 0 deletions 3rdparty/everest/include/everest/Hacl_Curve25519.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */

/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -fc89 -fparentheses -fno-shadow -header /mnt/e/everest/verify/hdrcLh -minimal -fbuiltin-uint128 -fc89 -fparentheses -fno-shadow -header /mnt/e/everest/verify/hdrcLh -minimal -I /mnt/e/everest/verify/hacl-star/code/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -ccopt -march=native -verbose -ldopt -flto -tmpdir x25519-c -I ../bignum -bundle Hacl.Curve25519=* -minimal -add-include "kremlib.h" -skip-compilation x25519-c/out.krml -o x25519-c/Hacl_Curve25519.c
* F* version: 059db0c8
* KreMLin version: 916c37ac
*/



#ifndef __Hacl_Curve25519_H
#define __Hacl_Curve25519_H


#include "kremlib.h"

void Hacl_Curve25519_crypto_scalarmult(uint8_t *mypublic, uint8_t *secret, uint8_t *basepoint);

#define __Hacl_Curve25519_H_DEFINED
#endif
Loading