Skip to content

Commit

Permalink
sct: crypto_hash/sha512/amd64/ref
Browse files Browse the repository at this point in the history
  • Loading branch information
tfaoliveira committed Jun 26, 2024
1 parent cf0920b commit 36658f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/crypto_hash/sha512/amd64/ref/hash.jazz
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 3,9 @@ require "sha512.jinc"
export fn jade_hash_sha512_amd64_ref(reg u64 hash input input_length) -> reg u64
{
reg u64 r;

_ = #init_msf();

__sha512_ref(hash, input, input_length);
?{}, r = #set0();
return r;
Expand Down
8 changes: 4 additions & 4 deletions src/crypto_hash/sha512/amd64/ref/sha512.jinc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 192,7 @@ fn _blocks_0_ref(reg ptr u64[8] _H, reg u64 in inlen) -> reg ptr u64[8], reg u64
stack ptr u64[8] Hp;
reg ptr u64[8] H;
reg u64 tr;
stack u64 in_s;
#mmx reg u64 in_s;

Kp = SHA512_K;
Hp = _H;
Expand Down Expand Up @@ -275,9 275,9 @@ fn _blocks_1_ref(reg ptr u64[8] _H, reg ptr u64[32] sblocks, reg u64 nblocks) ->
reg ptr u64[80] Kp;
stack ptr u64[8] Hp;
reg ptr u64[8] H;
stack ptr u64[32] s_sblocks;
#mmx reg ptr u64[32] s_sblocks;
reg u64 i oblocks tr;
stack u64 s_i;
#mmx reg u64 s_i;

Kp = SHA512_K;
Hp = _H;
Expand Down Expand Up @@ -395,7 395,7 @@ inline fn __lastblocks_ref(reg u64 in inlen bits) -> stack u64[32], reg u64
inline fn __sha512_ref(reg u64 out in inlen)
{
reg u64 bits nblocks;
stack u64 s_out s_bits;
#mmx reg u64 s_out s_bits;
stack u64[8] H;
reg ptr u64[8] Hp;
stack u64[32] sblocks;
Expand Down

0 comments on commit 36658f1

Please sign in to comment.