This commit is contained in:
Dmitry Vagner 2022-09-28 00:00:58 -07:00
parent 8f18f81587
commit 7202f403c6
4 changed files with 8 additions and 16 deletions

View File

@ -113,7 +113,6 @@ mix:
/// boxes = 16
/// rounds -= 1
loop:
// stack: STATE, F, K, 16, rounds, sides, virt, retdest
DUP9
@ -138,7 +137,7 @@ update_round_vars:
SWAP8
POP
%mul_const(4)
%mload_kernel_code_label_u32(K_data)
%mload_kernel_code_label_u32(k_data)
SWAP7
POP
// stack: STATE, F', K', 16, rounds, sides, virt, retdest
@ -180,7 +179,6 @@ round:
///
/// return e, a, b, c, d, F, K
box:
// stack: a, b, c, d, e, F, K, boxes, rounds, sides, virt
PUSH pre_rol
@ -198,7 +196,7 @@ pre_rol:
// stack: box, a, b, c, d, e, F, K, boxes, rounds, sides, virt
DUP12
DUP2
%mload_kernel_code_label(R_data)
%mload_kernel_code_label(r_data)
ADD
// stack: virt + r, box, a, b, c, d, e, F, K, boxes, rounds, sides, virt
%load_u32_from_block
@ -214,7 +212,7 @@ pre_rol:
PUSH mid_rol
SWAP2
// stack: box, a, mid_rol, b, c, d, e, F, K, boxes, rounds, sides, virt
%mload_kernel_code_label(S_data)
%mload_kernel_code_label(s_data)
// stack: s, a, mid_rol, b, c, d, e, F, K, boxes, rounds, sides, virt
%jump(rol)
mid_rol:
@ -240,7 +238,6 @@ post_rol:
// stack: e, a, b, c, d, F, K, boxes-1, rounds, sides, virt
%jump(round)
%macro get_round
// stack: sides, rounds
%mul_const(5)

View File

@ -1,4 +1,4 @@
global K_data:
global k_data:
// Left
BYTES 0x00, 0x00, 0x00, 0x00
BYTES 0x5A, 0x82, 0x79, 0x99
@ -12,8 +12,7 @@ global K_data:
BYTES 0x7A, 0x6D, 0x76, 0xE9
BYTES 0x00, 0x00, 0x00, 0x00
global S_data:
global s_data:
// Left Round 0
BYTES 11, 14, 15, 12
BYTES 05, 08, 07, 09
@ -39,7 +38,6 @@ global S_data:
BYTES 06, 08, 13, 12
BYTES 05, 12, 13, 14
BYTES 11, 08, 05, 06
// Right Round 0
BYTES 08, 09, 09, 11
BYTES 13, 15, 15, 05
@ -66,8 +64,7 @@ global S_data:
BYTES 08, 13, 06, 05
BYTES 15, 13, 11, 11
global R_data:
global r_data:
// Left Round 0
BYTES 00, 04, 08, 12
BYTES 16, 20, 24, 28

View File

@ -51,7 +51,6 @@ store_input_alt:
POP
%jump(ripemd_init)
store_input:
// stack: ADDR , rem , length
DUP3
@ -81,7 +80,6 @@ store_input:
// stack: length
%jump(ripemd_init)
%macro store_zeros(N, label)
// stack: i
%stack (i) -> ($N, i, 0, i)

View File

@ -86,8 +86,8 @@ global process:
/// def padlength(length):
/// x = 56 - length % 64
/// return x + 64*(x < 9)
/// t = length % 64
/// return 56 + 64*(t > 47) - t
%macro padlength
// stack: count