f5fedf1e0d
Add pbkdf2 to psa_key_derivation_abort
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:37 +05:30
3128c5d9ce
Enable can_output_key with PSA_KEY_DERIVATION_INPUT_PASSWORD
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:37 +05:30
24b3895dee
Add pbkdf2 input functions to psa_key_derivation_input_internal
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:36 +05:30
f4fe3ee9e4
Add input password function for pbkdf2
...
Also adds PSA_KEY_DERIVATION_INPUT_PASSWORD case handling to
psa_key_derivation_check_input_type function
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:36 +05:30
547a6c6fd1
add input salt function for pbkdf2
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:36 +05:30
944bba1e30
Add input cost function for pbkdf2
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:36 +05:30
d132cacb38
Add pbkdf2_hmac to is_kdf_alg_supported()
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:35 +05:30
af0b534256
Add pbkdf2 to ATLEAST_ONE_BUILTIN_KDF definition
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:35 +05:30
dcfa548293
Add pbkdf2 to key_derivation context struct
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:35 +05:30
30ced52497
Add pbkdf2 struct to crypto_builtin_key_derivation.h
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:35 +05:30
876e2c2424
Add psa_pbkdf2_key_derivation_state_t
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:34 +05:30
83baf8968d
Add builtin PBKDF2_HMAC definition in config_psa.h
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:34 +05:30
aca31654e6
Enable PSA_WANT_ALG_PBKDF2_HMAC in crypto_config.h
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-03 14:20:34 +05:30
e22413c8df
Use mbedtls_ct_uint_if() rather than mbedtls_ct_cond_select_sign()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-05-03 09:44:01 +01:00
b567f8326d
Halve size of mbedtls_error_pair_t
...
All PSA crypto error codes fit comfortably in 16 bits and we have no plans
to ever change this. So use 16 bits to store them, which reduces
mbedtls_error_pair_t from 8 bytes to 4 bytes.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-05-02 21:40:07 +02:00
d3ca5e5897
Merge pull request #7328 from mprse/ec-jpake-fix1
...
Fix the JPAKE driver interface for user+peer
2023-05-02 20:42:25 +02:00
c70d9eab8a
Merge pull request #7412 from silabs-Kusumit/PBKDF2_implementation
...
PBKDF2: Implement input_integer
2023-05-02 20:41:23 +02:00
7ce8fba3cb
Add post-build step to update redirects
...
This allows us to maintain the list of redirects in-tree.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-05-02 20:16:12 +02:00
4f4c87b01e
Add readthedocs-cli to requirements.in
...
This will allow us to manage our redirects in-tree.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2023-05-02 19:59:34 +02:00
9a855f21aa
test: check for exact length of returned pub key
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
f5451717af
test: optimize code for pk_write_public_from_private()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
84554e9830
test: use better naming for the newly introduced test function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
2d81499026
pk: fix position for mbedtls_platform_zeroize
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
8820b57b6e
test: fix makefile for ec_pub.[der/pem] generation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
d860a79029
test: fix wrong private key file
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
1751341b68
test: add test function for public key derivation starting from private one
...
Data test cases are also included in the commit.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
2c50526476
pk: fix: clear buffer holding raw EC private key on exit
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
c8b7865612
test: align ec_pub public keyfile with its ec_prv.sec1 counterpart
...
This change affects:
- both PEM and DER files, since they contain the same public key
only in different formats
- "ec_pub.comp.pem" since it's the same as "ec_pub.pem" but in
compressed format
The makefile was also updated accordingly to reflect these
dependencies.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-05-02 15:45:39 +02:00
8e076e4132
Merge pull request #6915 from aditya-deshpande-arm/example-driver-post-codestyle
...
Document (with examples) how to integrate a third-party driver with Mbed TLS
2023-05-02 12:13:42 +02:00
f317df98ea
Merge pull request #7461 from valeriosetti/issue7460-part1
...
Fixing USE_PSA_INIT/DONE in SSL/X509/PK test suites
2023-05-02 10:44:13 +02:00
d60dfc0e43
Add test for parse_binary_string
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-05-02 10:47:50 +05:30
6f400a376e
Disallow leading zeroes when parsing IPv4 addresses
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-05-01 06:23:42 -04:00
8225587fd7
Change from Mbed TLS 3.3.0 to 3.4.0 in driver documentation.
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:55:02 +01:00
641cb8914d
Minor changes to documentation and code comments for clarity
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:55:02 +01:00
7b9934dcdd
Add support for building p256-m alongside Mbed TLS with CMake.
...
Also check if p256-m is enabled in the config before including the contents of p256-m.c
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:55 +01:00
ac363d8d20
Migrate p256-m_driver_entrypoints.[hc] to new code style
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
ebd624e691
Minor formatting change to driver wrapper jinja template
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
f100f00679
Add warnings to documentation stating that p256-m code may be out of date with upstream, plus other minor grammatical fixes.
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
be55bb2d5d
Use psa_generate_random() instead of mbedtls_ctr_dbrg
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
8d99f2590c
Add 3rdparty license information to the README
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
045b370c66
Add SPDX license identifiers to driver entry point files
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
a8d663d3af
Add README and license from the p256-m repo
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
bac592d53e
Remove rand() from p256_generate_random() and move to an implementation based on mbedtls_ctr_drbg
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
caed18e741
Add README in p256-m/
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
a9612d00a4
Remove unnecessary no-check-names comments
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
f80b939096
Add information for driver points where auto-generation is implemented
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
755b174fec
Add example for integrating a driver alongside Mbed TLS for entrypoints where auto-generation of driver wrappers is not implemented yet.
...
Using p256-m as the example driver/software accelerator.
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
695e44b5a0
Rename p256m to p256 for uniform function/macro prefixes
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
abf4bf31cb
Start the driver example write-up (p256-m integration)
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00
277690e944
Add step-by-step guide for writing and integrating drivers for entry points where auto-generation is not implemented
...
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com >
2023-04-28 17:54:15 +01:00