| /kernel/linux/linux-4.19/net/ceph/crush/ |
| D | hash.c | 1 // SPDX-License-Identifier: GPL-2.0 9 * Robert Jenkins' function for mixing 32-bit values 11 * a, b = random bits, c = input and output 13 #define crush_hashmix(a, b, c) do { \ argument 14 a = a-b; a = a-c; a = a^(c>>13); \ 15 b = b-c; b = b-a; b = b^(a<<8); \ 16 c = c-a; c = c-b; c = c^(b>>13); \ 17 a = a-b; a = a-c; a = a^(c>>12); \ 18 b = b-c; b = b-a; b = b^(a<<16); \ 19 c = c-a; c = c-b; c = c^(b>>5); \ [all …]
|
| /kernel/linux/linux-5.10/net/ceph/crush/ |
| D | hash.c | 1 // SPDX-License-Identifier: GPL-2.0 9 * Robert Jenkins' function for mixing 32-bit values 11 * a, b = random bits, c = input and output 13 #define crush_hashmix(a, b, c) do { \ argument 14 a = a-b; a = a-c; a = a^(c>>13); \ 15 b = b-c; b = b-a; b = b^(a<<8); \ 16 c = c-a; c = c-b; c = c^(b>>13); \ 17 a = a-b; a = a-c; a = a^(c>>12); \ 18 b = b-c; b = b-a; b = b^(a<<16); \ 19 c = c-a; c = c-b; c = c^(b>>5); \ [all …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | sha1.c | 1 // SPDX-License-Identifier: GPL-2.0 23 * with a 'W(t)=(val);asm("":"+m" (W(t))' there instead, as 24 * suggested by Artur Skawina - that will also make gcc unable to 28 * Ben Herrenschmidt reports that on PPC, the C version comes close 32 * On ARM we get the best code generation by forcing a full memory barrier 45 /* This "rolls" over the 512-bit array */ 50 * the input data, the next mix it from the 512-bit array. 55 #define SHA_ROUND(t, input, fn, constant, A, B, C, D, E) do { \ argument 57 E += TEMP + rol32(A,5) + (fn) + (constant); \ 60 #define T_0_15(t, A, B, C, D, E) SHA_ROUND(t, SHA_SRC, (((C^D)&B)^D) , 0x5a827999, A, B, C, D, E ) argument [all …]
|
| /kernel/linux/linux-4.19/lib/ |
| D | sha1.c | 1 // SPDX-License-Identifier: GPL-2.0 23 * with a 'W(t)=(val);asm("":"+m" (W(t))' there instead, as 24 * suggested by Artur Skawina - that will also make gcc unable to 28 * Ben Herrenschmidt reports that on PPC, the C version comes close 32 * On ARM we get the best code generation by forcing a full memory barrier 45 /* This "rolls" over the 512-bit array */ 50 * the input data, the next mix it from the 512-bit array. 55 #define SHA_ROUND(t, input, fn, constant, A, B, C, D, E) do { \ argument 57 E += TEMP + rol32(A,5) + (fn) + (constant); \ 60 #define T_0_15(t, A, B, C, D, E) SHA_ROUND(t, SHA_SRC, (((C^D)&B)^D) , 0x5a827999, A, B, C, D, E ) argument [all …]
|
| D | sha256.c | 2 * SHA-256, as specified in 3 * http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf 5 * SHA-256 code by Jean-Luc Cooke <jlcooke@certainkey.com>. 7 * Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com> 8 * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk> 9 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 10 * Copyright (c) 2014 Red Hat Inc. 45 W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; in BLEND_OP() 50 u32 a, b, c, d, e, f, g, h, t1, t2; in sha256_transform() local 63 a = state[0]; b = state[1]; c = state[2]; d = state[3]; in sha256_transform() [all …]
|
| /kernel/linux/linux-5.10/net/ceph/ |
| D | ceph_hash.c | 10 #define mix(a, b, c) \ argument 12 a = a - b; a = a - c; a = a ^ (c >> 13); \ 13 b = b - c; b = b - a; b = b ^ (a << 8); \ 14 c = c - a; c = c - b; c = c ^ (b >> 13); \ 15 a = a - b; a = a - c; a = a ^ (c >> 12); \ 16 b = b - c; b = b - a; b = b ^ (a << 16); \ 17 c = c - a; c = c - b; c = c ^ (b >> 5); \ 18 a = a - b; a = a - c; a = a ^ (c >> 3); \ 19 b = b - c; b = b - a; b = b ^ (a << 10); \ 20 c = c - a; c = c - b; c = c ^ (b >> 15); \ [all …]
|
| /kernel/linux/linux-4.19/net/ceph/ |
| D | ceph_hash.c | 10 #define mix(a, b, c) \ argument 12 a = a - b; a = a - c; a = a ^ (c >> 13); \ 13 b = b - c; b = b - a; b = b ^ (a << 8); \ 14 c = c - a; c = c - b; c = c ^ (b >> 13); \ 15 a = a - b; a = a - c; a = a ^ (c >> 12); \ 16 b = b - c; b = b - a; b = b ^ (a << 16); \ 17 c = c - a; c = c - b; c = c ^ (b >> 5); \ 18 a = a - b; a = a - c; a = a ^ (c >> 3); \ 19 b = b - c; b = b - a; b = b ^ (a << 10); \ 20 c = c - a; c = c - b; c = c ^ (b >> 15); \ [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
| D | test_jhash.h | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2019 Facebook 9 return (word << shift) | (word >> ((-shift) & 31)); in rol32() 12 #define __jhash_mix(a, b, c) \ argument 14 a -= c; a ^= rol32(c, 4); c += b; \ 15 b -= a; b ^= rol32(a, 6); a += c; \ 16 c -= b; c ^= rol32(b, 8); b += a; \ 17 a -= c; a ^= rol32(c, 16); c += b; \ 18 b -= a; b ^= rol32(a, 19); a += c; \ 19 c -= b; c ^= rol32(b, 4); b += a; \ [all …]
|
| /kernel/linux/linux-4.19/include/linux/ |
| D | jhash.h | 6 * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) 12 * lookup3.c, by Bob Jenkins, May 2006, Public Domain. 14 * These are functions for producing 32-bit hashes for hash table lookup. 20 * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) 32 #define jhash_mask(n) (jhash_size(n)-1) 34 /* __jhash_mix -- mix 3 32-bit values reversibly. */ 35 #define __jhash_mix(a, b, c) \ argument 37 a -= c; a ^= rol32(c, 4); c += b; \ 38 b -= a; b ^= rol32(a, 6); a += c; \ 39 c -= b; c ^= rol32(b, 8); b += a; \ [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | jhash.h | 6 * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) 12 * lookup3.c, by Bob Jenkins, May 2006, Public Domain. 14 * These are functions for producing 32-bit hashes for hash table lookup. 20 * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@netfilter.org) 32 #define jhash_mask(n) (jhash_size(n)-1) 34 /* __jhash_mix -- mix 3 32-bit values reversibly. */ 35 #define __jhash_mix(a, b, c) \ argument 37 a -= c; a ^= rol32(c, 4); c += b; \ 38 b -= a; b ^= rol32(a, 6); a += c; \ 39 c -= b; c ^= rol32(b, 8); b += a; \ [all …]
|
| /kernel/linux/linux-4.19/tools/include/linux/ |
| D | jhash.h | 6 * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) 12 * lookup3.c, by Bob Jenkins, May 2006, Public Domain. 14 * These are functions for producing 32-bit hashes for hash table lookup. 20 * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) 32 #define jhash_mask(n) (jhash_size(n)-1) 34 /* __jhash_mix -- mix 3 32-bit values reversibly. */ 35 #define __jhash_mix(a, b, c) \ argument 37 a -= c; a ^= rol32(c, 4); c += b; \ 38 b -= a; b ^= rol32(a, 6); a += c; \ 39 c -= b; c ^= rol32(b, 8); b += a; \ [all …]
|
| /kernel/linux/linux-5.10/tools/include/linux/ |
| D | jhash.h | 6 * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) 12 * lookup3.c, by Bob Jenkins, May 2006, Public Domain. 14 * These are functions for producing 32-bit hashes for hash table lookup. 20 * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) 32 #define jhash_mask(n) (jhash_size(n)-1) 34 /* __jhash_mix -- mix 3 32-bit values reversibly. */ 35 #define __jhash_mix(a, b, c) \ argument 37 a -= c; a ^= rol32(c, 4); c += b; \ 38 b -= a; b ^= rol32(a, 6); a += c; \ 39 c -= b; c ^= rol32(b, 8); b += a; \ [all …]
|
| /kernel/linux/linux-5.10/crypto/ |
| D | md4.c | 11 * Copyright (c) Andrew Tridgell 1997-1998. 13 * Copyright (c) Cryptoapi developers. 14 * Copyright (c) 2002 David S. Miller (davem@redhat.com) 15 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 45 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s)); in lshift() 63 #define ROUND1(a,b,c,d,k,s) (a = lshift(a + F(b,c,d) + k, s)) argument 64 #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (u32)0x5A827999,s)) argument 65 #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (u32)0x6ED9EBA1,s)) argument 69 u32 a, b, c, d; in md4_transform() local 71 a = hash[0]; in md4_transform() [all …]
|
| D | md5.c | 9 * Copyright (c) Cryptoapi developers. 10 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 38 (w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x) 42 u32 a, b, c, d; in md5_transform() local 44 a = hash[0]; in md5_transform() 46 c = hash[2]; in md5_transform() 49 MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); in md5_transform() 50 MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); in md5_transform() 51 MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); in md5_transform() 52 MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); in md5_transform() [all …]
|
| /kernel/linux/linux-4.19/crypto/ |
| D | md4.c | 11 * Copyright (c) Andrew Tridgell 1997-1998. 13 * Copyright (c) Cryptoapi developers. 14 * Copyright (c) 2002 David S. Miller (davem@redhat.com) 15 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 45 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s)); in lshift() 63 #define ROUND1(a,b,c,d,k,s) (a = lshift(a + F(b,c,d) + k, s)) argument 64 #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (u32)0x5A827999,s)) argument 65 #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (u32)0x6ED9EBA1,s)) argument 69 u32 a, b, c, d; in md4_transform() local 71 a = hash[0]; in md4_transform() [all …]
|
| D | md5.c | 9 * Copyright (c) Cryptoapi developers. 10 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 41 (w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x) 45 u32 a, b, c, d; in md5_transform() local 47 a = hash[0]; in md5_transform() 49 c = hash[2]; in md5_transform() 52 MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); in md5_transform() 53 MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); in md5_transform() 54 MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); in md5_transform() 55 MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); in md5_transform() [all …]
|
| /kernel/linux/linux-5.10/fs/ubifs/ |
| D | auth.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2018 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> 17 #include <keys/user-type.h> 18 #include <keys/asymmetric-type.h> 23 * ubifs_node_calc_hash - calculate the hash of a UBIFS node 24 * @c: UBIFS file-system description object 25 * @node: the node to calculate a hash for 28 * Returns 0 for success or a negative error code otherwise. 30 int __ubifs_node_calc_hash(const struct ubifs_info *c, const void *node, in __ubifs_node_calc_hash() argument 35 return crypto_shash_tfm_digest(c->hash_tfm, node, le32_to_cpu(ch->len), in __ubifs_node_calc_hash() [all …]
|
| /kernel/liteos_m/testsuites/unittest/posix/src/ctype/ |
| D | isxdigit_test.c | 2 * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 3 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 41 …* @tc.desc : register a test suite, this suite is used to test basic flow and interface depen… 63 LOG("+-------------------------------------------+\n"); in PosixCTypeIsxdigitTestTearDown() 69 * @tc.name : Checks whether a parameter is a hexadecimal digit 70 * @tc.desc : [C- SOFTWARE -0200] 74 int a = '0'; variable 75 int ret = isxdigit(a); 77 LOG("[DEMO] posix ctype test case 1:isxdigit(%c) ok.\n", a); [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/ |
| D | vme.rst | 5 ------------------- 9 achieved via a call to :c:func:`vme_register_driver`. 11 A pointer to a structure of type :c:type:`struct vme_driver <vme_driver>` must 16 :c:type:`struct vme_driver <vme_driver>` should be correctly set. The '.name' 17 element is a pointer to a string holding the device driver's name. 20 with the driver. The match function should return 1 if a device should be 21 probed and 0 otherwise. This example match function (from vme_user.c) limits 24 .. code-block:: c 30 if (vdev->id.num >= USER_BUS_MAX) 35 The '.probe' element should contain a pointer to the probe routine. The [all …]
|
| /kernel/linux/linux-4.19/Documentation/driver-api/ |
| D | vme.rst | 5 ------------------- 9 achieved via a call to :c:func:`vme_register_driver`. 11 A pointer to a structure of type :c:type:`struct vme_driver <vme_driver>` must 16 :c:type:`struct vme_driver <vme_driver>` should be correctly set. The '.name' 17 element is a pointer to a string holding the device driver's name. 20 with the driver. The match function should return 1 if a device should be 21 probed and 0 otherwise. This example match function (from vme_user.c) limits 24 .. code-block:: c 30 if (vdev->id.num >= USER_BUS_MAX) 35 The '.probe' element should contain a pointer to the probe routine. The [all …]
|
| /kernel/linux/linux-5.10/arch/x86/crypto/ |
| D | sha1_ssse3_asm.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * This is a SIMD SHA-1 implementation. It requires the Intel(R) Supplemental 17 …* http://software.intel.com/en-us/articles/improving-the-performance-of-the-secure-hash-algorith… 19 * Copyright (C) 2010, Intel Corp. 61 /* we keep window of 64 w[i]+K pre-calculated values in a circular buffer */ 66 * This macro implements the SHA-1 function's body for single 64-byte block 108 * This macro implements 80 rounds of SHA-1 for one 64-byte block 113 mov (HASH_PTR), A 115 mov 8(HASH_PTR), C 127 RR F1,A,B,C,D,E,0 [all …]
|
| /kernel/linux/linux-5.10/lib/crypto/ |
| D | sha256.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * SHA-256, as specified in 4 * http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf 6 * SHA-256 code by Jean-Luc Cooke <jlcooke@certainkey.com>. 8 * Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com> 9 * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk> 10 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 11 * Copyright (c) 2014 Red Hat Inc. 43 W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; in BLEND_OP() 48 u32 a, b, c, d, e, f, g, h, t1, t2; in sha256_transform() local [all …]
|
| /kernel/linux/linux-4.19/arch/x86/crypto/ |
| D | sha1_ssse3_asm.S | 2 * This is a SIMD SHA-1 implementation. It requires the Intel(R) Supplemental 16 …* http://software.intel.com/en-us/articles/improving-the-performance-of-the-secure-hash-algorith… 18 * Copyright (C) 2010, Intel Corp. 65 /* we keep window of 64 w[i]+K pre-calculated values in a circular buffer */ 70 * This macro implements the SHA-1 function's body for single 64-byte block 112 * This macro implements 80 rounds of SHA-1 for one 64-byte block 117 mov (HASH_PTR), A 119 mov 8(HASH_PTR), C 131 RR F1,A,B,C,D,E,0 132 RR F1,D,E,A,B,C,2 [all …]
|
| /kernel/linux/linux-4.19/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/ |
| D | tc_flower.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # This test is for checking the A-TCAM and C-TCAM operation in Spectrum-2. 42 # When only a single mask is required, the device uses the master 51 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ 52 -t ip -q 55 check_err $? "Single filter - did not match" 60 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ 61 -t ip -q 64 check_err $? "Two filters - did not match highest priority" 66 $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 198.51.100.1 -B 198.51.100.2 \ [all …]
|
| /kernel/linux/linux-5.10/scripts/mod/ |
| D | sumversion.c | 23 * Copyright (c) Andrew Tridgell 1997-1998. 25 * Copyright (c) Cryptoapi developers. 26 * Copyright (c) 2002 David S. Miller (davem@redhat.com) 27 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 49 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s)); in lshift() 67 #define ROUND1(a,b,c,d,k,s) (a = lshift(a + F(b,c,d) + k, s)) argument 68 #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (uint32_t)0x5A827999,s)) argument 69 #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (uint32_t)0x6ED9EBA1,s)) argument 74 while (words--) { in le32_to_cpu_array() 82 while (words--) { in cpu_to_le32_array() [all …]
|