Home
last modified time | relevance | path

Searched refs:b (Results 1 – 25 of 65) sorted by relevance

123

/lib/crypto/
Ddes.c609 #define DES_PC2(a, b, c, d) (T4(d) | T3(c) | T2(b) | T1(a)) argument
626 unsigned long a, b, c, d, w; in des_ekey() local
631 b = k[6]; b &= 0x0e; b <<= 4; b |= k[2] & 0x1e; b = pc1[b]; in des_ekey()
634 pe[15 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; in des_ekey()
635 pe[14 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
636 pe[13 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
637 pe[12 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
638 pe[11 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
639 pe[10 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
640 pe[ 9 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
[all …]
Dsha256.c49 u32 a, b, c, d, e, f, g, h, t1, t2; in sha256_transform() local
62 a = state[0]; b = state[1]; c = state[2]; d = state[3]; in sha256_transform()
67 t2 = e0(a) + Maj(a, b, c); d += t1; h = t1 + t2; in sha256_transform()
69 t2 = e0(h) + Maj(h, a, b); c += t1; g = t1 + t2; in sha256_transform()
71 t2 = e0(g) + Maj(g, h, a); b += t1; f = t1 + t2; in sha256_transform()
72 t1 = e + e1(b) + Ch(b, c, d) + 0xe9b5dba5 + W[3]; in sha256_transform()
74 t1 = d + e1(a) + Ch(a, b, c) + 0x3956c25b + W[4]; in sha256_transform()
76 t1 = c + e1(h) + Ch(h, a, b) + 0x59f111f1 + W[5]; in sha256_transform()
78 t1 = b + e1(g) + Ch(g, h, a) + 0x923f82a4 + W[6]; in sha256_transform()
79 t2 = e0(c) + Maj(c, d, e); f += t1; b = t1 + t2; in sha256_transform()
[all …]
Dchacha20poly1305.c65 } b; in __chacha20poly1305_encrypt() local
67 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in __chacha20poly1305_encrypt()
68 poly1305_init(&poly1305_state, b.block0); in __chacha20poly1305_encrypt()
80 b.lens[0] = cpu_to_le64(ad_len); in __chacha20poly1305_encrypt()
81 b.lens[1] = cpu_to_le64(src_len); in __chacha20poly1305_encrypt()
82 poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens)); in __chacha20poly1305_encrypt()
87 memzero_explicit(&b, sizeof(b)); in __chacha20poly1305_encrypt()
136 } b; in __chacha20poly1305_decrypt() local
141 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in __chacha20poly1305_decrypt()
142 poly1305_init(&poly1305_state, b.block0); in __chacha20poly1305_decrypt()
[all …]
/lib/
Dmemneq.c68 __crypto_memneq_generic(const void *a, const void *b, size_t size) in __crypto_memneq_generic() argument
74 neq |= *(unsigned long *)a ^ *(unsigned long *)b; in __crypto_memneq_generic()
77 b += sizeof(unsigned long); in __crypto_memneq_generic()
82 neq |= *(unsigned char *)a ^ *(unsigned char *)b; in __crypto_memneq_generic()
85 b += 1; in __crypto_memneq_generic()
92 static inline unsigned long __crypto_memneq_16(const void *a, const void *b) in __crypto_memneq_16() argument
98 neq |= *(unsigned long *)(a) ^ *(unsigned long *)(b); in __crypto_memneq_16()
100 neq |= *(unsigned long *)(a+8) ^ *(unsigned long *)(b+8); in __crypto_memneq_16()
103 neq |= *(unsigned int *)(a) ^ *(unsigned int *)(b); in __crypto_memneq_16()
105 neq |= *(unsigned int *)(a+4) ^ *(unsigned int *)(b+4); in __crypto_memneq_16()
[all …]
Dsort.c58 static void swap_words_32(void *a, void *b, size_t n) in swap_words_32() argument
62 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_32()
63 *(u32 *)(b + n) = t; in swap_words_32()
83 static void swap_words_64(void *a, void *b, size_t n) in swap_words_64() argument
88 *(u64 *)(a + n) = *(u64 *)(b + n); in swap_words_64()
89 *(u64 *)(b + n) = t; in swap_words_64()
93 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_64()
94 *(u32 *)(b + n) = t; in swap_words_64()
97 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_64()
98 *(u32 *)(b + n) = t; in swap_words_64()
[all …]
Dlist_sort.c20 struct list_head *a, struct list_head *b) in merge() argument
26 if (cmp(priv, a, b) <= 0) { in merge()
31 *tail = b; in merge()
35 *tail = b; in merge()
36 tail = &b->next; in merge()
37 b = b->next; in merge()
38 if (!b) { in merge()
56 struct list_head *a, struct list_head *b) in merge_final() argument
63 if (cmp(priv, a, b) <= 0) { in merge_final()
71 tail->next = b; in merge_final()
[all …]
Ddecompress_unxz.c177 static bool memeq(const void *a, const void *b, size_t size) in memeq() argument
180 const uint8_t *y = b; in memeq()
194 uint8_t *b = buf; in memzero() local
195 uint8_t *e = b + size; in memzero()
197 while (b != e) in memzero()
198 *b++ = '\0'; in memzero()
257 struct xz_buf b; in unxz() local
278 b.out = out; in unxz()
279 b.out_size = (size_t)-1; in unxz()
281 b.out_size = XZ_IOBUF_SIZE; in unxz()
[all …]
Dsiphash.c28 u64 b = ((u64)(len)) << 56; \
35 v3 ^= b; \
38 v0 ^= b; \
62 b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & in __siphash_aligned()
66 case 7: b |= ((u64)end[6]) << 48; /* fall through */ in __siphash_aligned()
67 case 6: b |= ((u64)end[5]) << 40; /* fall through */ in __siphash_aligned()
68 case 5: b |= ((u64)end[4]) << 32; /* fall through */ in __siphash_aligned()
69 case 4: b |= le32_to_cpup(data); break; in __siphash_aligned()
70 case 3: b |= ((u64)end[2]) << 16; /* fall through */ in __siphash_aligned()
71 case 2: b |= le16_to_cpup(data); break; in __siphash_aligned()
[all …]
Duuid.c53 static void __uuid_gen_common(__u8 b[16]) in __uuid_gen_common()
55 prandom_bytes(b, 16); in __uuid_gen_common()
57 b[8] = (b[8] & 0x3F) | 0x80; in __uuid_gen_common()
62 __uuid_gen_common(lu->b); in guid_gen()
64 lu->b[7] = (lu->b[7] & 0x0F) | 0x40; in guid_gen()
70 __uuid_gen_common(bu->b); in uuid_gen()
72 bu->b[6] = (bu->b[6] & 0x0F) | 0x40; in uuid_gen()
105 static int __uuid_parse(const char *uuid, __u8 b[16], const u8 ei[16]) in __uuid_parse()
117 b[ei[i]] = (hi << 4) | lo; in __uuid_parse()
125 return __uuid_parse(uuid, u->b, guid_index); in guid_parse()
[all …]
Dlist-test.c48 struct list_head a, b; in list_test_list_add() local
52 list_add(&b, &list); in list_test_list_add()
55 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_add()
56 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_add()
57 KUNIT_EXPECT_PTR_EQ(test, b.next, &a); in list_test_list_add()
62 struct list_head a, b; in list_test_list_add_tail() local
66 list_add_tail(&b, &list); in list_test_list_add_tail()
71 KUNIT_EXPECT_PTR_EQ(test, a.next, &b); in list_test_list_add_tail()
76 struct list_head a, b; in list_test_list_del() local
80 list_add_tail(&b, &list); in list_test_list_del()
[all …]
Dinflate.c141 uch b; /* number of bits in this code or subcode */ member
234 #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
235 #define DUMPBITS(n) {b>>=(n);k-=(n);}
323 unsigned *b, /* code lengths in bits (all assumed <= BMAX) */ in huft_build() argument
375 p = b; i = n; in huft_build()
434 p = b; i = 0; in huft_build()
507 r.b = (uch)l; /* bits to dump before this table */ in huft_build()
518 r.b = (uch)(k - w); in huft_build()
603 register ulg b; /* bit buffer */ in inflate_codes() local
608 b = bb; /* initialize bit buffer */ in inflate_codes()
[all …]
Dashldi3.c9 long long notrace __ashldi3(long long u, word_type b) in __ashldi3() argument
14 if (b == 0) in __ashldi3()
18 bm = 32 - b; in __ashldi3()
26 w.s.low = (unsigned int) uu.s.low << b; in __ashldi3()
27 w.s.high = ((unsigned int) uu.s.high << b) | carries; in __ashldi3()
Dlshrdi3.c9 long long notrace __lshrdi3(long long u, word_type b) in __lshrdi3() argument
14 if (b == 0) in __lshrdi3()
18 bm = 32 - b; in __lshrdi3()
26 w.s.high = (unsigned int) uu.s.high >> b; in __lshrdi3()
27 w.s.low = ((unsigned int) uu.s.low >> b) | carries; in __lshrdi3()
Dashrdi3.c9 long long notrace __ashrdi3(long long u, word_type b) in __ashrdi3() argument
14 if (b == 0) in __ashrdi3()
18 bm = 32 - b; in __ashrdi3()
28 w.s.high = uu.s.high >> b; in __ashrdi3()
29 w.s.low = ((unsigned int) uu.s.low >> b) | carries; in __ashrdi3()
/lib/math/
Dgcd.c23 unsigned long gcd(unsigned long a, unsigned long b) in gcd() argument
25 unsigned long r = a | b; in gcd()
27 if (!a || !b) in gcd()
30 b >>= __ffs(b); in gcd()
31 if (b == 1) in gcd()
38 if (a == b) in gcd()
41 if (a < b) in gcd()
42 swap(a, b); in gcd()
43 a -= b; in gcd()
50 unsigned long gcd(unsigned long a, unsigned long b) in gcd() argument
[all …]
Ddiv64.c32 uint64_t b = base; in __div64_32() local
44 while ((int64_t)b > 0 && b < rem) { in __div64_32()
45 b = b+b; in __div64_32()
50 if (rem >= b) { in __div64_32()
51 rem -= b; in __div64_32()
54 b >>= 1; in __div64_32()
195 u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c) in mul_u64_u64_div_u64() argument
201 if (ilog2(a) + ilog2(b) > 62) { in mul_u64_u64_div_u64()
217 div = div64_u64_rem(b, c, &rem); in mul_u64_u64_div_u64()
219 b = rem; in mul_u64_u64_div_u64()
[all …]
Dlcm.c8 unsigned long lcm(unsigned long a, unsigned long b) in lcm() argument
10 if (a && b) in lcm()
11 return (a / gcd(a, b)) * b; in lcm()
17 unsigned long lcm_not_zero(unsigned long a, unsigned long b) in lcm_not_zero() argument
19 unsigned long l = lcm(a, b); in lcm_not_zero()
24 return (b ? : a); in lcm_not_zero()
Dint_sqrt.c21 unsigned long b, m, y = 0; in int_sqrt() local
28 b = y + m; in int_sqrt()
31 if (x >= b) { in int_sqrt()
32 x -= b; in int_sqrt()
50 u64 b, m, y = 0; in int_sqrt64() local
57 b = y + m; in int_sqrt64()
60 if (x >= b) { in int_sqrt64()
61 x -= b; in int_sqrt64()
/lib/xz/
Dxz_dec_stream.c157 static bool fill_temp(struct xz_dec *s, struct xz_buf *b) in fill_temp() argument
160 b->in_size - b->in_pos, s->temp.size - s->temp.pos); in fill_temp()
162 memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size); in fill_temp()
163 b->in_pos += copy_size; in fill_temp()
218 static enum xz_ret dec_block(struct xz_dec *s, struct xz_buf *b) in dec_block() argument
222 s->in_start = b->in_pos; in dec_block()
223 s->out_start = b->out_pos; in dec_block()
227 ret = xz_dec_bcj_run(s->bcj, s->lzma2, b); in dec_block()
230 ret = xz_dec_lzma2_run(s->lzma2, b); in dec_block()
232 s->block.compressed += b->in_pos - s->in_start; in dec_block()
[all …]
Dxz_dec_bcj.c83 static inline int bcj_x86_test_msbyte(uint8_t b) in bcj_x86_test_msbyte() argument
85 return b == 0x00 || b == 0xFF; in bcj_x86_test_msbyte()
101 uint8_t b; in bcj_x86() local
117 b = buf[i + 4 - mask_to_bit_num[prev_mask]]; in bcj_x86()
119 || bcj_x86_test_msbyte(b)) { in bcj_x86()
137 b = (uint8_t)(dest >> (24 - j)); in bcj_x86()
138 if (!bcj_x86_test_msbyte(b)) in bcj_x86()
399 static void bcj_flush(struct xz_dec_bcj *s, struct xz_buf *b) in bcj_flush() argument
403 copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos); in bcj_flush()
404 memcpy(b->out + b->out_pos, s->temp.buf, copy_size); in bcj_flush()
[all …]
Dxz_dec_lzma2.c286 static void dict_reset(struct dictionary *dict, struct xz_buf *b) in dict_reset() argument
289 dict->buf = b->out + b->out_pos; in dict_reset()
290 dict->end = b->out_size - b->out_pos; in dict_reset()
374 static void dict_uncompressed(struct dictionary *dict, struct xz_buf *b, in dict_uncompressed() argument
379 while (*left > 0 && b->in_pos < b->in_size in dict_uncompressed()
380 && b->out_pos < b->out_size) { in dict_uncompressed()
381 copy_size = min(b->in_size - b->in_pos, in dict_uncompressed()
382 b->out_size - b->out_pos); in dict_uncompressed()
397 memmove(dict->buf + dict->pos, b->in + b->in_pos, copy_size); in dict_uncompressed()
411 memmove(b->out + b->out_pos, b->in + b->in_pos, in dict_uncompressed()
[all …]
/lib/mpi/
Dmpiutil.c198 MPI b; in mpi_copy() local
201 b = mpi_alloc(a->nlimbs); in mpi_copy()
202 b->nlimbs = a->nlimbs; in mpi_copy()
203 b->sign = a->sign; in mpi_copy()
204 b->flags = a->flags; in mpi_copy()
205 b->flags &= ~(16|32); /* Reset the immutable and constant flags. */ in mpi_copy()
206 for (i = 0; i < b->nlimbs; i++) in mpi_copy()
207 b->d[i] = a->d[i]; in mpi_copy()
209 b = NULL; in mpi_copy()
210 return b; in mpi_copy()
[all …]
/lib/842/
D842_compress.c109 #define get_input_data(p, o, b) \ argument
110 be##b##_to_cpu(get_unaligned((__be##b *)((p)->in + (o))))
112 #define init_hashtable_nodes(p, b) do { \ argument
114 hash_init((p)->htable##b); \
115 for (_i = 0; _i < ARRAY_SIZE((p)->node##b); _i++) { \
116 (p)->node##b[_i].index = _i; \
117 (p)->node##b[_i].data = 0; \
118 INIT_HLIST_NODE(&(p)->node##b[_i].node); \
122 #define find_index(p, b, n) ({ \ argument
123 struct sw842_hlist_node##b *_n; \
[all …]
/lib/raid6/
Dmktables.c21 static uint8_t gfmul(uint8_t a, uint8_t b) in gfmul() argument
25 while (b) { in gfmul()
26 if (b & 1) in gfmul()
29 b >>= 1; in gfmul()
35 static uint8_t gfpow(uint8_t a, int b) in gfpow() argument
39 b %= 255; in gfpow()
40 if (b < 0) in gfpow()
41 b += 255; in gfpow()
43 while (b) { in gfpow()
44 if (b & 1) in gfpow()
[all …]
/lib/reed_solomon/
Ddecode_rs.c34 uint16_t *b = rsc->buffers + RS_DECODE_B * (nroots + 1); variable
126 b[i] = index_of[lambda[i]];
148 memmove (&b[1], b, nroots * sizeof (b[0]));
149 b[0] = nn;
154 if (b[i] != nn) {
157 b[i])];
168 b[i] = (lambda[i] == 0) ? nn :
174 memmove(&b[1], b, nroots * sizeof(b[0]));
175 b[0] = nn;
263 b[j] = 0;
[all …]

123