summaryrefslogtreecommitdiff
path: root/arch/arm64/crypto/sm4-neon-core.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/crypto/sm4-neon-core.S')
-rw-r--r--arch/arm64/crypto/sm4-neon-core.S113
1 files changed, 0 insertions, 113 deletions
diff --git a/arch/arm64/crypto/sm4-neon-core.S b/arch/arm64/crypto/sm4-neon-core.S
index f295b4b7d70a..734dc7193610 100644
--- a/arch/arm64/crypto/sm4-neon-core.S
+++ b/arch/arm64/crypto/sm4-neon-core.S
@@ -438,119 +438,6 @@ SYM_FUNC_START(sm4_neon_cbc_dec)
SYM_FUNC_END(sm4_neon_cbc_dec)
.align 3
-SYM_FUNC_START(sm4_neon_cfb_dec)
- /* input:
- * x0: round key array, CTX
- * x1: dst
- * x2: src
- * x3: iv (big endian, 128 bit)
- * w4: nblocks
- */
- SM4_PREPARE()
-
- ld1 {v0.16b}, [x3]
-
-.Lcfb_dec_loop_8x:
- sub w4, w4, #8
- tbnz w4, #31, .Lcfb_dec_4x
-
- ld1 {v1.16b-v3.16b}, [x2], #48
- ld4 {v4.4s-v7.4s}, [x2]
-
- transpose_4x4(v0, v1, v2, v3)
-
- SM4_CRYPT_BLK8(v0, v1, v2, v3, v4, v5, v6, v7)
-
- sub x2, x2, #48
- ld1 {RTMP0.16b-RTMP3.16b}, [x2], #64
- ld1 {RTMP4.16b-RTMP7.16b}, [x2], #64
-
- eor v0.16b, v0.16b, RTMP0.16b
- eor v1.16b, v1.16b, RTMP1.16b
- eor v2.16b, v2.16b, RTMP2.16b
- eor v3.16b, v3.16b, RTMP3.16b
- eor v4.16b, v4.16b, RTMP4.16b
- eor v5.16b, v5.16b, RTMP5.16b
- eor v6.16b, v6.16b, RTMP6.16b
- eor v7.16b, v7.16b, RTMP7.16b
-
- st1 {v0.16b-v3.16b}, [x1], #64
- st1 {v4.16b-v7.16b}, [x1], #64
-
- mov v0.16b, RTMP7.16b
-
- cbz w4, .Lcfb_dec_end
- b .Lcfb_dec_loop_8x
-
-.Lcfb_dec_4x:
- add w4, w4, #8
- cmp w4, #4
- blt .Lcfb_dec_tail
-
- sub w4, w4, #4
-
- ld1 {v4.16b-v7.16b}, [x2], #64
-
- rev32 v0.16b, v0.16b /* v0 is IV register */
- rev32 v1.16b, v4.16b
- rev32 v2.16b, v5.16b
- rev32 v3.16b, v6.16b
-
- transpose_4x4(v0, v1, v2, v3)
-
- SM4_CRYPT_BLK4_BE(v0, v1, v2, v3)
-
- eor v0.16b, v0.16b, v4.16b
- eor v1.16b, v1.16b, v5.16b
- eor v2.16b, v2.16b, v6.16b
- eor v3.16b, v3.16b, v7.16b
-
- st1 {v0.16b-v3.16b}, [x1], #64
-
- mov v0.16b, v7.16b
-
- cbz w4, .Lcfb_dec_end
-
-.Lcfb_dec_tail:
- cmp w4, #2
- ld1 {v4.16b}, [x2], #16
- blt .Lcfb_dec_tail_load_done
- ld1 {v5.16b}, [x2], #16
- beq .Lcfb_dec_tail_load_done
- ld1 {v6.16b}, [x2], #16
-
-.Lcfb_dec_tail_load_done:
- rev32 v0.16b, v0.16b /* v0 is IV register */
- rev32 v1.16b, v4.16b
- rev32 v2.16b, v5.16b
-
- transpose_4x4(v0, v1, v2, v3)
-
- SM4_CRYPT_BLK4_BE(v0, v1, v2, v3)
-
- cmp w4, #2
- eor v0.16b, v0.16b, v4.16b
- st1 {v0.16b}, [x1], #16
- mov v0.16b, v4.16b
- blt .Lcfb_dec_end
-
- eor v1.16b, v1.16b, v5.16b
- st1 {v1.16b}, [x1], #16
- mov v0.16b, v5.16b
- beq .Lcfb_dec_end
-
- eor v2.16b, v2.16b, v6.16b
- st1 {v2.16b}, [x1], #16
- mov v0.16b, v6.16b
-
-.Lcfb_dec_end:
- /* store new IV */
- st1 {v0.16b}, [x3]
-
- ret
-SYM_FUNC_END(sm4_neon_cfb_dec)
-
-.align 3
SYM_FUNC_START(sm4_neon_ctr_crypt)
/* input:
* x0: round key array, CTX