| /freebsd/sys/contrib/openzfs/module/icp/asm-x86_64/aes/ |
| H A D | aeskey.c | 1 // SPDX-License-Identifier: Brian-Gladman-3-Clause 17 * 3. the name of the copyright holder is not used to endorse products 57 * 3. Remove code under ifdef USE_VIA_ACE_IF_PRESENT (always undefined) 82 #define ke4(k, i) \ argument 83 { k[4 * (i) + 4] = ss[0] ^= ls_box(ss[3], 3) ^ t_use(r, c)[i]; \ 84 k[4 * (i) + 5] = ss[1] ^= ss[0]; \ 85 k[4 * (i) + 6] = ss[2] ^= ss[1]; \ 86 k[4 * (i) + 7] = ss[3] ^= ss[2]; \ 97 rk[3] = ss[3] = word_in(key, 3); in aes_encrypt_key128() 101 ke4(rk, 2); ke4(rk, 3); in aes_encrypt_key128() [all …]
|
| /freebsd/crypto/krb5/src/lib/crypto/builtin/aes/ |
| H A D | aeskey.c | 85 #define ke4(k,i) \ argument 86 { k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; \ 87 k[4*(i)+5] = ss[1] ^= ss[0]; \ 88 k[4*(i)+6] = ss[2] ^= ss[1]; \ 89 k[4*(i)+7] = ss[3] ^= ss[2]; \ 98 cx->ks[3] = ss[3] = word_in(key, 3); in aes_xi() 102 ke4(cx->ks, 2); ke4(cx->ks, 3); in aes_xi() 128 #define kef6(k,i) \ argument 129 { k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; \ 130 k[6*(i)+ 7] = ss[1] ^= ss[0]; \ [all …]
|
| /freebsd/crypto/openssl/crypto/modes/asm/ |
| H A D | aes-gcm-armv8_64.pl | 27 # | CTR block 4k+8 | AES block 4k+4 | GHASH block 4k+0 | 30 # | CTR block 4k+9 | AES block 4k+5 | GHASH block 4k+1 | 33 # | CTR block 4k+10| AES block 4k+6 | GHASH block 4k+2 | 36 # | CTR block 4k+11| AES block 4k+7 | GHASH block 4k+3 | 43 # Ensure previous generated intermediate hash is aligned and merged with result for GHASH 4k+0 45 # EOR res_curr (4k+0), res_curr (4k+0), low_acc 114 # The idea behind Karatsuba multiplication is that we can do just 3 64b multiplies: 285 lsr $main_end_input_ptr, $bit_length, #3 @ byte_len 289 add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr 306 fmov $ctr3d, $ctr96_b64x @ CTR block 3 [all …]
|
| H A D | aes-gcm-armv8-unroll8_64.pl | 14 # licensed under OpenSSL and SPDX BSD-3-Clause licenses depending on where you 27 # | CTR block 8k+13| AES block 8k+8 | GHASH block 8k+0 | 30 # | CTR block 8k+14| AES block 8k+9 | GHASH block 8k+1 | 33 # | CTR block 8k+15| AES block 8k+10| GHASH block 8k+2 | 36 # | CTR block 8k+16| AES block 8k+11| GHASH block 8k+3 | 39 # | CTR block 8k+17| AES block 8k+12| GHASH block 8k+4 | 42 # | CTR block 8k+18| AES block 8k+13| GHASH block 8k+5 | 45 # | CTR block 8k+19| AES block 8k+14| GHASH block 8k+6 | 48 # | CTR block 8k+20| AES block 8k+15| GHASH block 8k+7 | 55 # Ensure previous generated intermediate hash is aligned and merged with result for GHASH 4k+0 [all …]
|
| /freebsd/sys/crypto/openssl/aarch64/ |
| H A D | aes-gcm-armv8_64.S | 36 lsr x5, x1, #3 //byte_len 40 add x4, x0, x1, lsr #3 //end_input_ptr 57 fmov d3, x10 //CTR block 3 70 rev w9, w12 //CTR block 3 72 orr x9, x11, x9, lsl #32 //CTR block 3 75 add w12, w12, #1 //CTR block 3 76 fmov v3.d[1], x9 //CTR block 3 98 aesmc v3.16b, v3.16b //AES block 3 - round 0 114 aesmc v3.16b, v3.16b //AES block 3 - round 1 129 aesmc v3.16b, v3.16b //AES block 3 - round 2 [all …]
|
| H A D | aes-gcm-armv8-unroll8_64.S | 14 lsr x9, x1, #3 44 rev32 v3.16b, v30.16b //CTR block 3 45 add v30.4s, v30.4s, v31.4s //CTR block 3 65 aesmc v3.16b, v3.16b //AES block 3 - round 0 81 aesmc v3.16b, v3.16b //AES block 3 - round 1 107 aesmc v3.16b, v3.16b //AES block 3 - round 2 119 aesmc v2.16b, v2.16b //AES block 2 - round 3 123 aesmc v5.16b, v5.16b //AES block 5 - round 3 125 aesmc v0.16b, v0.16b //AES block 0 - round 3 128 aesmc v4.16b, v4.16b //AES block 4 - round 3 [all …]
|
| /freebsd/share/doc/papers/sysperf/ |
| H A D | appendix.ms | 12 'bd B 3 13 'bd S B 3 44 'ds +K 45 'ds -K 50 'ds +K \f3 51 'ds -K \fP 56 'ne 3 84 .\" 3. Neither the name of the University nor the names of its contributors 133 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[]; 134 \*(+K{\*(-K [all …]
|
| /freebsd/crypto/openssl/test/recipes/04-test_pem_reading_data/ |
| H A D | dsa-onecolumn.pem | 31 k 63 3 72 K 81 K 92 K 122 3 147 3 148 k 171 3 173 k [all …]
|
| H A D | cert-onecolumn.pem | 19 k 32 k 35 k 159 3 219 3 283 3 291 3 367 3 385 k 599 3 [all …]
|
| /freebsd/sys/libkern/ |
| H A D | jenkins_hash.c | 37 Why is this so big? I read 12 bytes at a time into 3 4-byte integers, 39 mixing with 12*3 instructions on 3 integers than you can with 3 instructions 44 #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k)))) argument 48 mix -- mix 3 32-bit values reversibly. 67 Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that 70 9 15 3 18 27 15 71 14 9 3 7 17 3 72 Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing 102 final -- final mixing of 3 32-bit values (a,b,c) into c 120 4 8 15 26 3 22 24 [all …]
|
| /freebsd/contrib/bearssl/src/ec/ |
| H A D | ec_c25519_m64.c | 91 w = m & (a[3] ^ b[3]); a[3] ^= w; b[3] ^= w; in f255_cswap() 111 z = (unsigned __int128)a[3] + (unsigned __int128)b[3] + (z >> 64); in f255_add() 129 d[3] = t3 + (uint64_t)(z >> 64); in f255_add() 134 unsigned char k; in f255_add() 136 k = _addcarry_u64(0, a[0], b[0], &t0); in f255_add() 137 k = _addcarry_u64(k, a[1], b[1], &t1); in f255_add() 138 k = _addcarry_u64(k, a[2], b[2], &t2); in f255_add() 139 k = _addcarry_u64(k, a[3], b[3], &t3); in f255_add() 140 cc = (k << 1) + (t3 >> 63); in f255_add() 151 k = _addcarry_u64(0, t0, 19 * cc, &d[0]); in f255_add() [all …]
|
| /freebsd/crypto/openssl/crypto/chacha/asm/ |
| H A D | chacha-ia64.pl | 20 my @k = map("r$_",(16..31)); 46 ADDP @k[11]=4,$key 57 { .mlx; ld4 @k[4]=[$key],8 58 movl @k[0]=0x61707865 } 59 { .mlx; ld4 @k[5]=[@k[11]],8 60 movl @k[1]=0x3320646e };; 61 { .mlx; ld4 @k[6]=[$key],8 62 movl @k[2]=0x79622d32 } 63 { .mlx; ld4 @k[7]=[@k[11]],8 64 movl @k[3]=0x6b206574 };; [all …]
|
| H A D | chacha-armv8.pl | 23 # Replace 3xNEON+1xIALU code path with 4+1. 4+1 is actually fastest 75 my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); 76 my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); 77 my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); 149 .long 1,2,3,4 185 ldp @d[2],@d[3],[$key] // load key 190 ror @d[3],@d[3],#32 201 lsr @x[3],@d[1],#32 204 mov.32 @x[6],@d[3] 205 lsr @x[7],@d[3],#32 [all …]
|
| /freebsd/sys/contrib/dpdk_rte_lpm/ |
| H A D | rte_jhash.h | 1 /* SPDX-License-Identifier: BSD-3-Clause 39 #define rot(x, k) (((x) << (k)) | ((x) >> (32-(k)))) argument 65 #define BIT_SHIFT(x, y, k) (((x) >> (k)) | ((uint64_t)(y) << (32-(k)))) argument 67 #define BIT_SHIFT(x, y, k) (((uint64_t)(x) << (k)) | ((y) >> (32-(k)))) 89 const uint32_t *k = (const uint32_t *)key; in __rte_jhash_2hashes() local 92 const uint32_t *k = (uint32_t *)((uintptr_t)key & (uintptr_t)~3); in __rte_jhash_2hashes() local 93 const uint32_t s = ((uintptr_t)key & 3) * CHAR_BIT; in __rte_jhash_2hashes() 97 a += k[0]; in __rte_jhash_2hashes() 98 b += k[1]; in __rte_jhash_2hashes() 99 c += k[2]; in __rte_jhash_2hashes() [all …]
|
| /freebsd/contrib/unbound/util/storage/ |
| H A D | lookup3.c | 43 Why is this so big? I read 12 bytes at a time into 3 4-byte integers, 45 mixing with 12*3 instructions on 3 integers than you can with 3 instructions 118 #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k)))) argument 131 mix -- mix 3 32-bit values reversibly. 150 Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that 153 9 15 3 18 27 15 154 14 9 3 7 17 3 155 Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing 185 final -- final mixing of 3 32-bit values (a,b,c) into c 203 4 8 15 26 3 22 24 [all …]
|
| /freebsd/crypto/openssl/crypto/aes/asm/ |
| H A D | aes-c64xplus.pl | 26 # code is 3.75x faster and almost 3x smaller (tables included). 44 @K=("A6","B6","A7","B7"); 120 || LDW *$KPB++[2],$Te0[3] 127 || MV B8,$s[3] 132 || MV B9,$s[3] 136 || LDW *$KPA++[2],$K[0] ; 1st round key 137 || LDW *$KPB++[2],$K[1] 142 || LDW *$KPA++[2],$K[2] 143 || LDW *$KPB++[2],$K[3] 150 || XOR $s[3],$Te0[3],$s[3] ; modulo-scheduled [all …]
|
| /freebsd/contrib/file/tests/ |
| H A D | matilde.arm.testfile | 2 <[d��y�����'�P�[<k�0^��<j~yJ/!ݘG&�����e�4ta��+a�<�p������(����n���{i�/�8A�<� ٫7… 3 …S#����I�=���<6\��r$���K:�z�Ceo5����苭�<2�d�m!��i:�((���5pT�A( y�,2��<�^���B�`�g�dtT�l… 6 …Pg����*�0�*=�K|�K~��%PS�k`<� mJ���,��=�Fxh �� S �<Cg��!ˀj1�`��b�\�~.փ�$$瑰<<�r?��… 9 !�:���=K����[��<Ɖ�lH��!L��-��I��w�9:y��<�U'�ԫ�Lc�\vyY>�Ԫ�ϧ�4p<&@i�~#�������)J$�� 11 …a-��0�Z���p~iz�PP��� �<4xcC��`���x��{��Z\DT�~�;Y��<2�i�'�=�j"\�a�d�>Pa�A:N��du@<4r,����K� 13 ]��o�<xm�a'H��K�_��1_���A��G�M�@<��o�a��5�6!l4� 14 ,�3۳ޢl�<`e�/wb��0���n�(R�! p&�K�0<&qX�?��kƳ��y���fD�.+2D��`<L{��K��E2�)5Em@Z�.�fN@… 15 …����А��0&��Y�lCZ�<z�����'h(kZ�k)վ`� ���~�<w@~���b9�w��⎭������\����0<:@~�e��j���cH���x�… 16 G�����K)�i��� 19 -k�)�����v]<k{�i�9%������9>�]���H��`�@<=�4�ve#�O��r��}
|
| H A D | HWP97.hwp.testfile | 2 m��9eI��yؾ�s�N��i�� ���cWgg�K�q1�3.&}�=��k9�r��+w�u�xp 5 …҅���\t�8���#S&O�貔������ �Z��SV��u�C�:�!g���阔���5*;�L4e�<� ������w��N�k��Kf{�iq���I'O`H�tH… 8 …��l����a�ˤ�&W:Ln�VdR�u�;*g�^���|�N���צ��{��h_ \��t�:K�Y�>�� i����P�G2i�3��]�����… 12 ����ɡ�����[��B�ՄiҠ�%���"�>��y0۠�d9�h���*����q��D{m��h�N\D��\��w���]`ד�Ws�؊�����ö3�r�Z8�H�… 14 �bo�����Z�rb����^r~�Kο᮹u�'n�S���8&.!��K���y�p���b����@�>`����(G�9Zp~QX�Ve� 15 �U��s�]�Y �}#�ѽ�k�"!����9v����ߕa�/튏ٰ�������g,��IL����'.��\`Q�3�kpr��zo�p�s��� ? G.*� 16 �8���%p���c���H�M8<7X��y�r���H�;��a�7��{�oՙ��y�v�VCⶼ��z˶|lP=n�y�<��V˾����;�-d#5�ع��3�… 17 lK ��ߥk��'��9��%i&�G��b$�Q��$M�V�0N4��R4��\&�\$���c� 18 …��ߖmVm@R���u--p�]:r��3H�� �M�GDs�t�1N�'���o<r��x��&���~�%}w����8w�Px������cWç��8,}ƅ�ϸ����d�… 20 sw�n�b@�]�:���K��gv����ɓ. t��7_ ��������JA�}�}���z����M�0�`�l)�e{;B!�j�3!����…
|
| /freebsd/sys/dev/cxgb/common/ |
| H A D | jhash.h | 27 a -= b; a -= c; a ^= (c>>3); \ 42 const u8 *k = key; in jhash() local 49 a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); in jhash() 50 b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); in jhash() 51 c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); in jhash() 55 k += 12; in jhash() 61 case 11: c += ((u32)k[10]<<24); in jhash() 62 case 10: c += ((u32)k[9]<<16); in jhash() 63 case 9 : c += ((u32)k[8]<<8); in jhash() 64 case 8 : b += ((u32)k[7]<<24); in jhash() [all …]
|
| /freebsd/crypto/openssh/openbsd-compat/ |
| H A D | memmem.c | 38 twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) in twobyte_memmem() argument 41 for (h+=2, k-=2; k; k--, hw = hw<<8 | *h++) in twobyte_memmem() 47 threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) in threebyte_memmem() argument 51 for (h+=3, k-=3; k; k--, hw = (hw|*h++)<<8) in threebyte_memmem() 52 if (hw == nw) return (char *)h-3; in threebyte_memmem() 53 return hw == nw ? (char *)h-3 : 0; in threebyte_memmem() 57 fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) in fourbyte_memmem() argument 59 uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3]; in fourbyte_memmem() 60 uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3]; in fourbyte_memmem() 61 for (h+=4, k-=4; k; k--, hw = hw<<8 | *h++) in fourbyte_memmem() [all …]
|
| /freebsd/lib/libc/string/ |
| H A D | memmem.c | 29 twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) in twobyte_memmem() argument 32 for (h += 2, k -= 2; k; k--, hw = hw << 8 | *h++) in twobyte_memmem() 39 threebyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) in threebyte_memmem() argument 43 for (h += 3, k -= 3; k; k--, hw = (hw | *h++) << 8) in threebyte_memmem() 45 return (char *)h - 3; in threebyte_memmem() 46 return hw == nw ? (char *)h - 3 : 0; in threebyte_memmem() 50 fourbyte_memmem(const unsigned char *h, size_t k, const unsigned char *n) in fourbyte_memmem() argument 52 uint32_t nw = (uint32_t)n[0] << 24 | n[1] << 16 | n[2] << 8 | n[3]; in fourbyte_memmem() 53 uint32_t hw = (uint32_t)h[0] << 24 | h[1] << 16 | h[2] << 8 | h[3]; in fourbyte_memmem() 54 for (h += 4, k -= 4; k; k--, hw = hw << 8 | *h++) in fourbyte_memmem() [all …]
|
| /freebsd/crypto/openssl/crypto/whrlpool/ |
| H A D | wp_block.c | 182 # define C0(K,i) (Cx.q[K.c[(i)*8+0]]) argument 183 # define C1(K,i) ROTATE(Cx.q[K.c[(i)*8+1]],8) argument 184 # define C2(K,i) ROTATE(Cx.q[K.c[(i)*8+2]],16) argument 185 # define C3(K,i) ROTATE(Cx.q[K.c[(i)*8+3]],24) argument 186 # define C4(K,i) ROTATE(Cx.q[K.c[(i)*8+4]],32) argument 187 # define C5(K,i) ROTATE(Cx.q[K.c[(i)*8+5]],40) argument 188 # define C6(K,i) ROTATE(Cx.q[K.c[(i)*8+6]],48) argument 189 # define C7(K,i) ROTATE(Cx.q[K.c[(i)*8+7]],56) argument 200 # define C0(K,i) (Cx.q[0+8*K.c[(i)*8+0]]) argument 201 # define C1(K,i) (Cx.q[1+8*K.c[(i)*8+1]]) argument [all …]
|
| /freebsd/sys/compat/linuxkpi/common/include/linux/ |
| H A D | jhash.h | 34 a -= b; a -= c; a ^= (c>>3); \ 49 const u8 *k = key; in jhash() local 56 a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); in jhash() 57 b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); in jhash() 58 c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); in jhash() 62 k += 12; in jhash() 68 case 11: c += ((u32)k[10]<<24); in jhash() 69 case 10: c += ((u32)k[9]<<16); in jhash() 70 case 9 : c += ((u32)k[8]<<8); in jhash() 71 case 8 : b += ((u32)k[7]<<24); in jhash() [all …]
|
| /freebsd/crypto/krb5/src/plugins/preauth/spake/ |
| H A D | t_vectors.c | 49 const char *K; member 60 /* initial key, w, x, y, T, S, K */ 77 /* K'[0], K'[1], K'[2], K'[3] */ 85 /* initial key, w, x, y, T, S, K */ 102 /* K'[0], K'[1], K'[2], K'[3] */ 110 /* initial key, w, x, y, T, S, K */ 127 /* K'[0], K'[1], K'[2], K'[3] */ 134 /* initial key, w, x, y, T, S, K */ 151 /* K'[0], K'[1], K'[2], K'[3] */ 160 /* initial key, w, x, y, T, S, K */ [all …]
|
| /freebsd/sys/contrib/zlib/ |
| H A D | crc32.c | 34 each word consists of W bytes (4 or 8). If N is 3, for example, then three 36 indices in the array of words: 0, 3, 6, ..., 1, 4, 7, ..., and 2, 5, 8, ... 173 Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been 176 local z_crc_t x2nmodp(z_off64_t n, unsigned k) { in x2nmodp() argument 182 p = multmodp(x2n_table[k & 31], p); in x2nmodp() 184 k++; in x2nmodp() 294 byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, 348 int k, n; in make_crc_table() local 407 for (k = 0; k < 8; k++) { in make_crc_table() 409 write_table(out, ltl[k], 256); in make_crc_table() [all …]
|