Dave Rodgman
09a9e589c1
Add missing error conversion case
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-31 11:05:22 +01:00
Dave Rodgman
68efcf56ed
Remove not-needed #include
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-31 10:09:05 +01:00
Dave Rodgman
787011542b
Fully replace mbedtls_psa_safer_memcmp
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 14:20:18 +01:00
Dave Rodgman
f4efd19dd0
Reduce code size in ccm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 22:37:32 +01:00
Dave Rodgman
509b567911
add ifdefs to reduce size of mbedtls_to_psa_error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 22:37:29 +01:00
Dave Rodgman
6f6820345a
add #ifdefs to reduce switch size
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 18:44:32 +01:00
Dave Rodgman
864f594acc
Adjust layout of some stucts
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 18:04:44 +01:00
Dave Rodgman
164614af3d
Reduce code-size to access key slots init flag
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 17:56:28 +01:00
Dave Rodgman
58c8b942d2
Eliminate redundant version of mbedtls_ct_memcmp
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 17:51:04 +01:00
Dave Rodgman
6a9fb932fb
Use MBEDTLS_GET_UINT16_BE in mbedtls_ecp_tls_read_group_id
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-16 17:50:36 +01:00
Gilles Peskine
a4c01dd6e9
Merge pull request #7991 from sarveshb14/fix/psa_rsa_signature_using_large_stack
...
rsa_signature: Use heap memory to allocate DER encoded RSA private key
2023-08-16 09:23:29 +00:00
Gilles Peskine
d370f93898
Merge pull request #7898 from AndrzejKurek/csr-rfc822-dn
...
OPC UA - add support for RFC822 and DirectoryName SubjectAltNames when generating CSR's
2023-08-16 09:19:46 +00:00
David Horstmann
ba44e918b8
Remove unnecessary include from constant_time.c
...
This was added in order to use TEST_CF_XYZ macros which have since been
removed.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-15 15:17:22 +01:00
Dave Rodgman
e3330f86d2
Make naming more consistent
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-14 15:26:28 +01:00
Dave Rodgman
0b7bf876e4
Fix compile fail for empty enum in cipher_wrap
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-14 14:25:29 +01:00
Dave Rodgman
2f4e6e748c
Merge pull request #8066 from paul-elliott-arm/aes_memcpy_iv_fix
...
Fix potential corruption of IV for AES CBC with zero length
2023-08-14 09:32:45 +01:00
Paul Elliott
2ad93674dc
Fix potential corruption of IV for AES CBC
...
If passed a zero length, AES CBC could potentially corrupt the passed
in IV by memcpying it over itself. Although this might be ok with
more recent compilers, its not for every compiler we support. Found
by coverity.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-08-11 17:04:06 +01:00
Valerio Setti
711f853b48
ssl_tls13: fix guard for FFDH function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:33:52 +02:00
Manuel Pégourié-Gonnard
54da1a69a2
Merge pull request #7578 from daverodgman/safer-ct5
...
Improve constant-time interface
2023-08-10 16:57:39 +00:00
Dave Rodgman
48fb8a3448
Fix some renames that were missed
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 14:01:51 +01:00
Dave Rodgman
b364a22adf
Fix mbedtls_ct_size_if_else_0 docs
...
Co-authored-by: Tom Cosgrove <tom.cosgrove@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:25:25 +01:00
Dave Rodgman
38b227c16b
Improve docs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:18:27 +01:00
Dave Rodgman
ac69b45486
Document and test mbedtls_ct_size_if_else_0
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:18:13 +01:00
Dave Rodgman
065f912465
Fix comment typo
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:11:58 +01:00
Dave Rodgman
98ddc01a7c
Rename ...if0 to ...else_0
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:11:31 +01:00
Dave Rodgman
b7825ceb3e
Rename uint->bool operators to reflect input types
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 11:58:18 +01:00
Manuel Pégourié-Gonnard
6beec7ca5e
Merge pull request #7989 from valeriosetti/issue7754
...
driver-only ECC: BN.PK testing
2023-08-10 09:43:56 +00:00
Manuel Pégourié-Gonnard
d170419eab
Merge pull request #7999 from valeriosetti/issue7759
...
Driver-only ECC: TLS: rm uses of mbedtls_debug_print_mpi
2023-08-10 08:34:57 +00:00
Manuel Pégourié-Gonnard
91c8372c01
Merge pull request #6999 from ivq/ecp_doc
...
Doc: Add note on special use of A in ecp group structure
2023-08-10 08:24:05 +00:00
Dave Rodgman
e5fbd93eaf
Merge pull request #8049 from daverodgman/bignum_codesize_misc
...
Bignum codesize misc
2023-08-10 10:58:13 +01:00
Valerio Setti
e1d7c9dabd
pkwrite: fix internal buffer size in pk_write_ec_pubkey()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:40:18 +02:00
Valerio Setti
a7c9e09dd0
pkwrite: add new internal symbol to properly size DER buffer
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
97b28f81d8
pkparse: remove unnecessary header
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
7dccb66d49
test: disable RSA support on the test ecc_no_bignum component
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
ca4c15dd25
debug: remove redundant variable assignments
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:41:31 +02:00
Dave Rodgman
960eca997d
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-09 20:43:18 +01:00
Dave Rodgman
4883f109a0
Reduce code size for exp_mod_get_window_size
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-09 20:42:54 +01:00
Dave Rodgman
ebcd78561c
Remove redundant code in mbedtls_mpi_cmp_abs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-09 18:57:22 +01:00
Dave Rodgman
fa703e38a2
Use __builtin_ctz to count trailing zeros
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-09 18:56:07 +01:00
Dave Rodgman
f3df105b37
Generate smaller code for picking a sign value
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-09 18:55:41 +01:00
Paul Elliott
2f12a29cdd
Merge pull request #7896 from AgathiyanB/gitignore-generated-files-toggle
...
Add script to toggle ignoring generated files
2023-08-09 14:54:32 +00:00
Gilles Peskine
444d1e7608
Merge pull request #8036 from tom-cosgrove-arm/fix-rijndael-and-drbg-pdf-links
...
Update links to Rijndael paper and NIST SP 800-90 DRBGs
2023-08-07 19:15:58 +00:00
Gilles Peskine
a79256472c
Merge pull request #7788 from marekjansta/fix-x509-ec-algorithm-identifier
...
Fixed x509 certificate generation to conform to RFCs when using ECC key
2023-08-07 19:14:54 +00:00
Chien Wong
153ae464db
Improve doc on special use of A in ecp group structure
...
Signed-off-by: Chien Wong <m@xv97.com>
2023-08-07 23:02:31 +08:00
Dave Rodgman
c98f8d996a
Merge branch 'development' into safer-ct5
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-07 11:47:35 +01:00
Tom Cosgrove
ce37c5e1ce
Update links to Rijndael paper and NIST SP 800-90 DRBGs
...
The link to the DRBG paper points to the March 2007 version, the same as the
original link (rather than the latest version).
The amended Rijndael paper has a two-page "Note on naming" prefix.
Fixes #7193
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-08-04 13:55:03 +01:00
Janos Follath
73568397a5
Merge pull request #8020 from yanesca/de-duplicate_ecp
...
De duplicate the ECP module
2023-08-04 08:27:09 +00:00
Dave Rodgman
003a5e1ca7
Merge pull request #1046 from Mbed-TLS/merge_3.4.1
...
Merge 3.4.1
2023-08-03 18:23:37 +01:00
Dave Rodgman
a0fc9987da
Merge branch 'development' into merge_3.4.1
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-03 15:56:59 +01:00
Dave Rodgman
6f80ac4979
Merge pull request #7864 from waleed-elmelegy-arm/enforce-min-RSA-key-size
...
Enforce minimum key size when generating RSA key size
2023-08-03 12:57:52 +00:00