Skip to content

Commit

Permalink
sm4: try VCIPHERLAST
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Sep 11, 2024
1 parent 69e3749 commit 6c62c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sm4/asm_ppc64x.s
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ GLOBL ·rcon(SB), RODATA, $192
// - y: 128 bits temp register
// - z: 128 bits temp register
#define AFFINE_TRANSFORM_N(L, H, V_FOUR, x, y, z) \
VNAND x, NIBBLE_MASK, z; \
VNAND NIBBLE_MASK, x, z; \
VPERM L, L, z, y; \
VSRW x, V_FOUR, x; \
VAND NIBBLE_MASK, x, z; \
Expand All @@ -118,7 +118,7 @@ GLOBL ·rcon(SB), RODATA, $192
AFFINE_TRANSFORM(M1L, M1H, V_FOUR, x, y, z); \
; \
VPERM x, x, INVERSE_SHIFT_ROWS, x; \
VCIPHERLAST x, NIBBLE_MASK, x; \
VCIPHERLAST NIBBLE_MASK, x, x; \
; \
AFFINE_TRANSFORM_N(M2L, M2H, V_FOUR, x, y, z)

Expand Down

0 comments on commit 6c62c14

Please sign in to comment.