diff --git a/src/common/keccak/common/fips202_DIRTY.jinc b/src/common/keccak/common/fips202_DIRTY.jinc index 82f6c335..cc4c86af 100644 --- a/src/common/keccak/common/fips202_DIRTY.jinc +++ b/src/common/keccak/common/fips202_DIRTY.jinc @@ -336,7 +336,6 @@ fn _sha3_512_32(reg ptr u8[64] out, reg const ptr u8[32] in) -> stack u8[64] inline fn __shake128_absorb34(reg u256[7] state, reg const ptr u8[34] in) -> reg u256[7] { - reg u128 t128; stack u64[28] s_state; stack u64[25] a_jagged_p; reg u64 l t; diff --git a/src/crypto_kem/kyber/common/amd64/avx2/poly.jinc b/src/crypto_kem/kyber/common/amd64/avx2/poly.jinc index 1241817f..d739c8ed 100644 --- a/src/crypto_kem/kyber/common/amd64/avx2/poly.jinc +++ b/src/crypto_kem/kyber/common/amd64/avx2/poly.jinc @@ -208,11 +208,7 @@ fn _poly_compress(reg u64 rp, reg ptr u16[KYBER_N] a) -> reg ptr u16[KYBER_N] { inline int i; reg u256 f0 f1 f2 f3 v shift1 mask shift2 permidx; - reg u128 t0 t1 t3; reg ptr u16[16] x16p; - reg u64 t64; - reg u32 t32; - reg u16 t16; a = _poly_csubq(a); @@ -258,11 +254,7 @@ fn _poly_compress_1(reg ptr u8[KYBER_POLYCOMPRESSEDBYTES] rp, reg ptr u16[KYBER_ { inline int i; reg u256 f0 f1 f2 f3 v shift1 mask shift2 permidx; - reg u128 t0 t1 t3; reg ptr u16[16] x16p; - reg u64 t64; - reg u32 t32; - reg u16 t16; a = _poly_csubq(a); @@ -451,7 +443,7 @@ u8[16] pfm_idx_s = {0, 1, 4, 5, 8, 9, 12, 13, fn _poly_frommsg(reg ptr u16[KYBER_N] rp, reg u64 ap) -> stack u16[KYBER_N] { inline int i; - reg u256 f g0 g1 g2 g3 g4 h0 h1 h2 h3; + reg u256 f g0 g1 g2 g3 h0 h1 h2 h3; reg u256 shift idx hqs; reg ptr u16[16] x16p; @@ -499,7 +491,7 @@ fn _poly_frommsg(reg ptr u16[KYBER_N] rp, reg u64 ap) -> stack u16[KYBER_N] fn _poly_frommsg_1(reg ptr u16[KYBER_N] rp, reg ptr u8[KYBER_INDCPA_MSGBYTES] ap) -> stack u16[KYBER_N] { inline int i; - reg u256 f g0 g1 g2 g3 g4 h0 h1 h2 h3; + reg u256 f g0 g1 g2 g3 h0 h1 h2 h3; reg u256 shift idx hqs; reg ptr u16[16] x16p; @@ -879,7 +871,7 @@ inline fn __invntt___butterfly64x(reg u256 rl0 rl1 rl2 rl3 rh0 rh1 rh2 rh3 zl0 zl1 zh0 zh1 qx16) -> reg u256, reg u256, reg u256, reg u256, reg u256, reg u256, reg u256, reg u256 { - reg u256 t0 t1 t2 t3 t4 t5 t6 t7; + reg u256 t0 t1 t2 t3; t0 = #VPSUB_16u16(rl0, rh0); t1 = #VPSUB_16u16(rl1, rh1); @@ -921,7 +913,6 @@ fn _poly_invntt(reg ptr u16[KYBER_N] rp) -> reg ptr u16[KYBER_N] { reg u256 zeta0 zeta1 zeta2 zeta3 r0 r1 r2 r3 r4 r5 r6 r7 qx16 vx16 flox16 fhix16; reg ptr u16[400] zetasp; - reg ptr u16[16] qx16p; inline int i; zetasp = jzetas_inv_exp; @@ -1119,8 +1110,6 @@ fn __butterfly64x(reg u256 rl0 rl1 rl2 rl3 rh0 rh1 rh2 rh3 zl0 zl1 zh0 zh1 qx16) fn _poly_ntt(reg ptr u16[KYBER_N] rp) -> reg ptr u16[KYBER_N] { reg u256 zeta0 zeta1 zeta2 zeta3 r0 r1 r2 r3 r4 r5 r6 r7 qx16 vx16; - reg u32 t; - reg u16 w; reg ptr u16[400] zetasp; inline int i; diff --git a/src/crypto_kem/kyber/common/amd64/avx2/polyvec.jinc b/src/crypto_kem/kyber/common/amd64/avx2/polyvec.jinc index ee2d6ab8..e4f288fc 100644 --- a/src/crypto_kem/kyber/common/amd64/avx2/polyvec.jinc +++ b/src/crypto_kem/kyber/common/amd64/avx2/polyvec.jinc @@ -80,7 +80,6 @@ fn __polyvec_compress(reg u64 rp, stack u16[KYBER_VECN] a) reg u256 f0 f1 f2 v v8 off shift1 mask shift2 sllvdidx shufbidx; reg u128 t0 t1; reg ptr u16[16] x16p; - reg ptr u8[32] x8p; a = __polyvec_csubq(a); @@ -127,7 +126,6 @@ fn __polyvec_compress_1(reg ptr u8[KYBER_POLYVECCOMPRESSEDBYTES] rp, stack u16[K reg u256 f0 f1 f2 v v8 off shift1 mask shift2 sllvdidx shufbidx; reg u128 t0 t1; reg ptr u16[16] x16p; - reg ptr u8[32] x8p; a = __polyvec_csubq(a); diff --git a/src/crypto_kem/kyber/common/amd64/kem.jinc b/src/crypto_kem/kyber/common/amd64/kem.jinc index 62f1e4b8..ea240165 100644 --- a/src/crypto_kem/kyber/common/amd64/kem.jinc +++ b/src/crypto_kem/kyber/common/amd64/kem.jinc @@ -50,7 +50,6 @@ fn __crypto_kem_enc_derand_jazz(reg u64 ctp, reg u64 shkp, reg u64 pkp, reg ptr stack u8[KYBER_SYMBYTES * 2] buf kr; stack u64 s_pkp s_ctp s_shkp; reg u64 t64; - inline int i; s_pkp = pkp; s_ctp = ctp; diff --git a/src/crypto_kem/kyber/common/amd64/ref/poly.jinc b/src/crypto_kem/kyber/common/amd64/ref/poly.jinc index 3978eaec..5c40ec54 100644 --- a/src/crypto_kem/kyber/common/amd64/ref/poly.jinc +++ b/src/crypto_kem/kyber/common/amd64/ref/poly.jinc @@ -45,7 +45,6 @@ fn _poly_csubq(reg ptr u16[KYBER_N] rp) -> reg ptr u16[KYBER_N] fn _poly_basemul(reg ptr u16[KYBER_N] rp, reg const ptr u16[KYBER_N] ap bp) -> reg ptr u16[KYBER_N] { - reg u64 offset; reg u16 zeta; reg u16 r0; reg u16 r1; @@ -296,7 +295,6 @@ fn _poly_frommsg(reg ptr u16[KYBER_N] rp, reg u64 ap) -> stack u16[KYBER_N] reg u8 c; reg u16 t; inline int i; - inline int j; for i = 0 to KYBER_INDCPA_MSGBYTES { @@ -359,7 +357,6 @@ fn _i_poly_frommsg(reg ptr u16[KYBER_N] rp, reg ptr u8[KYBER_INDCPA_MSGBYTES] ap reg u8 c; reg u16 t; inline int i; - inline int j; for i = 0 to KYBER_INDCPA_MSGBYTES { diff --git a/src/crypto_kem/kyber/common/amd64/ref/polyvec.jinc b/src/crypto_kem/kyber/common/amd64/ref/polyvec.jinc index e1aee308..ea7c31d8 100644 --- a/src/crypto_kem/kyber/common/amd64/ref/polyvec.jinc +++ b/src/crypto_kem/kyber/common/amd64/ref/polyvec.jinc @@ -31,7 +31,6 @@ fn __polyvec_compress(reg u64 rp, stack u16[KYBER_VECN] a) { stack u16[KYBER_VECN] aa; reg u16 c, b; - reg u16 d; reg u64[4] t; reg u64 i j; inline int k; @@ -95,7 +94,6 @@ fn __i_polyvec_compress(reg ptr u8[KYBER_POLYVECCOMPRESSEDBYTES] rp, stack u16[K { stack u16[KYBER_VECN] aa; reg u16 c, b; - reg u16 d; reg u64[4] t; reg u64 i j; inline int k; diff --git a/src/crypto_kem/kyber/common/amd64/ref/verify.jinc b/src/crypto_kem/kyber/common/amd64/ref/verify.jinc index ad521ce9..effce7b6 100644 --- a/src/crypto_kem/kyber/common/amd64/ref/verify.jinc +++ b/src/crypto_kem/kyber/common/amd64/ref/verify.jinc @@ -25,7 +25,7 @@ fn __verify(reg u64 ctp, reg ptr u8[KYBER_INDCPA_BYTES] ctpc) -> reg u64 inline fn __cmov(reg ptr u8[KYBER_SYMBYTES] dst, reg u64 src cnd) -> reg ptr u8[KYBER_SYMBYTES] { - reg u8 t1 t2 bcond; + reg u8 t1 t2; inline int i; cnd = -cnd; diff --git a/src/crypto_kem/kyber/kyber512/amd64/ref/indcpa.jinc b/src/crypto_kem/kyber/kyber512/amd64/ref/indcpa.jinc index c1bb634b..8c76ab6c 100644 --- a/src/crypto_kem/kyber/kyber512/amd64/ref/indcpa.jinc +++ b/src/crypto_kem/kyber/kyber512/amd64/ref/indcpa.jinc @@ -12,7 +12,7 @@ fn __indcpa_keypair_derand(reg u64 pkp, reg u64 skp, reg ptr u8[KYBER_SYMBYTES] stack u8[64] buf; stack u8[KYBER_SYMBYTES] publicseed noiseseed; reg u64 t64; - reg u8 nonce, c; + reg u8 nonce; inline int i; spkp = pkp; diff --git a/src/crypto_kem/kyber/kyber768/amd64/avx2/gen_matrix.jinc b/src/crypto_kem/kyber/kyber768/amd64/avx2/gen_matrix.jinc index 9ae8a167..afbe3819 100644 --- a/src/crypto_kem/kyber/kyber768/amd64/avx2/gen_matrix.jinc +++ b/src/crypto_kem/kyber/kyber768/amd64/avx2/gen_matrix.jinc @@ -575,7 +575,6 @@ fn __gen_matrix(stack u8[KYBER_SYMBYTES] seed, inline int transposed) -> stack u stack u256 fs; reg u256 f; reg u64 ctr0 ctr1 ctr2 ctr3 tmp; - stack u64 ctr0_s; reg u8 flg0 flg1 bflg; reg bool b; reg bool zf; diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/indcpa.jinc b/src/crypto_kem/kyber/kyber768/amd64/ref/indcpa.jinc index 34c8982f..b8581bd5 100644 --- a/src/crypto_kem/kyber/kyber768/amd64/ref/indcpa.jinc +++ b/src/crypto_kem/kyber/kyber768/amd64/ref/indcpa.jinc @@ -92,11 +92,10 @@ fn __indcpa_enc(stack u64 sctp, reg ptr u8[32] msgp, reg u64 pkp, reg ptr u8[KYB { stack u16[KYBER_VECN] pkpv sp ep bp; stack u16[KYBER_K*KYBER_VECN] aat; - stack u16[KYBER_N] k poly epp v poly0 poly1 poly2; + stack u16[KYBER_N] k epp v; stack u8[KYBER_SYMBYTES] publicseed; - reg u64 i j t64; + reg u64 i t64; reg u64 ctp; - reg u16 t; reg u8 nonce; stack ptr u8[KYBER_SYMBYTES] noiseseed_s; @@ -175,10 +174,9 @@ fn __iindcpa_enc(reg ptr u8[KYBER_CT_LEN] ctp, reg ptr u8[32] msgp, reg u64 pkp, { stack u16[KYBER_VECN] pkpv sp ep bp; stack u16[KYBER_K*KYBER_VECN] aat; - stack u16[KYBER_N] k poly epp v poly0 poly1 poly2; + stack u16[KYBER_N] k epp v; stack u8[KYBER_SYMBYTES] publicseed; - reg u64 i j t64; - reg u16 t; + reg u64 i t64; reg u8 nonce; stack ptr u8[KYBER_CT_LEN] sctp; stack ptr u8[KYBER_SYMBYTES] noiseseed_s; diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc b/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc index b36b9033..8befa13d 100644 --- a/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc +++ b/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc @@ -59,7 +59,6 @@ fn _poly_csubq(reg ptr u16[KYBER_N] rp) -> reg ptr u16[KYBER_N] fn _poly_basemul(reg ptr u16[KYBER_N] rp, reg const ptr u16[KYBER_N] ap bp) -> reg ptr u16[KYBER_N] { - reg u64 offset; reg u16 zeta; reg u16 r0; reg u16 r1; @@ -316,7 +315,6 @@ fn _poly_frommsg(reg ptr u16[KYBER_N] rp, reg u64 ap) -> stack u16[KYBER_N] reg u8 c; reg u16 t; inline int i; - inline int j; for i = 0 to 32 { @@ -379,7 +377,6 @@ fn _i_poly_frommsg(reg ptr u16[KYBER_N] rp, reg ptr u8[32] ap) -> stack u16[KYBE reg u8 c; reg u16 t; inline int i; - inline int j; for i = 0 to 32 { @@ -441,7 +438,6 @@ fn _poly_getnoise(reg ptr u16[KYBER_N] rp, reg ptr u8[KYBER_SYMBYTES] seed, reg { stack u8[33] extseed; /* 33 = KYBER_SYMBYTES +1 */ stack u8[128] buf; /* 128 = KYBER_ETA*KYBER_N/4 */ - reg u64 outlen; reg u8 c,a,b; reg u16 t; reg u64 i j; diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/polyvec.jinc b/src/crypto_kem/kyber/kyber768/amd64/ref/polyvec.jinc index a9b3fec9..5025f146 100644 --- a/src/crypto_kem/kyber/kyber768/amd64/ref/polyvec.jinc +++ b/src/crypto_kem/kyber/kyber768/amd64/ref/polyvec.jinc @@ -25,7 +25,6 @@ fn __polyvec_compress(reg u64 rp, stack u16[KYBER_VECN] a) { stack u16[KYBER_VECN] aa; reg u16 c, b; - reg u16 d; reg u64[4] t; reg u64 i j; inline int k; @@ -90,7 +89,6 @@ fn __i_polyvec_compress(reg ptr u8[KYBER_POLYVECCOMPRESSEDBYTES] rp, stack u16[K { stack u16[KYBER_VECN] aa; reg u16 c, b; - reg u16 d; reg u64[4] t; reg u64 i j; inline int k; diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/verify.jinc b/src/crypto_kem/kyber/kyber768/amd64/ref/verify.jinc index 986916c8..5c2746ee 100644 --- a/src/crypto_kem/kyber/kyber768/amd64/ref/verify.jinc +++ b/src/crypto_kem/kyber/kyber768/amd64/ref/verify.jinc @@ -30,7 +30,7 @@ fn __verify(reg u64 ctp, reg ptr u8[KYBER_CT_LEN] ctpc) -> reg u64 inline fn __cmov(reg ptr u8[KYBER_SYMBYTES] dst, reg u64 src cnd) -> reg ptr u8[KYBER_SYMBYTES] { - reg u8 t1 t2 bcond; + reg u8 t1 t2; inline int i; cnd = -cnd; diff --git a/src/crypto_scalarmult/curve25519/amd64/ref5/scalarmult.jazz b/src/crypto_scalarmult/curve25519/amd64/ref5/scalarmult.jazz index 50d2d533..41043499 100644 --- a/src/crypto_scalarmult/curve25519/amd64/ref5/scalarmult.jazz +++ b/src/crypto_scalarmult/curve25519/amd64/ref5/scalarmult.jazz @@ -4,7 +4,6 @@ require "curve25519.jinc" export fn jade_scalarmult_curve25519_amd64_ref5(#spill_to_mmx reg u64 qp np pp) -> reg u64 { reg u64 r; - stack u64 qps; reg u64[4] q n p; _ = #init_msf(); @@ -25,7 +24,6 @@ export fn jade_scalarmult_curve25519_amd64_ref5(#spill_to_mmx reg u64 qp np pp) export fn jade_scalarmult_curve25519_amd64_ref5_base(#spill_to_mmx reg u64 qp np) -> reg u64 { reg u64 r; - stack u64 qps; reg u64[4] q n; _ = #init_msf(); diff --git a/src/crypto_sign/dilithium/common/amd64/avx2/expandA.jinc b/src/crypto_sign/dilithium/common/amd64/avx2/expandA.jinc index 6d5d9af7..06f42bb1 100644 --- a/src/crypto_sign/dilithium/common/amd64/avx2/expandA.jinc +++ b/src/crypto_sign/dilithium/common/amd64/avx2/expandA.jinc @@ -109,7 +109,6 @@ fn expandA_chunk( stack u64[4] coeffs_filled; stack u64[4] xof_offset; - reg u64 lane; reg u256 v256 v256_zero; reg u64 v64; diff --git a/src/crypto_sign/dilithium/common/amd64/avx2/expandA_end.jinc b/src/crypto_sign/dilithium/common/amd64/avx2/expandA_end.jinc index 8c190c71..ee91634d 100644 --- a/src/crypto_sign/dilithium/common/amd64/avx2/expandA_end.jinc +++ b/src/crypto_sign/dilithium/common/amd64/avx2/expandA_end.jinc @@ -8,8 +8,6 @@ fn expandA_aligned(stack u8[32] rho) -> stack u32[Li2_k * Li2_l * Li2_polydeg] stack u32[Li2_k * Li2_l * Li2_polydeg] matrix; stack u64[4] nonces; - stack u64[4] coeffs_left; - stack u64[4] xof_bytes_left; inline int row col chunk idx lane; @@ -62,8 +60,6 @@ fn expandA_unaligned2(stack u8[32] rho) -> stack u32[Li2_k * Li2_l * Li2_polydeg stack u32[Li2_polydeg] scratch0 scratch1; stack u64[4] nonces; - stack u64[4] coeffs_left; - stack u64[4] xof_bytes_left; inline int row col chunk idx lane; diff --git a/src/crypto_sign/dilithium/common/amd64/avx2/expandMask.jinc b/src/crypto_sign/dilithium/common/amd64/avx2/expandMask.jinc index 7a53144e..177c067e 100644 --- a/src/crypto_sign/dilithium/common/amd64/avx2/expandMask.jinc +++ b/src/crypto_sign/dilithium/common/amd64/avx2/expandMask.jinc @@ -105,8 +105,6 @@ fn expandMask_poly_gamma1_217_4x( stack u64 y_packed_filled; stack u64 output_squeeze_counter; stack u256[25] xof; - stack u64[4] coeffs_filled; - stack u64[4] xof_offset; reg u64 addr v64; reg u64 i j; @@ -182,8 +180,6 @@ fn expandMask_poly_gamma1_219_4x( stack u64 y_packed_filled; stack u64 output_squeeze_counter; stack u256[25] xof; - stack u64[4] coeffs_filled; - stack u64[4] xof_offset; reg u64 addr v64; reg u64 i j; diff --git a/src/crypto_sign/dilithium/common/amd64/avx2/expandMask_end.jinc b/src/crypto_sign/dilithium/common/amd64/avx2/expandMask_end.jinc index 96ba1d4c..6ea6f10c 100644 --- a/src/crypto_sign/dilithium/common/amd64/avx2/expandMask_end.jinc +++ b/src/crypto_sign/dilithium/common/amd64/avx2/expandMask_end.jinc @@ -13,8 +13,6 @@ fn expandMask_buffered( reg u32 v32; - reg ptr u32[Li2_polydeg] poly; - ?{}, polys_generated = #set0_64(); while (polys_generated < Li2_l) { if buffer_offset >= 4 { diff --git a/src/crypto_sign/dilithium/common/amd64/avx2/ntt.jinc b/src/crypto_sign/dilithium/common/amd64/avx2/ntt.jinc index 07db8d35..1bbf7c80 100644 --- a/src/crypto_sign/dilithium/common/amd64/avx2/ntt.jinc +++ b/src/crypto_sign/dilithium/common/amd64/avx2/ntt.jinc @@ -217,9 +217,7 @@ fn ntt_levels0t1(reg ptr u32[256] poly_ptr, reg u256 q, inline int offset) // TODO: Interleave loads/stores with arithmetic ops reg u256 zeta_qinv zeta; - reg u256 poly0 poly1 poly2 poly3 poly4 poly5 poly6 poly7 poly8; - - inline int ii; + reg u256 poly0 poly1 poly2 poly3 poly4 poly5 poly6 poly7; poly0 = #VMOVDQU_256(poly_ptr.[u256 (32 * (0*4 + offset))]); poly1 = #VMOVDQU_256(poly_ptr.[u256 (32 * (1*4 + offset))]); @@ -267,8 +265,7 @@ fn ntt_levels2t7(reg ptr u32[256] poly_ptr, reg u256 q, inline int offset) // TODO: Interleave shuffles with butterflies reg u256 zeta_qinv0 zeta_qinv1 zeta0 zeta1; - reg u256[8] poly; - reg u256 poly0 poly1 poly2 poly3 poly4 poly5 poly6 poly7 poly8 polyx; + reg u256 poly0 poly1 poly2 poly3 poly4 poly5 poly6 poly7 polyx; poly0 = #VMOVDQU_256(poly_ptr.[u256 32 * (8*offset + 0)]); poly1 = #VMOVDQU_256(poly_ptr.[u256 32 * (8*offset + 1)]); diff --git a/src/crypto_sign/dilithium/common/amd64/expandS.jinc b/src/crypto_sign/dilithium/common/amd64/expandS.jinc index 2d9355f1..9667f528 100644 --- a/src/crypto_sign/dilithium/common/amd64/expandS.jinc +++ b/src/crypto_sign/dilithium/common/amd64/expandS.jinc @@ -12,7 +12,6 @@ fn expandSEta2_poly(stack u8[64] rho_prime, reg u16 elem_idx, reg ptr u32[Li2_po // temps reg u64 i; - reg u64 addr; reg u8 c; reg u32 c32 t0 t1; @@ -89,10 +88,8 @@ fn expandSEta4_poly(stack u8[64] rho_prime, reg u16 elem_idx, reg ptr u32[Li2_po // temps reg u64 i; - reg u8 c1 c2; - reg u32 u32_c1; + reg u8 c1; reg u32 v; - reg u64 addr; reg u8 c; reg u32 c32; @@ -144,4 +141,4 @@ fn expandSEta4_poly(stack u8[64] rho_prime, reg u16 elem_idx, reg ptr u32[Li2_po } } return poly; -} \ No newline at end of file +} diff --git a/src/crypto_sign/dilithium/common/amd64/fips202.jinc b/src/crypto_sign/dilithium/common/amd64/fips202.jinc index aeb015ad..3d41a8a5 100644 --- a/src/crypto_sign/dilithium/common/amd64/fips202.jinc +++ b/src/crypto_sign/dilithium/common/amd64/fips202.jinc @@ -126,7 +126,6 @@ u64[24] roundconstants = {0x0000000000000001, 0x0000000000008082, 0x800000000000 0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008}; fn __keccakf1600_ref(reg ptr u64[25] state) -> reg ptr u64[25] { - inline int round; reg ptr u64[24] constptr; reg u64 rctr; diff --git a/src/crypto_sign/dilithium/common/amd64/keygen_end.jinc b/src/crypto_sign/dilithium/common/amd64/keygen_end.jinc index ddf3d3dd..fad51941 100644 --- a/src/crypto_sign/dilithium/common/amd64/keygen_end.jinc +++ b/src/crypto_sign/dilithium/common/amd64/keygen_end.jinc @@ -14,7 +14,6 @@ fn keygen_inner(reg ptr u8[32] random_zeta) stack u8[32] rho; reg ptr u8[32] rho_rsp; stack u8[64] rho_prime; - reg ptr u8[64] rho_prime_rsp; stack u8[32] k; // FFTs stack u32[Li2_k * Li2_l * Li2_polydeg] fft_matA; @@ -22,9 +21,6 @@ fn keygen_inner(reg ptr u8[32] random_zeta) reg ptr u32[Li2_l * Li2_polydeg] s1_rsp; stack u32[Li2_k * Li2_polydeg] s2; - stack u8[SHAKE256_RATE] s256_out; - - stack u32[Li2_k * Li2_polydeg] s2; stack u32[Li2_k * Li2_polydeg] t t1 t0; reg ptr u8[Li2_pack_s1len] s1_in_sk; @@ -36,7 +32,6 @@ fn keygen_inner(reg ptr u8[32] random_zeta) //temp variables reg u64 i; inline int j; - reg u32 v32; reg u8 c; state = shake256_absorb32(random_zeta); diff --git a/src/crypto_sign/dilithium/common/amd64/packing.jinc b/src/crypto_sign/dilithium/common/amd64/packing.jinc index 07038863..59a78c9e 100644 --- a/src/crypto_sign/dilithium/common/amd64/packing.jinc +++ b/src/crypto_sign/dilithium/common/amd64/packing.jinc @@ -19,7 +19,6 @@ fn polyeta_2_pack(reg ptr u32[Li2_polydeg] s1, reg ptr u8[Li2_pack_eta_2_len] de inline int _eta; reg u32 dest0 dest1 dest2; reg u32 t1 t2 t3 t4 t5 t6 t7; - reg u32 coeff; reg u64 i addr; _eta = 2; @@ -81,7 +80,6 @@ fn polyeta_4_pack(reg ptr u32[Li2_polydeg] s1, reg ptr u8[Li2_pack_eta_4_len] de -> reg ptr u8[Li2_pack_eta_4_len] { inline int _eta; - reg u8 value; reg u32 lo hi; reg u32 coeff; @@ -117,7 +115,7 @@ fn polyeta_2_unpack(reg ptr u32[Li2_polydeg] r, reg ptr u8[Li2_pack_eta_2_len] a inline int _eta; reg u64 i; reg u32 a0 a1 a2; - reg u32 c32_0 c32_1; + reg u32 c32_0; reg u32 coeff; reg u64 dest_addr src_addr; @@ -715,7 +713,6 @@ fn polyt0_pack(reg ptr u32[Li2_polydeg] t0, reg ptr u8[Li2_pack_t0len] dest) reg u64 addr; reg u32 v32; - stack u32 v32s; reg u8 c c1; diff --git a/src/crypto_sign/dilithium/common/amd64/poly.jinc b/src/crypto_sign/dilithium/common/amd64/poly.jinc index f5c73db1..875bf6a3 100644 --- a/src/crypto_sign/dilithium/common/amd64/poly.jinc +++ b/src/crypto_sign/dilithium/common/amd64/poly.jinc @@ -38,9 +38,6 @@ fn poly_subtract(reg ptr u32[Li2_polydeg] f g difference) fn poly_accumulate(reg ptr u32[Li2_polydeg] f sum) -> reg ptr u32[Li2_polydeg] { - reg u32 temp; - stack u32 x1 x2 y; - reg u32 v32 result; reg u64 i; @@ -147,4 +144,4 @@ fn poly_checknorm(reg ptr u32[Li2_polydeg] f, inline int threshold) result_s = result; return result_s; -} \ No newline at end of file +} diff --git a/src/crypto_sign/dilithium/common/amd64/verify_end.jinc b/src/crypto_sign/dilithium/common/amd64/verify_end.jinc index 7bd0b87a..ebb3ff35 100644 --- a/src/crypto_sign/dilithium/common/amd64/verify_end.jinc +++ b/src/crypto_sign/dilithium/common/amd64/verify_end.jinc @@ -23,7 +23,7 @@ fn unpack_hints(reg ptr u8[Li2_omega + Li2_k] hints_buf, reg ptr u32[Li2_k * Li2 reg u64 i j; reg u8 done fail status; reg bool tmp; - reg u32 zero one; + reg u32 zero; reg u64 k hints_elem_offset idx idx1 idx2 idxtmp; reg u64 hints_cumpop; // cumulative popcount of hints @@ -119,10 +119,9 @@ fn verify_inner(stack ptr u8[Li2_SIGN_LEN] sig, reg u64 m, reg u64 m_len, stack reg u32 r_status; stack u32 status; stack u8 z_normcheck_fail c_tilde_result; - reg u64 i j; + reg u64 i; reg u8 byte; - reg u8 k l hints_popcount hints_popcount_fail done; - reg u64 hint_index; + reg u8 hints_popcount_fail; reg ptr u8[Li2_SIGN_LEN] sig_rsp; reg ptr u8[Li2_PK_LEN] pk_rsp; @@ -130,7 +129,7 @@ fn verify_inner(stack ptr u8[Li2_SIGN_LEN] sig, reg u64 m, reg u64 m_len, stack stack u64[25] keccak_state; reg ptr u64[25] keccak_state_rsp; stack u8[32] tr c_tilde c_tilde2; - reg ptr u8[32] tr_rsp c_tilde_rsp c_tilde2_rsp; + reg ptr u8[32] tr_rsp; stack u8[64] mu; stack u32[Li2_k * Li2_l * Li2_polydeg] fft_matA; @@ -144,8 +143,6 @@ fn verify_inner(stack ptr u8[Li2_SIGN_LEN] sig, reg u64 m, reg u64 m_len, stack reg ptr u8[Li2_pack_t1len] t1_buf; reg ptr u8[Li2_omega + Li2_k] hints_buf; - reg u32 coeff; - inline int ii; //status = 0xFF; @@ -230,10 +227,8 @@ inline fn verify(reg u64 ptr_sig, reg u64 ptr_m, reg u64 m_len, reg u64 ptr_pk) -> reg u32 { stack u8[Li2_PK_LEN] pk; reg ptr u8[Li2_PK_LEN] pk_rsp; - stack ptr u8[Li2_PK_LEN] pk_ssp; stack u8[Li2_SIGN_LEN] sig; reg ptr u8[Li2_SIGN_LEN] sig_rsp; - stack ptr u8[Li2_SIGN_LEN] sig_ssp; reg u8 byte; reg u64 i; diff --git a/src/crypto_sign/dilithium/dilithium2/amd64/avx2/common.jinc b/src/crypto_sign/dilithium/dilithium2/amd64/avx2/common.jinc index a3b6363c..d8f19529 100644 --- a/src/crypto_sign/dilithium/dilithium2/amd64/avx2/common.jinc +++ b/src/crypto_sign/dilithium/dilithium2/amd64/avx2/common.jinc @@ -28,9 +28,6 @@ fn use_hint(reg u32 a hint) inline fn expandMask_poly_4x(reg ptr u32[4 * Li2_polydeg] f_4x, reg ptr u8[64] rho_prime, stack u16 kappa) -> reg ptr u32[4 * Li2_polydeg] { - reg u64 i; - reg u32 v32; - f_4x = expandMask_poly_gamma1_217_4x(f_4x, rho_prime, kappa); return f_4x; } @@ -54,4 +51,4 @@ fn expandA(stack u8[32] rho) -> stack u32[Li2_k * Li2_l * Li2_polydeg] { stack u32[Li2_k * Li2_l * Li2_polydeg] matrix; matrix = expandA_aligned(rho); return matrix; -} \ No newline at end of file +} diff --git a/src/crypto_sign/dilithium/dilithium3/amd64/avx2/common.jinc b/src/crypto_sign/dilithium/dilithium3/amd64/avx2/common.jinc index e904742e..614e4a78 100644 --- a/src/crypto_sign/dilithium/dilithium3/amd64/avx2/common.jinc +++ b/src/crypto_sign/dilithium/dilithium3/amd64/avx2/common.jinc @@ -28,9 +28,6 @@ fn use_hint(reg u32 a hint) inline fn expandMask_poly_4x(reg ptr u32[4 * Li2_polydeg] f_4x, reg ptr u8[64] rho_prime, stack u16 kappa) -> reg ptr u32[4 * Li2_polydeg] { - reg u64 i; - reg u32 v32; - f_4x = expandMask_poly_gamma1_219_4x(f_4x, rho_prime, kappa); return f_4x; } diff --git a/src/crypto_sign/falcon/falcon512/amd64/avx2/test.jazz b/src/crypto_sign/falcon/falcon512/amd64/avx2/test.jazz index 7349e298..f1892f09 100644 --- a/src/crypto_sign/falcon/falcon512/amd64/avx2/test.jazz +++ b/src/crypto_sign/falcon/falcon512/amd64/avx2/test.jazz @@ -10,7 +10,6 @@ fn __decode_public_key_external(reg u64 h pk) -> reg u32 { reg u32 failed; stack u16[ARRAY_N] h_buff; reg u64 i; - reg u16 tmp16; h_buff, failed = __decode_public_key(h_buff, pk);