Lines Matching +full:v1 +full:- +full:v6

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm64/crypto/aes-modes.S - chaining mode wrappers for AES
5 * Copyright (C) 2013 - 2017 Linaro Ltd <ard.biesheuvel@linaro.org>
8 /* included by aes-ce.S and aes-neon.S */
26 encrypt_block4x v0, v1, v2, v3, w3, x2, x8, w7
31 decrypt_block4x v0, v1, v2, v3, w3, x2, x8, w7
37 encrypt_block5x v0, v1, v2, v3, v4, w3, x2, x8, w7
42 decrypt_block5x v0, v1, v2, v3, v4, w3, x2, x8, w7
55 stp x29, x30, [sp, #-16]!
63 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 pt blocks */
67 st1 {v0.16b-v3.16b}, [x0], #64
86 stp x29, x30, [sp, #-16]!
94 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 ct blocks */
98 st1 {v0.16b-v3.16b}, [x0], #64
132 mov w8, #14 /* AES-256: 14 rounds */
145 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 pt blocks */
148 eor v1.16b, v1.16b, v0.16b
149 encrypt_block v1, w3, x2, x6, w7
150 eor v2.16b, v2.16b, v1.16b
154 st1 {v0.16b-v3.16b}, [x0], #64
174 stp x29, x30, [sp, #-16]!
179 mov w8, #14 /* AES-256: 14 rounds */
185 stp x29, x30, [sp, #-16]!
195 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 ct blocks */
199 mov v6.16b, v1.16b
204 eor v1.16b, v1.16b, v5.16b
207 eor v2.16b, v2.16b, v6.16b
212 mov v5.16b, v1.16b
213 mov v6.16b, v2.16b
217 eor v1.16b, v1.16b, v4.16b
220 eor v3.16b, v3.16b, v6.16b
222 st1 {v0.16b-v3.16b}, [x0], #64
229 ld1 {v1.16b}, [x1], #16 /* get next ct block */
230 mov v0.16b, v1.16b /* ...and copy to v0 */
233 mov cbciv.16b, v1.16b /* ct is next iv */
262 ld1 {v1.16b}, [x1]
268 tbl v1.16b, {v1.16b}, v4.16b
271 eor v1.16b, v1.16b, v0.16b
273 encrypt_block v1, w3, x2, x6, w7
277 st1 {v1.16b}, [x0]
291 ld1 {v1.16b}, [x1]
298 eor v2.16b, v2.16b, v1.16b
300 tbx v0.16b, {v1.16b}, v4.16b
340 stp x29, x30, [sp, #-16]!
349 * the 64-bit counter with the IV.
368 * Set up the counter values in v0-v{MAX_STRIDE-1}.
372 * v{MAX_STRIDE-1}. For example: if encrypting two blocks with
381 mov v1.16b, vctr.16b
386 sub x6, CTR, #MAX_STRIDE - 1
387 sub x7, CTR, #MAX_STRIDE - 2
388 sub x8, CTR, #MAX_STRIDE - 3
389 sub x9, CTR, #MAX_STRIDE - 4
390 ST5( sub x10, CTR, #MAX_STRIDE - 5 )
397 mov v1.d[0], x7
434 mov v1.d[0], vctr.d[0]
446 sub x7, IV_PART, #MAX_STRIDE - 1
447 sub x8, IV_PART, #MAX_STRIDE - 2
448 sub x9, IV_PART, #MAX_STRIDE - 3
451 mov v1.d[1], x7
453 ST5( sub x10, IV_PART, #MAX_STRIDE - 4 )
465 ld1 {v5.16b-v7.16b}, [IN], #48
470 eor v1.16b, v6.16b, v1.16b
471 ST5( ld1 {v5.16b-v6.16b}, [IN], #32 )
474 ST5( eor v4.16b, v6.16b, v4.16b )
475 st1 {v0.16b-v3.16b}, [OUT], #64
489 * Handle up to MAX_STRIDE * 16 - 1 bytes of plaintext
491 * This code expects the last keystream block to be in v{MAX_STRIDE-1}.
504 ST5( cmp BYTES_W, #64 - (MAX_STRIDE << 4))
506 cmp BYTES_W, #48 - (MAX_STRIDE << 4)
508 cmp BYTES_W, #32 - (MAX_STRIDE << 4)
510 cmp BYTES_W, #16 - (MAX_STRIDE << 4)
517 ld1 {v6.16b}, [IN], x15
527 ST4( eor v6.16b, v6.16b, v0.16b )
528 ST4( eor v7.16b, v7.16b, v1.16b )
534 ST5( eor v6.16b, v6.16b, v1.16b )
541 st1 {v6.16b}, [OUT], x15
568 ld1 {v6.16b}, [OUT]
571 ld1 {v10.16b-v11.16b}, [x9]
575 bif v5.16b, v6.16b, v11.16b
602 * to be at the end of this 16-byte temporary buffer rather than the
617 * to be at the end of this 16-byte temporary buffer rather than the
648 stp x29, x30, [sp, #-16]!
668 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 pt blocks */
671 next_tweak v6, v5, v8
672 eor v1.16b, v1.16b, v5.16b
673 eor v2.16b, v2.16b, v6.16b
674 next_tweak v7, v6, v8
679 eor v1.16b, v1.16b, v5.16b
680 eor v2.16b, v2.16b, v6.16b
681 st1 {v0.16b-v3.16b}, [x0], #64
723 ld1 {v1.16b}, [x1] /* load final block */
728 tbx v0.16b, {v1.16b}, v3.16b
735 stp x29, x30, [sp, #-16]!
761 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 ct blocks */
764 next_tweak v6, v5, v8
765 eor v1.16b, v1.16b, v5.16b
766 eor v2.16b, v2.16b, v6.16b
767 next_tweak v7, v6, v8
772 eor v1.16b, v1.16b, v5.16b
773 eor v2.16b, v2.16b, v6.16b
774 st1 {v0.16b-v3.16b}, [x0], #64
812 ld1 {v1.16b}, [x1] /* load final block */
821 tbx v0.16b, {v1.16b}, v3.16b
842 ld1 {v1.16b-v4.16b}, [x0], #64 /* get next pt block */
843 eor v0.16b, v0.16b, v1.16b /* ..and xor with dg */
861 ld1 {v1.16b}, [x0], #16 /* get next pt block */
862 eor v0.16b, v0.16b, v1.16b /* ..and xor with dg */