Gilles Peskine f7b4137e69 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 15:48:15 +01:00
..
2021-09-27 16:22:08 +02:00
2021-03-10 12:52:37 +00:00
2021-06-28 09:24:07 +01:00
2021-10-25 22:15:20 +02:00
2021-08-19 09:55:41 +01:00
2021-09-06 12:09:34 +02:00
2021-10-25 13:16:04 +01:00
2021-06-17 21:46:29 +02:00
2021-09-27 16:22:08 +02:00
2021-10-25 10:41:29 +08:00
2021-10-25 10:41:29 +08:00
2021-06-25 12:46:40 +01:00
2021-09-27 16:34:58 +08:00
2021-06-08 16:45:41 +02:00
2021-08-19 09:31:55 +01:00
2021-06-28 09:24:07 +01:00
2021-06-16 10:34:25 +02:00
2021-04-07 12:45:35 +01:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-04-07 12:45:35 +01:00
2021-08-19 09:31:55 +01:00
2021-06-16 10:34:25 +02:00
2021-03-10 12:52:37 +00:00
2021-06-28 09:24:07 +01:00
2021-06-08 16:45:41 +02:00
2021-04-15 11:19:47 +01:00
2021-09-21 11:59:39 +02:00
2021-09-08 22:04:13 +05:30
2020-11-25 13:10:50 +01:00
2021-10-08 16:28:32 +02:00
2021-08-19 09:31:55 +01:00
2021-07-08 12:46:26 +01:00
2021-08-19 09:31:55 +01:00
2021-08-19 09:31:55 +01:00
2021-08-19 09:56:47 +01:00
2021-08-31 22:54:27 +02:00
2021-10-29 02:39:30 +00:00
2021-10-29 11:27:00 +01:00
2021-06-28 09:28:33 +01:00