Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: mozilla/security/nss/lib/freebl/mpi/mpprime.h

Issue 14249009: Change the NSS and NSPR source tree to the new directory structure to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * mpprime.h
3 *
4 * Utilities for finding and working with prime and pseudo-prime
5 * integers
6 *
7 * This Source Code Form is subject to the terms of the Mozilla Public
8 * License, v. 2.0. If a copy of the MPL was not distributed with this
9 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10
11 #ifndef _H_MP_PRIME_
12 #define _H_MP_PRIME_
13
14 #include "mpi.h"
15
16 extern const int prime_tab_size; /* number of primes available */
17 extern const mp_digit prime_tab[];
18
19 /* Tests for divisibility */
20 mp_err mpp_divis(mp_int *a, mp_int *b);
21 mp_err mpp_divis_d(mp_int *a, mp_digit d);
22
23 /* Random selection */
24 mp_err mpp_random(mp_int *a);
25 mp_err mpp_random_size(mp_int *a, mp_size prec);
26
27 /* Pseudo-primality testing */
28 mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which);
29 mp_err mpp_divis_primes(mp_int *a, mp_digit *np);
30 mp_err mpp_fermat(mp_int *a, mp_digit w);
31 mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes);
32 mp_err mpp_pprime(mp_int *a, int nt);
33 mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
34 unsigned char *sieve, mp_size nSieve);
35 mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong,
36 unsigned long * nTries);
37
38 #endif /* end _H_MP_PRIME_ */
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/freebl/mpi/mpmontg.c ('k') | mozilla/security/nss/lib/freebl/mpi/mpprime.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698