Skip to content

crypto: robustness fixes to handling of SM3 hash

Daniel P. Berrangé qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

* Use array range initializer for setting default value
* Drop redundant countermeasures now we can gurantee a correct default initializer value
* Drop SM3 conditions in tests
* Refactor tests to register one test per algorithm

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4crypto: set default initializer hmac/hash arrays to -1crypto/hash-glib.c crypto/hmac-glib.c+2 -50 replies
2/4crypto: unconditionally report SM3 hash lengthcrypto/hash.c+1 -30 replies
3/4tests/unit: drop conditionals for SM3tests/unit/test-crypto-hash.c tests/unit/test-crypto-hmac.c+1 -130 replies
4/4tests/unit: register one test per hash/hmac algorithmtests/unit/test-crypto-hash.c tests/unit/test-crypto-hmac.c+271 -3120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] crypto: robustness fixes to handling of SM3 hash

Note that patch 4 is best reviewed by applying to git and then using 'git show -b' to hide the huge whitespace indentation change.

Changed in v2:

* Use array range initializer for setting default value
* Drop redundant countermeasures now we can gurantee a correct default initializer value
* Drop SM3 conditions in tests
* Refactor tests to register one test per algorithm

Daniel P. Berrangé (4):
crypto: set default initializer hmac/hash arrays to -1
crypto: unconditionally report SM3 hash length tests/unit: drop conditionals for SM3 tests/unit: register one test per hash/hmac algorithm

 crypto/hash-glib.c            |   3 +-
 crypto/hash.c                 |   4 +-
 crypto/hmac-glib.c            |   4 +-
 tests/unit/test-crypto-hash.c | 325 +++++++++++++++-------------------
 tests/unit/test-crypto-hmac.c | 272 +++++++++++++---------------
 5 files changed, 275 insertions(+), 333 deletions(-)
Signature · 1 line
2.56.0