Home
last modified time | relevance | path

Searched refs:b (Results 1 – 25 of 51) 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.c48 u32 a, b, c, d, e, f, g, h, t1, t2; in sha256_transform() local
61 a = state[0]; b = state[1]; c = state[2]; d = state[3]; in sha256_transform()
66 t2 = e0(a) + Maj(a, b, c); d += t1; h = t1 + t2; in sha256_transform()
68 t2 = e0(h) + Maj(h, a, b); c += t1; g = t1 + t2; in sha256_transform()
70 t2 = e0(g) + Maj(g, h, a); b += t1; f = t1 + t2; in sha256_transform()
71 t1 = e + e1(b) + Ch(b, c, d) + 0xe9b5dba5 + W[3]; in sha256_transform()
73 t1 = d + e1(a) + Ch(a, b, c) + 0x3956c25b + W[4]; in sha256_transform()
75 t1 = c + e1(h) + Ch(h, a, b) + 0x59f111f1 + W[5]; in sha256_transform()
77 t1 = b + e1(g) + Ch(g, h, a) + 0x923f82a4 + W[6]; in sha256_transform()
78 t2 = e0(c) + Maj(c, d, e); f += t1; b = t1 + t2; in sha256_transform()
[all …]
Darc4.c40 u32 x, y, a, b; in arc4_crypt() local
51 b = S[y]; in arc4_crypt()
55 a = (a + b) & 0xff; in arc4_crypt()
56 S[x] = b; in arc4_crypt()
66 b = tb; in arc4_crypt()
/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 …]
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()
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()
/lib/
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 …]
Duuid.c43 static void __uuid_gen_common(__u8 b[16]) in __uuid_gen_common()
45 prandom_bytes(b, 16); in __uuid_gen_common()
47 b[8] = (b[8] & 0x3F) | 0x80; in __uuid_gen_common()
52 __uuid_gen_common(lu->b); in guid_gen()
54 lu->b[7] = (lu->b[7] & 0x0F) | 0x40; in guid_gen()
60 __uuid_gen_common(bu->b); in uuid_gen()
62 bu->b[6] = (bu->b[6] & 0x0F) | 0x40; in uuid_gen()
95 static int __uuid_parse(const char *uuid, __u8 b[16], const u8 ei[16]) in __uuid_parse()
107 b[ei[i]] = (hi << 4) | lo; in __uuid_parse()
115 return __uuid_parse(uuid, u->b, guid_index); in guid_parse()
[all …]
Dsiphash.c34 u64 b = ((u64)(len)) << 56; \
41 v3 ^= b; \
44 v0 ^= b; \
67 b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & in __siphash_aligned()
71 case 7: b |= ((u64)end[6]) << 48; /* fall through */ in __siphash_aligned()
72 case 6: b |= ((u64)end[5]) << 40; /* fall through */ in __siphash_aligned()
73 case 5: b |= ((u64)end[4]) << 32; /* fall through */ in __siphash_aligned()
74 case 4: b |= le32_to_cpup(data); break; in __siphash_aligned()
75 case 3: b |= ((u64)end[2]) << 16; /* fall through */ in __siphash_aligned()
76 case 2: b |= le16_to_cpup(data); break; in __siphash_aligned()
[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()
Dglob.c81 unsigned char b = a; in glob_match() local
87 b = class[1]; in glob_match()
89 if (b == '\0') in glob_match()
95 match |= (a <= c && c <= b); in glob_match()
Dextable.c28 static void swap_ex(void *a, void *b, int size) in swap_ex() argument
30 struct exception_table_entry *x = a, *y = b, tmp; in swap_ex()
31 int delta = b - a; in swap_ex()
52 static int cmp_ex_sort(const void *a, const void *b) in cmp_ex_sort() argument
54 const struct exception_table_entry *x = a, *y = b; in cmp_ex_sort()
Dbch.c306 unsigned int b) in gf_mul() argument
308 return (a && b) ? bch->a_pow_tab[mod_s(bch, bch->a_log_tab[a]+ in gf_mul()
309 bch->a_log_tab[b])] : 0; in gf_mul()
318 unsigned int b) in gf_div() argument
321 GF_N(bch)-bch->a_log_tab[b])] : 0; in gf_div()
519 unsigned int b, unsigned int c, in find_affine4_roots() argument
526 j = a_log(bch, b); in find_affine4_roots()
534 (b ? bch->a_pow_tab[mod_s(bch, j)] : 0); in find_affine4_roots()
616 unsigned int a, b, c, a2, b2, c2, e3, tmp[4]; in find_poly_deg3_roots() local
627 b = gf_mul(bch, a2, b2)^c2; /* b = a2b2 + c2 */ in find_poly_deg3_roots()
[all …]
/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()
390 memcpy(dict->buf + dict->pos, b->in + b->in_pos, copy_size); in dict_uncompressed()
400 memcpy(b->out + b->out_pos, b->in + b->in_pos, in dict_uncompressed()
[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