Commit Graph

183 Commits

Author SHA1 Message Date
nelsonb%netscape.com
175cab0f15 Implement sieving to accelerate elimination of composites.
This sieve eliminates all but about 3500 numbers from each range of 64k.
2000-07-22 05:54:21 +00:00
nelsonb%netscape.com
1f040d3f9f Use large prime table for faster prime gen. Make prime table "const".
Change functions that use prime table to use const arguments.
2000-07-22 05:36:45 +00:00
nelsonb%netscape.com
41121574a7 Change s_mp_norm to always use a power of two as the normalizing factor.
This enhancement performance by turning the normalizing and denormalizing
operations into shifts.
2000-07-21 21:06:08 +00:00
nelsonb%netscape.com
4b4e6bccd9 Implement mpl_get_bit, mpl_set_bit, mpl_significant_bits. 2000-07-21 21:04:14 +00:00
nelsonb%netscape.com
3b292e3f60 Fix symbol prefixes in some comments. 2000-07-21 20:50:31 +00:00
roeber%netscape.com
bed9fed1db Added tests of token object manipulation.
I actually did this two months ago, but forgot to
check it in before going on sabbatical.
2000-07-20 21:48:26 +00:00
mcgreer%netscape.com
36c22a2a15 some compilers don't like the void* arithmetic 2000-07-20 16:58:32 +00:00
nelsonb%netscape.com
350eea5535 Use unsigned ints for length parameters to "octets" functions. 2000-07-20 04:47:24 +00:00
nelsonb%netscape.com
7f70f07983 Eliminate lots of warnings found by -fullwarn.
Add sanity test to s_mp_div().
2000-07-20 04:21:37 +00:00
nelsonb%netscape.com
04007f8bb5 Eliminate warnings found with -fullwarn. 2000-07-20 04:20:21 +00:00
mcgreer%netscape.com
dbede1a951 Change the startup/shutdown procedure. Now a minimum amount of seed bytes, MIN_SEED_COUNT, are required before output bytes can be extracted. Also, it is possible to do a full restart by calling RNG_RNGInit() and RNG_RNGShutdown() in succession. This is noted in the blapi.h comments for those functions. 2000-07-19 23:54:43 +00:00
nelsonb%netscape.com
5a1cb37329 Build all mpi .c files with -DMP_API_COMPATIBLE 2000-07-19 23:23:24 +00:00
nelsonb%netscape.com
94e36d6f32 Implement 5 new functions for dealing with variable length integers
represented as unsigned and signed octet strings.
mp_read_unsigned_octets(), mp_unsigned_octet_size(),
mp_to_unsigned_octets(), mp_to_signed_octets(), mp_to_fixlen_octets()
See mpi.h for more info.
2000-07-19 23:22:43 +00:00
nelsonb%netscape.com
9ab0d70f0e All #defines now have MP_ prefix. To get old #defines, compile with
-DMP_API_COMPATIBLE .  mpi.c is compiled that way.
2000-07-19 23:18:08 +00:00
mcgreer%netscape.com
adc97e5caf initial checkin of PRNG code 2000-07-19 17:01:31 +00:00
mcgreer%netscape.com
0b57de2866 initial checkin of ARCFour. 2000-07-18 00:56:09 +00:00
nelsonb%netscape.com
49bfd5fc00 Fix "random" modulus so it is odd and has msb of most significant digit
set to 1, and "random" base to be less than modulus.
2000-07-17 22:37:55 +00:00
nelsonb%netscape.com
8133fdd980 Fix script to run on certain unix platforms. 2000-07-17 22:34:30 +00:00
nelsonb%netscape.com
7dc037f3a3 Shorten this test so it completes in less time. 2000-07-17 22:33:46 +00:00
nelsonb%netscape.com
bdf621e594 Fix mpp_pprime() so it doesn't stop after first succesful iteration. 2000-07-17 22:32:46 +00:00
nelsonb%netscape.com
88292a3a0d Add support for 32-bit digits (64-bit words) on platforms that can
multiply two 32-bit values yielding a 64-bit product in hardware.
Fix bug in s_mp_div that computed a quotient digit q > DIGIT_MAX
when b > DIGIT_MAX/2 and b < a <= DIGIT_MAX.
2000-07-17 22:31:18 +00:00
nelsonb%netscape.com
29b5ea6ec4 Elimintate type mismatch warning. 2000-07-17 22:23:23 +00:00
nelsonb%netscape.com
9ae84ceff8 Turn on MP_CRYPTO flag by default. Increase default size to 32 digits. 2000-07-17 22:22:28 +00:00
nelsonb%netscape.com
3e30ad8b50 Get file to work with SysV make on IRIX.
Add .i target (preprocessor output).
2000-07-17 22:21:42 +00:00
nelsonb%netscape.com
7ed5654089 MPI Arbitrary Precision Integer Arithmetic library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
2000-07-14 00:45:02 +00:00
mcgreer%netscape.com
11bcfbe3d6 fingerprint had to handled in certutil for now since SECU_PrintCertificate receives a decoded DER. see #45303 2000-07-12 22:42:57 +00:00
mcgreer%netscape.com
d42ada9be0 add fingerprints to info dumped with certificate 2000-07-12 20:48:47 +00:00
chrisk%netscape.com
49779ca3c4 Added -d option
-p option now also works for decoding
2000-07-07 00:57:39 +00:00
relyea%netscape.com
2c08b2ae6c Fix memory leak when using hardware acceleraters. 2000-06-29 21:26:17 +00:00
relyea%netscape.com
1d084af74a merge changes from NSS 3.0 branch to allow NT automated tests to work. 2000-06-29 21:25:41 +00:00
relyea%netscape.com
5fcb0862b3 merge 3.0_Branch changes to get NT to run back unto the tip. 2000-06-29 21:23:37 +00:00
mcgreer%netscape.com
0d70c5df17 add a > wordsize test for RC4 2000-06-29 18:38:30 +00:00
thayes%netscape.com
192078b3d8 Add tests for Secret Decoder Ring (SDR) 2000-06-24 01:06:26 +00:00
thayes%netscape.com
c960eeb856 Add SDR test command 2000-06-23 22:25:22 +00:00
chrisk%netscape.com
c2fdb05c18 Added and corrected some comments
Added $layercounter
Clarified $boundary generation (a boundary has leading AND trailing CRLFs!)
2000-06-23 18:37:33 +00:00
chrisk%netscape.com
d705ca0332 Preliminary checkin at a state where smime can parse messages generated
by itself.
2000-06-23 16:40:31 +00:00
chrisk%netscape.com
3902194f5b Added some comments and asserts 2000-06-21 18:12:02 +00:00
chrisk%netscape.com
92a3672caa Oops - fixed the fix. The prototype now correctly unpacks into a
DHPublicKey structure.
2000-06-21 00:04:38 +00:00
chrisk%netscape.com
a83d527722 Fix OID for DC AVAs - the root OID in RFC2247 is not different from
the root OID in RFC1274 - so the one we had was WRONG.
I don't know where it came from.
2000-06-20 16:31:31 +00:00
chrisk%netscape.com
390a6f1dec Add code for generation of SMIMEProfile and SMIMEKeyEncryptionPreference 2000-06-20 16:28:59 +00:00
chrisk%netscape.com
23cd2f3659 First feeble attempt at fixing the problem that our definition of
Diffie-Hellman key parameters does not encompass all the optional
fields defined in RFC2459, section 7.3.2 (namely j and validationParams).

I added comments reminding us of the fact that PQGParams need to be
extended to hold these, and fixed the ASN1 prototype from its previous
totally broken status to one that decodes prime, subPrime and base
correctly, and skips the rest.

This avoids failure in public key extraction (which is part of verification)
with DH certs.
2000-06-20 16:22:36 +00:00
chrisk%netscape.com
3550ea9e23 Fix problem where DH certs were always rejected when verifying them
for EMail encryption.
A Diffie-Hellman key needs to be tested for KU_KEY_AGREEMENT, not
KU_KEY_ENCIPHERMENT.
2000-06-20 16:15:32 +00:00
chrisk%netscape.com
568524e3be Fixed bug in sequence printing code: array counter was overshooting by one 2000-06-20 14:35:17 +00:00
chrisk%netscape.com
c8e8241728 Fix bug in decoder:
When encoding indefinitely & encountering an optional field at the end of
a sequence, right after an IMPLICIT or POINTER template, the decoder
was not propagating the optionalness and the end-of-contents condition
correctly as it hits the end-of-contents octets instead of the optional
field. This is because IMPLICIT and POINTER push TWO states to look
for the next tag, not just one.
(The first state is "afterImplicit" or "afterPointer", the second one
starts with "beforeIdentifier" as usual).
This finally makes decoding envelopedData messages in cmsutil work.
2000-06-20 13:24:01 +00:00
thayes%netscape.com
4cd82c9914 Fix double free of item value that is in an arena. 2000-06-16 23:26:16 +00:00
mcgreer%netscape.com
5c4d045072 attempt to add token support for listing certs & keys 2000-06-16 00:38:44 +00:00
mcgreer%netscape.com
1a4bf955be more cleanup on cert listing 2000-06-16 00:36:43 +00:00
chrisk%netscape.com
9f56a873d3 Add generation of SMIMECapabilities 2000-06-14 23:17:52 +00:00
chrisk%netscape.com
fa197d9014 canonicalization step adds CRs to LFs only of there are no CRs present. 2000-06-14 23:15:06 +00:00
chrisk%netscape.com
9cbdb3d252 Make example 5.7 of ietf-smime-examples draft decode correctly
(we still cannot look up certs by SubjectKeyID, so it won't verify)
2000-06-14 23:12:48 +00:00