[Cryptech-Commits] [sw/libhal] 01/02: Typo in SHA-224/SHA-256 software core.

git at cryptech.is git at cryptech.is
Thu Jun 9 19:32:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository sw/libhal.

commit c4705484505ed29d17becd57117ea47cb8ab249d
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Thu Jun 9 12:54:50 2016 -0400

    Typo in SHA-224/SHA-256 software core.
---
 hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hash.c b/hash.c
index 225a99d..5fface0 100644
--- a/hash.c
+++ b/hash.c
@@ -1031,7 +1031,7 @@ static hal_error_t sw_hash_core_sha256(hal_hash_state_t *state)
   uint32_t *H = (uint32_t *) state->core_state, S[8], W[64];
 
   if (state->block_count == 0) {
-    switch (state->driver_ctrl_mode & SHA256_MODE_MASK) {
+    switch (state->driver->ctrl_mode & SHA256_MODE_MASK) {
     case SHA256_MODE_SHA_224:   memcpy(H, sha224_iv, sizeof(sha224_iv)); break;
     case SHA256_MODE_SHA_256:   memcpy(H, sha256_iv, sizeof(sha256_iv)); break;
     default:                    return HAL_ERROR_IMPOSSIBLE;



More information about the Commits mailing list