• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Security-57031.1.35/Security/libsecurity_apple_csp/open_ssl/bn/

Lines Matching refs:n2

85 /* r is 2*n2 words in size,
86 * a and b are both n2 words in size.
87 * n2 must be a power of 2.
89 * t must be 2*n2 words in size
95 void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2,
98 int n=n2/2,c1,c2;
103 printf(" bn_mul_recursive %d * %d\n",n2,n2);
107 if (n2 == 4)
113 if (n2 == 8)
119 if (n2 < BN_MUL_RECURSIVE_SIZE_NORMAL)
122 bn_mul_normal(r,a,n2,b,n2);
166 bn_mul_comba4(&(t[n2]),t,&(t[n]));
168 memset(&(t[n2]),0,8*sizeof(BN_ULONG));
171 bn_mul_comba4(&(r[n2]),&(a[n]),&(b[n]));
176 bn_mul_comba8(&(t[n2]),t,&(t[n]));
178 memset(&(t[n2]),0,16*sizeof(BN_ULONG));
181 bn_mul_comba8(&(r[n2]),&(a[n]),&(b[n]));
186 p= &(t[n2*2]);
188 bn_mul_recursive(&(t[n2]),t,&(t[n]),n,p);
190 memset(&(t[n2]),0,n2*sizeof(BN_ULONG));
192 bn_mul_recursive(&(r[n2]),&(a[n]),&(b[n]),n,p);
200 c1=(int)(bn_add_words(t,r,&(r[n2]),n2));
204 c1-=(int)(bn_sub_words(&(t[n2]),t,&(t[n2]),n2));
209 c1+=(int)(bn_add_words(&(t[n2]),&(t[n2]),t,n2));
217 c1+=(int)(bn_add_words(&(r[n]),&(r[n]),&(t[n2]),n2));
220 p= &(r[n+n2]);
244 int i,j,n2=n*2;
299 bn_mul_comba4(&(t[n2]),t,&(t[n]));
301 bn_mul_normal(&(r[n2]),&(a[n]),tn,&(b[n]),tn);
302 memset(&(r[n2+tn*2]),0,sizeof(BN_ULONG)*(n2-tn*2));
308 bn_mul_comba8(&(t[n2]),t,&(t[n]));
310 bn_mul_normal(&(r[n2]),&(a[n]),tn,&(b[n]),tn);
311 memset(&(r[n2+tn*2]),0,sizeof(BN_ULONG)*(n2-tn*2));
315 p= &(t[n2*2]);
316 bn_mul_recursive(&(t[n2]),t,&(t[n]),n,p);
324 bn_mul_recursive(&(r[n2]),&(a[n]),&(b[n]),i,p);
325 memset(&(r[n2+i*2]),0,sizeof(BN_ULONG)*(n2-i*2));
329 bn_mul_part_recursive(&(r[n2]),&(a[n]),&(b[n]),
331 memset(&(r[n2+tn*2]),0,
332 sizeof(BN_ULONG)*(n2-tn*2));
336 memset(&(r[n2]),0,sizeof(BN_ULONG)*n2);
339 bn_mul_normal(&(r[n2]),&(a[n]),tn,&(b[n]),tn);
348 bn_mul_part_recursive(&(r[n2]),
355 bn_mul_recursive(&(r[n2]),
370 c1=(int)(bn_add_words(t,r,&(r[n2]),n2));
374 c1-=(int)(bn_sub_words(&(t[n2]),t,&(t[n2]),n2));
379 c1+=(int)(bn_add_words(&(t[n2]),&(t[n2]),t,n2));
387 c1+=(int)(bn_add_words(&(r[n]),&(r[n]),&(t[n2]),n2));
390 p= &(r[n+n2]);
409 /* a and b must be the same size, which is n2.
410 * r needs to be n2 words and t needs to be n2*2
412 void bn_mul_low_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2,
415 int n=n2/2;
418 printf(" bn_mul_low_recursive %d * %d\n",n2,n2);
424 bn_mul_low_recursive(&(t[0]),&(a[0]),&(b[n]),n,&(t[n2]));
426 bn_mul_low_recursive(&(t[0]),&(a[n]),&(b[0]),n,&(t[n2]));
438 /* a and b must be the same size, which is n2.
439 * r needs to be n2 words and t needs to be n2*2
441 * t needs to be n2*3
443 void bn_mul_high(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, BN_ULONG *l, int n2,
452 printf(" bn_mul_high %d * %d\n",n2,n2);
454 n=n2/2;
505 bn_mul_recursive(&(t[0]),&(r[0]),&(r[n]),n,&(t[n2]));
506 bn_mul_recursive(r,&(a[n]),&(b[n]),n,&(t[n2]));
517 lp= &(t[n2+n]);
527 neg=(int)(bn_sub_words(&(t[n2]),lp,&(t[0]),n));
530 bn_add_words(&(t[n2]),lp,&(t[0]),n);
536 bn_sub_words(&(t[n2+n]),&(l[n]),&(t[n2]),n);
540 lp= &(t[n2+n]);
541 mp= &(t[n2]);
561 lp= &(t[n2]);
562 c1= (int)(bn_add_words(lp,&(t[n2+n]),&(l[0]),n));
566 lp= &(t[n2+n]);
569 c1+=(int)(bn_add_words(&(t[n2]),lp, &(r[0]),n));
571 c1-=(int)(bn_sub_words(&(t[n2]),&(t[n2]),&(t[0]),n));
573 c1+=(int)(bn_add_words(&(t[n2]),&(t[n2]),&(t[0]),n));
575 c2 =(int)(bn_add_words(&(r[0]),&(r[0]),&(t[n2+n]),n));