Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 97) sorted by relevance

1234

/crypto/fipsmodule/aes/
A Dcfb.cc.inc34 n = (n + 1) % 16;
52 out[n] = ivec[n] ^= in[n];
64 n = (n + 1) % 16;
82 out[n] = ivec[n] ^ (c = in[n]);
113 for (n = 0; n < num; ++n) {
114 out[n] = (ovec[16 + n] = in[n] ^ ivec[n]);
118 for (n = 0; n < num; ++n) {
119 out[n] = (ovec[16 + n] = in[n]) ^ ivec[n];
128 for (n = 0; n < 16; ++n) {
146 for (n = 0; n < bits; ++n) {
[all …]
A Dcbc.cc.inc32 size_t n;
44 for (n = 0; n < 16 && n < len; ++n) {
45 out[n] = in[n] ^ iv[n];
47 for (; n < 16; ++n) {
48 out[n] = iv[n];
79 size_t n;
100 for (n = 0; n < 16; n += sizeof(crypto_word_t)) {
115 for (n = 0; n < 16 && n < len; ++n) {
117 out[n] = tmp[n] ^ ivec[n];
121 for (; n < 16; ++n) {
[all …]
A Dctr.cc.inc27 uint32_t n = 12, c = 1;
30 --n;
31 c += counter[n];
34 } while (n);
41 unsigned int n, ctr32;
47 n = *num;
49 while (n && len) {
52 n = (n + 1) % 16;
94 out[n] = in[n] ^ ecount_buf[n];
95 ++n;
[all …]
A Dgcm.cc.inc354 if (n) {
358 n = (n + 1) % 16;
410 if (n) {
412 ctx->Xi[n] ^= *(out++) = *(in++) ^ ctx->EKi[n];
414 n = (n + 1) % 16;
466 ctx->Xi[n] ^= out[n] = in[n] ^ ctx->EKi[n];
467 ++n;
497 if (n) {
503 n = (n + 1) % 16;
557 out[n] = c ^ ctx->EKi[n];
[all …]
A Dofb.cc.inc29 unsigned n = *num;
31 while (n && len) {
32 *(out++) = *(in++) ^ ivec[n];
34 n = (n + 1) % 16;
43 n = 0;
48 out[n] = in[n] ^ ivec[n];
49 ++n;
52 *num = n;
/crypto/fipsmodule/digest/
A Dmd32_common.h93 size_t n = ctx->num; in crypto_md32_update() local
94 if (n != 0) { in crypto_md32_update()
97 OPENSSL_memcpy(ctx->data + n, in.data(), Traits::kBlockSize - n); in crypto_md32_update()
111 if (n > 0) { in crypto_md32_update()
137 size_t n = ctx->num; in crypto_md32_final() local
138 assert(n < Traits::kBlockSize); in crypto_md32_final()
139 ctx->data[n] = 0x80; in crypto_md32_final()
140 n++; in crypto_md32_final()
144 OPENSSL_memset(ctx->data + n, 0, Traits::kBlockSize - n); in crypto_md32_final()
145 n = 0; in crypto_md32_final()
[all …]
/crypto/fipsmodule/bn/
A Dgcd.cc.inc26 if (!BN_is_odd(n)) {
53 // From B = a mod |n|, A = |n| it follows that
65 // 0 < B < |n|,
66 // 0 < A <= |n|,
79 if (!BN_uadd(X, X, n)) {
120 // 0 <= B < |n|,
121 // 0 < A < |n|,
155 // A == gcd(a,n);
161 if (!BN_sub(Y, n, Y)) {
167 // Y*a == 1 (mod |n|)
[all …]
A Dmontgomery_inv.cc.inc36 assert(!BN_is_zero(n));
37 assert(!BN_is_negative(n));
38 assert(BN_is_odd(n));
52 // t2 := t1*n0*n
74 if (n->width > 1) {
83 // such that u*r - v*n == 1. |r| is the constant defined in |bn_mont_n0|. |n|
105 assert(n % 2 == 1);
110 const uint64_t beta = n;
182 // The square steps take 2^n R to (2^n)*(2^n) R = 2^2n R. This is the same as
183 // doubling 2^n R, n times (doubling any x, n times, computes 2^n * x). When n
[all …]
A Dshift.cc.inc30 if (n < 0) {
36 nw = n / BN_BITS2;
40 lb = n % BN_BITS2;
115 if (n < 0) {
174 if (n < 0) {
178 int i = n / BN_BITS2;
198 if (n < 0) {
202 i = n / BN_BITS2;
203 j = n % BN_BITS2;
223 if (n < 0) {
[all …]
A Dmontgomery.cc.inc192 const BN_ULONG *n = mont->N.d;
200 // input, we had |r| < |n| * R, so now |r| < 2 * |n| * R. Note that |r|
228 const BIGNUM *n = &mont->N;
229 if (n->width == 0) {
239 ret->width = n->width;
256 // If the high bit of |n| is set, R = 2^(width*BN_BITS2) < 2 * |n|, so we
258 const BIGNUM *n = &mont->N;
259 if (n->width > 0 && (n->d[n->width - 1] >> (BN_BITS2 - 1)) != 0) {
263 r->d[0] = 0 - n->d[0];
265 r->d[i] = ~n->d[i];
[all …]
/crypto/fipsmodule/sha/asm/
A Dsha1-586.pl168 &comment("00_15 $n");
184 if ($n==15) { &mov($e,&swtmp(($n+1)%16));# pre-fetch f for next round
194 &comment("16_19 $n");
238 &comment("20_39 $n");
250 &mov(&swtmp($n%16),$f) if($n<77);# xi=f
255 &mov($e,&swtmp(($n+1)%16)) if($n<79);# pre-fetch f for next round
257 &rotr($a,5) if ($n==79);
270 &mov(&swtmp($n%16),$f) if($n<77);# xi=f
272 &mov($e,&swtmp(($n+1)%16)) if($n<79);# pre-fetch f for next round
281 &comment("40_59 $n");
[all …]
/crypto/fipsmodule/ec/
A Dmake_tables.go308 ret := make([][2]*big.Int, n)
314 for i := 2; i <= n; i++ {
384 ret.Mul(ret, n)
392 bytes := n.Bytes()
403 bytes := n.Bytes()
419 n, err = c.w.Write(p)
420 idx := bytes.LastIndexByte(p[:n], '\n')
422 c.column += n
424 c.column = n - idx - 1
519 n = toMontgomery(n, curve.Params().P, 64)
[all …]
A Dmake_ec_scalar_base_mult_tests.go27 func printPadded(key string, n, max *big.Int) { argument
29 b := n.Bytes()
35 n := new(big.Int)
38 n.SetInt64(int64(i))
40 n = n.Add(n, curve.Params().N)
43 printPadded("N", n, curve.Params().N)
44 x, y := curve.ScalarBaseMult(n.Bytes())
/crypto/
A Dinternal.h416 assert(!buffers_alias(dst, n, src, n)); in constant_time_conditional_memcpy()
430 assert(!buffers_alias(dst, n, src, n)); in constant_time_conditional_memxor()
442 n -= n_vec; in constant_time_conditional_memxor()
826 if (n == 0) { in OPENSSL_memchr()
830 return memchr(s, c, n); in OPENSSL_memchr()
834 if (n == 0) { in OPENSSL_memchr()
845 if (n == 0) { in OPENSSL_memchr()
855 if (n == 0) { in OPENSSL_memcmp()
863 if (n == 0) { in OPENSSL_memcpy()
871 if (n == 0) { in OPENSSL_memmove()
[all …]
/crypto/x509/
A Dx509_obj.cc35 int n, lold, l, l1, l2, num, j, type; in X509_NAME_oneline() local
69 n = OBJ_obj2nid(ne->object); in X509_NAME_oneline()
70 if ((n == NID_undef) || ((s = OBJ_nid2sn(n)) == NULL)) { in X509_NAME_oneline()
139 n = q[j]; in X509_NAME_oneline()
140 if ((n < ' ') || (n > '~')) { in X509_NAME_oneline()
143 *(p++) = hex[(n >> 4) & 0x0f]; in X509_NAME_oneline()
144 *(p++) = hex[n & 0x0f]; in X509_NAME_oneline()
146 *(p++) = n; in X509_NAME_oneline()
A Dx509name.cc105 int n = (int)sk_X509_NAME_ENTRY_num(sk); in X509_NAME_get_index_by_OBJ() local
106 for (lastpos++; lastpos < n; lastpos++) { in X509_NAME_get_index_by_OBJ()
132 size_t n = sk_X509_NAME_ENTRY_num(sk); in X509_NAME_delete_entry() local
134 if ((size_t)loc == n) { in X509_NAME_delete_entry()
149 for (size_t i = loc; i < n; i++) { in X509_NAME_delete_entry()
208 if (loc > n) { in X509_NAME_add_entry()
209 loc = n; in X509_NAME_add_entry()
211 loc = n; in X509_NAME_add_entry()
226 if (loc >= n) { in X509_NAME_add_entry()
245 n = (int)sk_X509_NAME_ENTRY_num(sk); in X509_NAME_add_entry()
[all …]
A Dx509_v3.cc50 int n = (int)sk_X509_EXTENSION_num(sk); in X509v3_get_ext_by_OBJ() local
51 for (; lastpos < n; lastpos++) { in X509v3_get_ext_by_OBJ()
72 int n = (int)sk_X509_EXTENSION_num(sk); in X509v3_get_ext_by_critical() local
73 for (; lastpos < n; lastpos++) { in X509v3_get_ext_by_critical()
104 int free_sk = 0, n; in STACK_OF() local
120 n = (int)sk_X509_EXTENSION_num(sk); in STACK_OF()
121 if (loc > n) { in STACK_OF()
122 loc = n; in STACK_OF()
124 loc = n; in STACK_OF()
/crypto/fipsmodule/bn/asm/
A Dx86_64-gcc.cc.inc189 if (n == 0) {
194 while (n & ~3) {
201 n -= 4;
203 if (n) {
205 if (--n == 0) {
209 if (--n == 0) {
221 if (n == 0) {
227 " jmp 1f \n"
234 " dec %1 \n"
235 " jnz 1b \n"
[all …]
/crypto/fipsmodule/rsa/
A Drsa.cc.inc57 !bn_dup_into(&rsa->n, n) || //
72 !bn_dup_into(&rsa->n, n) || //
92 !bn_dup_into(&rsa->n, n) || //
110 if (!bn_dup_into(&rsa->n, n) || //
127 if (!bn_dup_into(&rsa->n, n) || //
147 if (!bn_dup_into(&rsa->n, n) || //
196 if (rsa == NULL || !bn_dup_into(&rsa->n, n)) {
220 BN_free(rsa->n);
259 *out_n = rsa->n;
303 if (n != NULL) {
[all …]
A Drsa_impl.cc.inc38 if (rsa->n == NULL) {
58 if (!BN_is_odd(rsa->n) || BN_is_negative(rsa->n)) {
66 // prime with phi(n).
74 // less than n.
95 // bounded by n.
751 // [0, n).
797 // if n*n - target < 0 && (n+1)*(n+1) - target > 0
798 // then n
816 // To verify this number, check that n² < 2⁴⁰⁹⁵ < (n+1)², where n is value
823 // >>> n**2 < 2**4095 < (n+1)**2
[all …]
/crypto/rsa/
A Drsa_test.cc775 ASSERT_TRUE(BN_hex2bn(&rsa->n, kN)); in TEST()
779 BN_free(rsa->n); in TEST()
780 rsa->n = nullptr; in TEST()
786 ASSERT_TRUE(BN_hex2bn(&rsa->n, kN)); in TEST()
934 EXPECT_FALSE(rsa->n); in TEST()
1063 ASSERT_TRUE(n); in TEST()
1237 priv->n = BN_dup(n); in TEST()
1238 ASSERT_TRUE(priv->n); in TEST()
1279 bad_e.reset(BN_dup(n)); in TEST()
1376 rsa->n = BN_dup(rsa_template->n); in TEST()
[all …]
/crypto/cipher/
A De_rc2.cc30 #define c2ln(c, l1, l2, n) \ argument
32 (c) += (n); \
34 switch (n) { \
104 int i, n; in RC2_encrypt() local
116 n = 3; in RC2_encrypt()
131 if (--n == 0) { in RC2_encrypt()
134 i = (n == 2) ? 6 : 5; in RC2_encrypt()
148 int i, n; in RC2_decrypt() local
160 n = 3; in RC2_decrypt()
176 if (--n == 0) { in RC2_decrypt()
[all …]
A De_aeseax.cc150 const uint8_t n[AES_BLOCK_SIZE], const uint8_t *in, in aes_ctr()
153 OPENSSL_memcpy(ivec, n, AES_BLOCK_SIZE); in aes_ctr()
184 uint8_t n[AES_BLOCK_SIZE]; in aead_aes_eax_seal_scatter() local
185 omac_with_tag(aes_ctx, n, nonce, nonce_len, /*tag=*/0); in aead_aes_eax_seal_scatter()
191 aes_ctr(aes_ctx, out, n, in, in_len); in aead_aes_eax_seal_scatter()
196 CRYPTO_xor16(out_tag, n, out_tag); in aead_aes_eax_seal_scatter()
230 uint8_t n[AES_BLOCK_SIZE]; in aead_aes_eax_open_gather() local
231 omac_with_tag(aes_ctx, n, nonce, nonce_len, /*tag=*/0); in aead_aes_eax_open_gather()
240 CRYPTO_xor16(mac, n, mac); in aead_aes_eax_open_gather()
249 aes_ctr(aes_ctx, out, n, in, in_len); in aead_aes_eax_open_gather()
/crypto/fipsmodule/ec/asm/
A Dp256_beeu-x86_64-asm.pl47 $n = "%rdx";
115 add 0*8($n), $var0
116 adc 1*8($n), $var1
117 adc 2*8($n), $var2
118 adc 3*8($n), $var3
196 vmovdqu 0*8($n), $T0
197 vmovdqu 2*8($n), $T1
330 movq 0*8($n), $x0
331 movq 1*8($n), $x1
332 movq 2*8($n), $x2
[all …]
/crypto/asn1/
A Df_int.cc20 int i, n = 0; in i2a_ASN1_INTEGER() local
32 n = 1; in i2a_ASN1_INTEGER()
39 n += 2; in i2a_ASN1_INTEGER()
46 n += 2; in i2a_ASN1_INTEGER()
53 n += 2; in i2a_ASN1_INTEGER()
56 return n; in i2a_ASN1_INTEGER()

Completed in 32 milliseconds

1234