Test the block size for symmetric keys

Also insist on their category.

Fix a missing implementation of PSA_BLOCK_CIPHER_BLOCK_SIZE for
ChaCha20.
This commit is contained in:
Gilles Peskine 2019-12-02 17:26:44 +01:00
parent 92f2da9d67
commit f8210f2bd5
4 changed files with 40 additions and 10 deletions

View file

@ -604,6 +604,7 @@
(type) == PSA_KEY_TYPE_DES ? 8 : \
(type) == PSA_KEY_TYPE_CAMELLIA ? 16 : \
(type) == PSA_KEY_TYPE_ARC4 ? 1 : \
(type) == PSA_KEY_TYPE_CHACHA20 ? 1 : \
0)
/** Vendor-defined algorithm flag.