Gilles Peskine
8cb22c8d87
Untangle PSA_ALG_IS_HASH_AND_SIGN and PSA_ALG_IS_SIGN_HASH
...
The current definition of PSA_ALG_IS_HASH_AND_SIGN includes
PSA_ALG_RSA_PKCS1V15_SIGN_RAW and PSA_ALG_ECDSA_ANY, which don't strictly
follow the hash-and-sign paradigm: the algorithm does not encode a hash
algorithm that is applied prior to the signature step. The definition in
fact encompasses what can be used with psa_sign_hash/psa_verify_hash, so
it's the correct definition for PSA_ALG_IS_SIGN_HASH. Therefore this commit
moves definition of PSA_ALG_IS_HASH_AND_SIGN to PSA_ALG_IS_SIGN_HASH, and
replace the definition of PSA_ALG_IS_HASH_AND_SIGN by a correct one (based
on PSA_ALG_IS_SIGN_HASH, excluding the algorithms where the pre-signature
step isn't to apply the hash encoded in the algorithm).
In the definition of PSA_ALG_SIGN_GET_HASH, keep the condition for a nonzero
output to be PSA_ALG_IS_HASH_AND_SIGN.
Everywhere else in the code base (definition of PSA_ALG_IS_SIGN_MESSAGE, and
every use of PSA_ALG_IS_HASH_AND_SIGN outside of crypto_values.h), we meant
PSA_ALG_IS_SIGN_HASH where we wrote PSA_ALG_IS_HASH_AND_SIGN, so do a
global replacement.
```
git grep -l IS_HASH_AND_SIGN ':!include/psa/crypto_values.h' | xargs perl -i -pe 's/ALG_IS_HASH_AND_SIGN/ALG_IS_SIGN_HASH/g'
```
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2021-11-03 12:44:08 +01:00
..
2021-02-22 19:08:14 +01:00
2021-10-22 11:06:52 +02:00
2021-04-13 15:24:25 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2021-09-29 20:40:31 +02:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2020-07-01 17:10:15 +02:00
2019-09-20 15:58:27 +02:00
2020-07-30 14:18:02 +02:00
2020-02-05 15:40:22 +00:00
2021-06-22 12:39:17 +02:00
2019-10-31 19:17:36 +02:00
2021-01-20 15:56:42 +00:00
2021-10-25 21:24:23 +02:00
2021-10-25 21:24:23 +02:00
2019-09-20 15:59:31 +02:00
2020-07-01 17:10:15 +02:00
2019-09-20 15:59:31 +02:00
2020-07-01 17:10:15 +02:00
2020-10-21 22:31:48 +02:00
2021-02-09 12:00:13 +01:00
2019-08-15 15:44:50 +01:00
2020-07-30 14:18:02 +02:00
2019-08-15 15:44:50 +01:00
2020-06-26 10:45:16 +02:00
2021-09-30 12:29:27 +02:00
2019-09-20 15:59:31 +02:00
2019-07-29 17:46:29 +02:00
2019-09-20 15:59:31 +02:00
2020-03-24 13:18:58 -04:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-09-20 15:59:31 +02:00
2021-09-30 12:29:27 +02:00
2020-06-26 22:40:58 +02:00
2019-08-15 15:44:50 +01:00
2019-09-20 16:01:59 +02:00
2019-09-20 15:59:31 +02:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-11-21 13:49:20 +01:00
2020-11-25 14:25:56 -08:00
2021-06-07 21:41:53 +02:00
2021-06-22 12:39:17 +02:00
2019-08-15 15:44:50 +01:00
2021-09-29 20:40:31 +02:00
2021-06-22 12:39:17 +02:00
2021-06-22 12:39:17 +02:00
2019-08-15 15:44:50 +01:00
2021-06-22 12:39:17 +02:00
2021-04-07 19:19:47 +02:00
2021-06-22 12:39:17 +02:00
2021-03-17 11:36:31 +01:00
2020-06-12 14:33:08 +02:00
2021-06-25 14:59:15 +01:00
2021-07-01 17:26:38 +01:00
2021-03-30 17:33:08 +02:00
2021-03-30 17:33:08 +02:00
2018-08-06 11:40:57 +01:00
2019-09-20 15:59:31 +02:00
2019-09-20 15:59:31 +02:00
2019-09-20 15:59:31 +02:00
2019-09-20 15:59:31 +02:00
2019-09-20 15:59:31 +02:00
2019-09-20 15:59:31 +02:00
2019-08-15 15:44:50 +01:00
2020-07-01 17:10:15 +02:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2020-07-30 14:18:02 +02:00
2020-11-25 14:25:56 -08:00
2020-01-06 11:40:23 +01:00
2020-01-06 11:40:23 +01:00
2020-01-06 11:40:23 +01:00
2020-01-06 11:40:23 +01:00
2020-01-06 11:40:23 +01:00
2020-07-01 17:10:15 +02:00
2019-08-15 15:44:50 +01:00
2020-07-01 17:10:15 +02:00
2019-10-31 15:07:35 +01:00
2019-10-31 15:07:45 +01:00
2021-06-22 12:39:17 +02:00
2021-06-22 12:39:17 +02:00
2021-03-29 14:20:18 +01:00
2021-03-29 14:20:18 +01:00
2021-02-25 15:56:48 +01:00
2021-09-23 20:58:45 +09:00
2019-09-20 15:59:31 +02:00
2020-06-26 10:45:16 +02:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2020-07-02 16:59:30 +01:00
2021-06-29 09:31:06 -04:00
2019-08-15 15:44:50 +01:00
2021-06-22 12:39:17 +02:00
2021-01-10 16:31:09 +01:00
2021-06-02 21:31:24 +02:00
2020-01-06 11:40:23 +01:00
2020-06-12 14:33:08 +02:00
2021-05-31 20:26:12 +02:00
2020-02-18 10:18:43 +01:00
2019-11-05 15:32:53 +01:00
2020-12-07 17:29:42 +00:00
2019-08-15 15:44:50 +01:00
2020-07-30 14:18:02 +02:00
2021-03-24 09:26:44 +01:00
2021-02-01 13:17:23 +01:00
2021-06-25 18:30:38 +02:00
2021-06-25 18:30:38 +02:00
2021-03-10 13:19:45 -07:00
2021-05-17 22:31:15 +02:00
2021-03-24 09:26:44 +01:00
2021-01-06 18:21:18 +01:00
2019-10-23 19:47:05 +02:00
2021-01-06 18:21:18 +01:00
2021-11-03 12:44:08 +01:00
2021-11-03 12:44:08 +01:00
2021-10-11 16:39:32 +02:00
2021-10-29 09:38:13 +02:00
2021-02-17 14:50:17 +01:00
2021-05-28 12:53:15 +02:00
2021-05-28 12:53:15 +02:00
2020-05-11 11:15:26 +02:00
2021-01-06 18:21:18 +01:00
2021-10-08 18:28:15 +02:00
2021-02-23 20:36:07 +01:00
2021-09-11 22:31:06 +05:30
2021-06-28 15:37:36 +02:00
2021-10-29 16:36:46 +02:00
2021-05-28 12:53:15 +02:00
2021-07-21 19:26:50 +02:00
2021-10-29 16:36:46 +02:00
2021-11-02 20:06:08 +01:00
2021-11-03 12:44:08 +01:00
2020-11-26 15:54:35 +01:00
2021-03-10 17:00:32 +00:00
2021-02-16 15:46:06 +01:00
2021-02-16 15:46:06 +01:00
2021-06-22 12:39:17 +02:00
2021-06-22 12:39:17 +02:00
2020-01-06 11:40:23 +01:00
2020-07-01 17:10:15 +02:00
2021-05-05 09:02:13 +02:00
2021-05-13 10:26:52 -04:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2021-07-01 17:52:07 +01:00
2020-04-22 16:01:48 +02:00
2021-09-06 12:18:53 +02:00
2021-04-15 11:19:47 +01:00
2020-09-21 18:25:35 -07:00
2021-06-22 12:39:17 +02:00
2019-08-15 15:44:50 +01:00
2020-07-01 17:10:15 +02:00