summaryrefslogtreecommitdiff
path: root/x64dll.asm
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-08-13 16:05:39 -0400
committerJeffrey Walton <noloader@gmail.com>2017-08-13 16:05:39 -0400
commit2aff92ddb6e679fca04432f01a1a16a035e33008 (patch)
tree87673ebbd4e2aee79d52717cafd6bf67fe1629df /x64dll.asm
parent863bf9133c81933f4417fa9de49850a7c181158c (diff)
downloadcryptopp-git-2aff92ddb6e679fca04432f01a1a16a035e33008.tar.gz
Fix bad SHA::Transform calculation (Issue 455)
Reworked SHA class internals to align all the implementations. Formerly all hashes were software based, IterHashBase handled endian conversions, IterHashBase repeatedly called the single block SHA{N}::Transform. The rework added SHA{N}::HashMultipleBlocks, and the SHA classes attempt to always use it. Now SHA{N}::Transform calls into SHA{N}_HashMultipleBlocks, which is a free standing function. An added wrinkle is hardware wants little endian data and software presents big endian data, so HashMultipleBlocks accepts a ByteOrder for the incoming data. Hardware based SHA{N}_HashMultipleBlocks can often perform the endian swap much easier by setting an EPI mask so it was profitable to defer to hardware when available. The rework also removed the hacked-in pointers to implementations. The class now looks more like AES, GCM, etc.
Diffstat (limited to 'x64dll.asm')
-rw-r--r--x64dll.asm4
1 files changed, 2 insertions, 2 deletions
diff --git a/x64dll.asm b/x64dll.asm
index 386f7511..97c9aba3 100644
--- a/x64dll.asm
+++ b/x64dll.asm
@@ -676,7 +676,7 @@ ret
GCM_AuthenticateBlocks_64K ENDP
ALIGN 8
-X86_SHA256_HashBlocks PROC FRAME
+SHA256_SSE_HashMultipleBlocks PROC FRAME
rex_push_reg rsi
push_reg rdi
push_reg rbx
@@ -1962,7 +1962,7 @@ pop rbx
pop rdi
pop rsi
ret
-X86_SHA256_HashBlocks ENDP
+SHA256_SSE_HashMultipleBlocks ENDP
_TEXT ENDS
END