diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-25 23:09:41 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-25 23:09:41 +0200 |
commit | da9152b546d090875b769cd85b95681a4324541a (patch) | |
tree | bcbc744fa081775c4d392fc37edc0acdfadf19e9 | |
parent | Bug and warning fix (diff) | |
download | libsha1-da9152b546d090875b769cd85b95681a4324541a.tar.gz libsha1-da9152b546d090875b769cd85b95681a4324541a.tar.bz2 libsha1-da9152b546d090875b769cd85b95681a4324541a.tar.xz |
Fix optimised SHA1 implementation x86 intrinsic SHA1 instructions1.1.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | process.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -120,7 +120,7 @@ process_x86_sha(struct libsha1_state *restrict state, const unsigned char *restr abcd_orig = _mm_shuffle_epi32(_mm_loadu_si128((const __m128i *)&state->h[0]), 32 - 5); e000_orig = _mm_set_epi32((int)state->h[4], 0, 0, 0); - for (; len >= off + sizeof(state->chunk); off += sizeof(state->chunk)) { + for (; len >= off + sizeof(state->chunk); off += sizeof(state->chunk), data = &data[sizeof(state->chunk)]) { msg0 = _mm_loadu_si128((const __m128i *)&data[0]); msg0 = _mm_shuffle_epi8(msg0, SHUFFLE_MASK); e000 = _mm_add_epi32(e000_orig, msg0); |