• Home
  • Raw
  • Download

Lines Matching +full:quad +full:- +full:phase

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Implement AES algorithm in Intel AES-NI instructions.
5 * The white paper of AES-NI instructions can be downloaded from:
6 * http://softwarecommunity.intel.com/isn/downloads/intelavx/AES-Instructions-Set_WP.pdf
13 * Added RFC4106 AES-GCM support for 128-bit keys under the AEAD
14 * interface for 64-bit kernels.
30 #include <asm/nospec-branch.h>
35 * movaps (move aligned packed single) or integer use movdqa (move double quad
252 # Clobbers rax, r10-r13 and xmm0-xmm6, %xmm13
278 # Clobbers rax, r10-r13, and xmm0-xmm15
290 and $-16, %r13 # %r13 = %r13 - (%r13 mod 16)
319 # Main loop - Encrypt/Decrypt remaining blocks
373 # adjust the shuffle mask pointer to be able to shift 16-r13 bytes
378 # shift right 16-r13 bytes
390 # get the appropriate mask to mask out top 16-r13 bytes of xmm0
391 pand %xmm1, %xmm0 # mask out top 16-r13 bytes of xmm0
433 # Clobbers rax, r10-r12, and xmm0, xmm1, xmm5-xmm15
508 * Input: A and B (128-bits each, bit-reflected)
531 # first phase of the reduction
548 # second phase of the reduction
589 mov -1(\DPTR, \DLEN, 1), %al
597 # clobbers r10-11, xmm14
610 pshufb %xmm14, \TMP7 # byte-reflect the AAD data
626 pshufb %xmm14, \TMP7 # byte-reflect the AAD data
639 # Clobbers rax, r10, r12, r13, xmm0-6, xmm9-13
666 # r16-r13 is the number of bytes in plaintext mod 16)
685 movdqu ALL_F-SHIFT_MASK(%r12), %xmm1
721 movdqu ALL_F-SHIFT_MASK(%r12), %xmm1
817 shr $2,%eax # 128->4, 192->6, 256->8
818 add $5,%eax # 128->9, 192->11, 256->13
913 shr $2,%eax # 128->4, 192->6, 256->8
914 sub $4,%eax # 128->0, 192->2, 256->4
1100 shr $2,%eax # 128->4, 192->6, 256->8
1101 sub $4,%eax # 128->0, 192->2, 256->4
1149 # first phase of reduction
1165 # second phase of reduction
1308 shr $2,%eax # 128->4, 192->6, 256->8
1309 sub $4,%eax # 128->0, 192->2, 256->4
1361 # first phase of reduction
1377 # second phase of reduction
1460 # TMP6:XMMDst holds the result of the accumulated carry-less multiplications
1461 # first phase of the reduction
1476 # second phase of the reduction
1500 shr $2,%eax # 128->4, 192->6, 256->8
1501 add $5,%eax # 128->9, 192->11, 256->13
1518 * u8 *out, // Plaintext output. Encrypt in-place is allowed.
1521 * u8 *iv, // Pre-counter block j0: 4 byte salt (from Security Associat…
1523 * // concatenated with 0x00000001. 16-byte aligned pointer.
1524 * u8 *hash_subkey, // H, the Hash sub key input. Data starts on a 16-byte bound…
1535 * keys are pre-expanded and aligned to 16 bytes. we are using the first
1541 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1543 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1546 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1548 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1562 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1564 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1565 * | 32-bit Sequence Number (A0) |
1566 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1568 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1570 * AAD Format with 32-bit Sequence Number
1578 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1580 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1582 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1583 * | 64-bit Extended Sequence Number {A1,A0} |
1585 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1587 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1589 * AAD Format with 64-bit Extended Sequence Number
1609 * u8 *out, // Ciphertext output. Encrypt in-place is allowed.
1612 * u8 *iv, // Pre-counter block j0: 4 byte salt (from Security Associ…
1614 * // concatenated with 0x00000001. 16-byte aligned pointer.
1615 * u8 *hash_subkey, // H, the Hash sub key input. Data starts on a 16-byte bou…
1625 * keys are pre-expanded and aligned to 16 bytes. we are using the
1632 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1634 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1637 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1639 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1653 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1655 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1656 * | 32-bit Sequence Number (A0) |
1657 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1659 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1661 * AAD Format with 32-bit Sequence Number
1669 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1671 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1672 * | 64-bit Extended Sequence Number {A1,A0} |
1674 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1676 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1678 * AAD Format with 64-bit Extended Sequence Number
1697 * u8 *iv, // Pre-counter block j0: 4 byte salt (from Security Assoc…
1699 * // concatenated with 0x00000001. 16-byte aligned pointer.
1700 * u8 *hash_subkey, // H, the Hash sub key input. Data starts on a 16-byte bo…
1715 * u8 *out, // Ciphertext output. Encrypt in-place is allowed.
1730 * u8 *out, // Ciphertext output. Encrypt in-place is allowed.
1925 lea 240-16(TKEYP), UKEYP
1989 movaps -0x60(TKEYP), KEY
1991 movaps -0x50(TKEYP), KEY
1995 movaps -0x40(TKEYP), KEY
1997 movaps -0x30(TKEYP), KEY
2001 movaps -0x20(TKEYP), KEY
2003 movaps -0x10(TKEYP), KEY
2055 movaps -0x60(TKEYP), KEY
2060 movaps -0x50(TKEYP), KEY
2067 movaps -0x40(TKEYP), KEY
2072 movaps -0x30(TKEYP), KEY
2079 movaps -0x20(TKEYP), KEY
2084 movaps -0x10(TKEYP), KEY
2179 movaps -0x60(TKEYP), KEY
2181 movaps -0x50(TKEYP), KEY
2185 movaps -0x40(TKEYP), KEY
2187 movaps -0x30(TKEYP), KEY
2191 movaps -0x20(TKEYP), KEY
2193 movaps -0x10(TKEYP), KEY
2245 movaps -0x60(TKEYP), KEY
2250 movaps -0x50(TKEYP), KEY
2257 movaps -0x40(TKEYP), KEY
2262 movaps -0x30(TKEYP), KEY
2269 movaps -0x20(TKEYP), KEY
2274 movaps -0x10(TKEYP), KEY