From e87790baba46d7cfb278a6e4c40ed59b72d070d2 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Wed, 8 Dec 2021 17:38:07 +0000 Subject: [PATCH 01/10] Update changelog This patch adds explicit wording to state that Two's complement is the official supported signed integer representation. Signed-off-by: Minos Galanakis --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index ebf8a36ad..9cffd5d5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -488,6 +488,9 @@ New deprecations deprecated. * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH have been renamed, and the old names deprecated. + * Signed magnitude and one's complement implementations for signed integers are + are now officially not supported. Two's Complement is the only supported + implementation going forward. Features * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. From c42cadb54a7bd9b26837abce449599dd7e429d5b Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Thu, 9 Dec 2021 13:16:54 +0000 Subject: [PATCH 02/10] Updated readme This patch adds explicit implementation requirements for platforms architecture dependencies Signed-off-by: Minos Galanakis --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ea1d7a37b..9f1e43aed 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,15 @@ Mbed TLS can be ported to many different architectures, OS's and platforms. Befo - [What external dependencies does Mbed TLS rely on?](https://tls.mbed.org/kb/development/what-external-dependencies-does-mbedtls-rely-on) - [How do I configure Mbed TLS](https://tls.mbed.org/kb/compiling-and-building/how-do-i-configure-mbedtls) +Mbed TLS is mostly written in portable C99; however, it has a few platform requirements that go beyond the standard, but are met by most modern architectures: + +- bytes must be 8 bits +- all-bits-zero must be a valid representation of the NULL pointer +- signed integers must be represented using two's complement +- integers must not have padding bits in their representation +- `int` and `size_t` must be at least 32 bits wide +- the types `uint8_t`, `uint16_t`, `uint32_t` and their signed equivalents must be available. + PSA cryptography API -------------------- From d7547fcb5d7ed6a983fc1990a8950e9fac946808 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Thu, 9 Dec 2021 15:06:16 +0000 Subject: [PATCH 03/10] readme: Addressed review comments Signed-off-by: Minos Galanakis --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9f1e43aed..f2e810e7f 100644 --- a/README.md +++ b/README.md @@ -254,12 +254,11 @@ Mbed TLS can be ported to many different architectures, OS's and platforms. Befo Mbed TLS is mostly written in portable C99; however, it has a few platform requirements that go beyond the standard, but are met by most modern architectures: -- bytes must be 8 bits -- all-bits-zero must be a valid representation of the NULL pointer -- signed integers must be represented using two's complement -- integers must not have padding bits in their representation -- `int` and `size_t` must be at least 32 bits wide -- the types `uint8_t`, `uint16_t`, `uint32_t` and their signed equivalents must be available. +- Bytes must be 8 bits. +- `all-bits-zero` must be a valid representation of a null pointer. +- Signed integers must be represented using two's complement. +- `int` and `size_t` must be at least 32 bits wide. +- The types `uint8_t`, `uint16_t`, `uint32_t` and their signed equivalents must be available. PSA cryptography API -------------------- From 0f2a46c1cfc626f9bb4b81c4e33d26b463118323 Mon Sep 17 00:00:00 2001 From: minosgalanakis <30719586+minosgalanakis@users.noreply.github.com> Date: Thu, 9 Dec 2021 15:38:39 +0000 Subject: [PATCH 04/10] readme: Addressed review comments #2 Signed-off-by: Minos Galanakis Co-authored-by: davidhorstmann-arm <70948878+davidhorstmann-arm@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2e810e7f..7e44f218f 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,7 @@ Mbed TLS can be ported to many different architectures, OS's and platforms. Befo Mbed TLS is mostly written in portable C99; however, it has a few platform requirements that go beyond the standard, but are met by most modern architectures: - Bytes must be 8 bits. -- `all-bits-zero` must be a valid representation of a null pointer. +- All-bits-zero must be a valid representation of a null pointer. - Signed integers must be represented using two's complement. - `int` and `size_t` must be at least 32 bits wide. - The types `uint8_t`, `uint16_t`, `uint32_t` and their signed equivalents must be available. From ca14ab3c2e2c9a2f9e755f65a7296da08acc5f0e Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 10 Dec 2021 09:21:37 +0000 Subject: [PATCH 05/10] changelog: Addressed review comments Signed-off-by: Minos Galanakis --- ChangeLog | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cffd5d5e..bb6e0060f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -489,8 +489,7 @@ New deprecations * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH have been renamed, and the old names deprecated. * Signed magnitude and one's complement implementations for signed integers are - are now officially not supported. Two's Complement is the only supported - implementation going forward. + not supported. Two's complement is the only supported implementation. Features * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. From 3a77949c895f51cbcb92383b52088b60099f4913 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 10 Dec 2021 10:45:37 +0000 Subject: [PATCH 06/10] changelog: Addressed review comments #2 Signed-off-by: Minos Galanakis --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb6e0060f..e9a75af2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -488,8 +488,8 @@ New deprecations deprecated. * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH have been renamed, and the old names deprecated. - * Signed magnitude and one's complement implementations for signed integers are - not supported. Two's complement is the only supported implementation. + * Signed magnitude and one's complement representations for signed integers are + not supported. Two's complement is the only supported representation. Features * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. From 3f46f3809548ba9906c17a3f6c32c4be74aa864f Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 10 Dec 2021 10:54:06 +0000 Subject: [PATCH 07/10] changelog: Addressed review comments #3 Signed-off-by: Minos Galanakis --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e9a75af2e..efa77e563 100644 --- a/ChangeLog +++ b/ChangeLog @@ -488,7 +488,7 @@ New deprecations deprecated. * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH have been renamed, and the old names deprecated. - * Signed magnitude and one's complement representations for signed integers are + * Sign-magnitude and one's complement representations for signed integers are not supported. Two's complement is the only supported representation. Features From 5f173c62a4409e126137aea3f546c2b284fc5b4e Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 10 Dec 2021 11:07:27 +0000 Subject: [PATCH 08/10] changelog: Addressed review comments #4 Signed-off-by: Minos Galanakis --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index efa77e563..a25f0ad6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -488,8 +488,6 @@ New deprecations deprecated. * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH have been renamed, and the old names deprecated. - * Sign-magnitude and one's complement representations for signed integers are - not supported. Two's complement is the only supported representation. Features * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. @@ -596,6 +594,8 @@ API changes Requirement changes * Update the minimum required CMake version to 2.8.12. This silences a warning on CMake 3.19.0. #3801 + * Sign-magnitude and one's complement representations for signed integers are + not supported. Two's complement is the only supported representation. New deprecations * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated. From 8340ea80cd5bcc1b5bb8f91ef0bfee7348d8bded Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 10 Dec 2021 15:31:23 +0000 Subject: [PATCH 09/10] changelog: Addressed review comments #5 Signed-off-by: Minos Galanakis --- ChangeLog | 2 -- 1 file changed, 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a25f0ad6e..ebf8a36ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -594,8 +594,6 @@ API changes Requirement changes * Update the minimum required CMake version to 2.8.12. This silences a warning on CMake 3.19.0. #3801 - * Sign-magnitude and one's complement representations for signed integers are - not supported. Two's complement is the only supported representation. New deprecations * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated. From c10086e33e6e6433f9bf10eee03f58cf06b67f23 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 10 Dec 2021 15:51:06 +0000 Subject: [PATCH 10/10] changelog: Addressed review comments #6 Signed-off-by: Minos Galanakis --- ChangeLog.d/twos_complement_representation.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ChangeLog.d/twos_complement_representation.txt diff --git a/ChangeLog.d/twos_complement_representation.txt b/ChangeLog.d/twos_complement_representation.txt new file mode 100644 index 000000000..fa49859ab --- /dev/null +++ b/ChangeLog.d/twos_complement_representation.txt @@ -0,0 +1,3 @@ +Requirement changes + * Sign-magnitude and one's complement representations for signed integers are + not supported. Two's complement is the only supported representation.