Ryan Everett
d1e398c374
Protect psa_key_derivation_input_bytes
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-07 17:32:16 +00:00
David Horstmann
18dc032fb4
Prevent unused warnings in psa_aead_set_nonce()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
e000a0aedf
Add buffer copying to psa_aead_verify()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
6db0e73dc4
Add buffer copying to psa_aead_finish()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
2914fac28a
Add buffer copying to psa_aead_update()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
25dac6edc1
Add buffer copying to psa_aead_update_ad()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
fed23777f3
Refactor: Use wrapper around internal set_nonce()
...
* Rename psa_aead_set_nonce() to psa_aead_set_nonce_internal()
* Recreate psa_aead_set_nonce() as a wrapper that copies buffers before
calling the internal function.
This is because psa_aead_set_nonce() is currently called by
psa_aead_generate_nonce(). Refactoring this to call the static internal
function avoids an extra set of buffer copies as well as simplifying
future memory poisoning testing.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
8f0ef519d4
Add buffer copying to psa_aead_set_nonce()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
d3cad8b017
Add buffer copying to psa_aead_generate_nonce()
...
Note that this is not strictly necessary as this function only copies to
the output buffer at the end. However, it simplifies testing for the
time being.
Future optimisation work could consider removing this copying.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:02 +00:00
David Horstmann
7f2e040a9b
Add buffer copying to psa_aead_decrypt()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:39:00 +00:00
David Horstmann
9d09a020c9
Copy buffers in psa_aead_encrypt()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-06 13:38:20 +00:00
Dave Rodgman
e883870cc7
Merge branch 'development-restricted' into update-development-r
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-02 18:03:29 +00:00
Ryan Everett
35f68533d8
Conditionally guard exit label to deter unused label error
...
Co-authored-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:33:09 +00:00
Ryan Everett
b1d2c67ee0
Protect buffer in psa_export_public_key
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:33:09 +00:00
Ryan Everett
45ac526592
Protect the buffer in psa_export_key
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:33:09 +00:00
Ryan Everett
f028fe195b
Protect buffer in psa_import_key
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:33:09 +00:00
Thomas Daubney
3e65f52130
Conditionally guard exit label
...
...on functions where the label was only added
due to the modifications required by this PR.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-01-30 12:37:25 +00:00
Thomas Daubney
4f8847bb5d
Implement safe buffer copying in asymmetric signature API
...
Use local copy buffer macros to implement safe
copy mechanism in asymmetric signature API.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-01-30 12:17:54 +00:00
Tom Cosgrove
f35d24479e
Merge pull request #1166 from daverodgman/ct-cmac
...
Use ct module from cmac
2024-01-30 09:54:02 +01:00
Dave Rodgman
64172bc2ec
Use constant_time module from cmac
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-29 12:41:02 +00:00
Dave Rodgman
047c724c22
Merge remote-tracking branch 'restricted/development-restricted' into update-development-r
...
Conflicts:
programs/Makefile
tests/scripts/check-generated-files.sh
2024-01-26 12:42:51 +00:00
Dave Rodgman
935182fe2b
Merge pull request #1158 from daverodgman/mbedtls-3.5.2rc
...
Mbedtls 3.5.2rc
2024-01-25 12:22:54 +00:00
Dave Rodgman
f5e231ca84
Merge pull request #8719 from daverodgman/iar-codegen
...
Improve codegen of unaligned access for IAR and gcc
2024-01-25 08:31:45 +00:00
David Horstmann
c75639daa0
Add copying to PAKE input and output
...
Add buffer copying to:
* psa_pake_input()
* psa_pake_output()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-01-24 15:42:11 +00:00
David Horstmann
4f534ae9c2
Add copying in PAKE set peer and user functions
...
Add copying to:
* psa_pake_set_user()
* psa_pake_set_peer()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-01-24 15:42:11 +00:00
Gabor Mezei
1882c51cb3
Add allocate and copy style output buffer handling
...
Add a new macro `LOCAL_OUTPUT_ALLOC_WITH_COPY` to support the output buffer
handling of the multipart operations like `psa_cipher_update`. This will
allocate a local buffer and copy the content of the original buffer.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-01-24 13:51:33 +01:00
Dave Rodgman
13f2f4e7f1
Merge remote-tracking branch 'restricted/development' into mbedtls-3.5.2rc
2024-01-24 09:49:15 +00:00
Janos Follath
aa3fa98bc4
Merge pull request #8726 from v1gnesh/patch-1
...
Update entropy_poll.c to allow build in z/OS
2024-01-23 12:43:18 +00:00
Dave Rodgman
c64280a2d7
Fix comment typo
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-23 10:05:08 +00:00
Dave Rodgman
00b530e395
Limit compiler hint to compilers that are known to benefit from it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-23 09:41:34 +00:00
Dave Rodgman
e23d6479cc
Bump version
...
./scripts/bump_version.sh --version 3.5.1
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-22 15:45:49 +00:00
Janos Follath
b4b8f3df3b
RSA: improve readability
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Janos Follath
47ee770812
RSA: remove unneeded temporaries
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Janos Follath
e6750b2a0b
RSA: document Montgomery trick in unblind
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Janos Follath
a62a554071
Fix style
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Janos Follath
100dcddfca
Make local function static
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Janos Follath
6bcbc925bf
Extend blinding to RSA result check
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Janos Follath
d6b096532c
Make RSA unblinding constant flow
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-01-22 15:33:19 +00:00
Jonathan Winzig
a0c9448bea
Update fix to be more platform-independent
...
Co-authored-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com>
2024-01-22 15:31:05 +00:00
Jonathan Winzig
63b5e216f8
Fix Issue #8687
...
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com>
2024-01-22 15:31:05 +00:00
v1gnesh
3c129dd6aa
Update entropy_poll.c
...
Signed-off-by: v1gnesh <v1gnesh@users.noreply.github.com>
2024-01-22 15:59:49 +05:30
Manuel Pégourié-Gonnard
34c6e8a770
Merge pull request #8700 from valeriosetti/issue8461
...
psa_asymmetric_encrypt() doesn't work with opaque driver
2024-01-22 08:43:08 +00:00
Janos Follath
fb12d9204d
Merge pull request #8693 from Ryan-Everett-arm/implement-key-slot-mutex
...
Implement the key slot mutex
2024-01-19 20:49:18 +00:00
Dave Rodgman
075f8797ac
Remove include of build_info.h
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 16:48:42 +00:00
Dave Rodgman
336efeec50
Move MBEDTLS_COMPILER_IS_GCC & MBEDTLS_GCC_VERSION into build_info
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 16:38:53 +00:00
Dave Rodgman
00b4eeb0b3
Improve comments
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 16:14:55 +00:00
Dave Rodgman
2143a4ad1f
Improve mbedtls_xor docs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 15:25:33 +00:00
Dave Rodgman
18d90d7519
Make mbedtls_xor always inline
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 15:25:33 +00:00
Dave Rodgman
55b5dd2cfc
Make unaligned accessors always inline
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 15:25:33 +00:00
Dave Rodgman
c581264977
Fix unaligned access on old compilers
...
Add an alternative implementation of unaligned access that is efficient
for IAR and old versions of gcc.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-19 15:25:33 +00:00