Lines Matching +full:23 +full:- +full:64
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 # Accelerated AES-GCM stitched implementation for ppc64le.
5 # Copyright 2024- IBM Inc.
22 # Hash keys = v3 - v14
29 # v31 - counter 1
32 # vs0 - round key 0
35 # This implementation uses stitched AES-GCM approach to improve overall performance.
66 stdu 1,-512(1)
77 SAVE_GPR 23, 184, 1
84 SAVE_VRS 23, 48, 9
85 SAVE_VRS 24, 64, 9
100 RESTORE_VRS 23, 48, 9
101 RESTORE_VRS 24, 64, 9
119 RESTORE_GPR 23, 184, 1
148 xxlor 32+23, 1, 1
152 AES_CIPHER_8x vcipher, 15, 23
156 xxlor 32+23, 5, 5
160 AES_CIPHER_8x vcipher, 15, 23
175 # Hash keys = v3 - v14
176 # Scratch: v23 - v29
180 vpmsumd 23, 12, \S1 # H4.L * X.L
188 vxor 23, 23, 24
189 vxor 23, 23, 25
190 vxor 23, 23, 26 # L
200 vpmsumd 28, 23, 2 # reduction
205 vxor 23, 23, 25 # mL + L
208 # vsldoi 23, 23, 23, 8 # swap
209 # vxor 23, 23, 28
211 vpermxor 23, 23, 28, 25
225 vsldoi 25, 23, 23, 8 # swap
226 vpmsumd 23, 23, 2
228 vxor \H, 23, 27
240 vpmsumd 23, 4, \S1 # M
245 vsldoi 25, 23, 1, 8 # mL
246 vsldoi 26, 1, 23, 8 # mH
253 vsldoi 23, 22, 22, 8 # swap
255 vxor 23, 23, 24
256 vxor \H, 22, 23
263 # Hash keys = v3 - v14
269 # load Hash - h^4, h^3, h^2, h
274 li 10, 64
319 # Pre-load 8 AES rounds to scratch vectors.
328 lwz 23, 240(6) # n rounds
329 addi 22, 23, -9 # remaing AES rounds
368 addi 5, 5, -16
373 addi 12, 12, -1
393 vspltisb 16, -1
405 lwz 23, 240(6) # n rounds
406 addi 22, 23, -1 # loop - 1
426 addi 12, 9, -1
451 li 10, 64
462 # - Compute ghash for a full block. Clear Partial_len and pblock. Update IV.
464 # - Don't compute ghash if not full block. gcm_update will take care of it
490 vspltisb 16, -1
511 lwz 23, 240(6) # n rounds
512 addi 22, 23, -1 # loop - 1
533 addi 15, 9, -1
554 li 10, 64
581 # gcm_update(iv, Xi) - compute last hash
591 # load Hash - h^4, h^3, h^2, h
596 li 10, 64
605 li 9, 64
639 # r3 - inp
640 # r4 - out
641 # r5 - len
642 # r6 - AES round keys
643 # r7 - iv and other data
644 # r8 - Xi, HPoli, hash keys
658 # initialize ICB: GHASH( IV ), IV - r7
659 lxvb16x 30+32, 0, 7 # load IV - v30
679 lxv 4, 64(6) # round key 4
685 # load rounds - 10 (128), 12 (192), 14 (256)
686 lwz 23, 240(6) # n rounds
705 divdu 12, 5, 10 # n 128 bytes-blocks
707 addi 12, 12, -1 # loop - 1
721 vxor 15, 15, 29 # IV + round key - add round key 0
733 li 18, 64
739 # Pre-compute first 8 AES state and leave 1/3/5 more rounds
742 addi 22, 23, -9 # process 8 keys
771 lxvb16x 32+23, 0, 14 # load block
781 vxor 15, 15, 23
819 vxor 15, 15, 27 # IV + round key - add round key 0
828 addi 5, 5, -128
841 addi 12, 12, -1
855 lxvb16x 32+23, 0, 14 # load block
865 vxor 15, 15, 23
895 addi 5, 5, -128
936 # initialize ICB: GHASH( IV ), IV - r7
937 lxvb16x 30+32, 0, 7 # load IV - v30
957 lxv 4, 64(6) # round key 4
963 # load rounds - 10 (128), 12 (192), 14 (256)
964 lwz 23, 240(6) # n rounds
983 divdu 12, 5, 10 # n 128 bytes-blocks
985 addi 12, 12, -1 # loop - 1
999 vxor 15, 15, 29 # IV + round key - add round key 0
1011 li 18, 64
1017 # Pre-compute first 8 AES state and leave 1/3/5 more rounds
1020 addi 22, 23, -9 # process 8 keys
1049 lxvb16x 32+23, 0, 14 # load block
1059 vxor 15, 15, 23
1079 vmr 15, 23
1107 vxor 15, 15, 27 # IV + round key - add round key 0
1116 addi 5, 5, -128
1129 addi 12, 12, -1
1143 lxvb16x 32+23, 0, 14 # load block
1153 vxor 15, 15, 23
1172 #vmr 15, 23
1173 vxor 15, 23, 0
1193 addi 5, 5, -128