summaryrefslogtreecommitdiffstats
path: root/crypto
AgeCommit message (Collapse)Author
2000-12-06Faster BN_mod_sqrt algorithm for p == 5 (8).Bodo Möller
2000-12-06Use bc's "print" feature whenever it is available,Bodo Möller
not just on certain platforms.
2000-12-06remove useless instructionUlf Möller
2000-12-06Intel assembler version for bn_sub_part_words(). I haven't gotUlf Möller
reliable timings yet, please try it out!
2000-12-06another fix for the debug printUlf Möller
2000-12-06test_mod_mul is useful, let's run it more often.Ulf Möller
2000-12-06move constants for debug functions to end of fileUlf Möller
2000-12-05Discuss http://www.shoup.net/papers/oaep.ps.ZBodo Möller
2000-12-05On Windows, Rainbow uses _stdcall convention under Windows.Richard Levitte
Spotted by plin <plin@rainbow.com>
2000-12-05push the flags tooUlf Möller
2000-12-05looks like it works nowUlf Möller
2000-12-05save registers in the debug output code (return value is overwritten too)Ulf Möller
2000-12-05more of the same: add printf() for perlasm.Ulf Möller
2000-12-05minor modification to the previous changeUlf Möller
2000-12-05PERLASM - the wierdest programming language since Intercal.Ulf Möller
add debug output facilities.
2000-12-05Use assert as in the rest of the BN library.Ulf Möller
2000-12-04Remove the last bn_wexpand()s that made us break constness. OfRichard Levitte
course, that means we need to handle the cases where the two arrays to bn_mul_recursive() and bn_mul_part_recursive() differ in size. I haven't yet changed the comments that describe bn_mul_recursive() and bn_mul_part_recursive(). I want this to be tested by more people before I consider this change final. Please test away!
2000-12-04Change error message to "bignum too long"Bodo Möller
2000-12-04ANSI C doesn't allow trailing semi-colons after a function's closing braceGeoff Thorpe
so these macros probably shouldn't be used like that at all. So, this change removes the misleading comment and also adds an implicit trailing semi-colon to the DECLARE macros so they too don't require one.
2000-12-04Make the remaining LHASH macro changes. This should leave no remainingGeoff Thorpe
cases of function pointer casting in lh_new() calls - and leave only the lh_doall and lh_doall_arg cases to be finished.
2000-12-03include <limits.h>Bodo Möller
2000-12-03Don't allow BIGNUMs to become so large that computations with dmaxBodo Möller
might overflow.
2000-12-02Next step in tidying up the LHASH code. This commit defines DECLARE andGeoff Thorpe
IMPLEMENT macros for defining wrapper functions for "hash" and "cmp" callbacks that are specific to the underlying item type in a hash-table. This prevents function pointer casting altogether, and also provides some type-safety because the macro does per-variable casting from the (void *) type used in LHASH itself to the type declared in the macro - and if that doesn't match the prototype expected by the "hash" or "cmp" function then a compiler error will result. NB: IMPLEMENT macros are not required unless predeclared forms are required (either in a header file, or further up in a C file than the implementation needs to be). The DECLARE macros must occur after the type-specific hash/cmp callbacks are declared. Also, the IMPLEMENT and DECLARE macros are such that they can be prefixed with "static" if desired and a trailing semi-colon should be appended (making it look more like a regular declaration and easier on auto-formatting text-editors too). Now that these macros are defined, I will next be commiting changes to a number of places in the library where the casting was doing bad things. After that, the final step will be to make the analogous changes for the lh_doall and lh_doall_arg functions (more specifically, their callback parameters).
2000-12-02Add a comment to explain the purpose of bn_cmp_part_words().Richard Levitte
2000-12-02last commit was wrong. Now it works. :)Ulf Möller
2000-12-02arglUlf Möller
2000-12-02forgot to remove the loop variableUlf Möller
2000-12-02Loops like this one:Ulf Möller
if (bp == NULL) for (j=0; j<10000; j++) BN_add(&c,&a,&b); seem to be pretty useless, and bp never is NULL anyway.
2000-12-02New function BN_bntest_rand() to detect more BN library bugs.Ulf Möller
The bn_cmp_part_words bug was only caught in the BN_mod_mul() test, not in the BN_mul() test, so apparently the choice of parameters in some cases is bad.
2000-12-02Fix bn_cmp_part_words() and move it to bn_lib.c.Ulf Möller
2000-12-01First step in tidying up the LHASH code. The callback prototypes (andGeoff Thorpe
casts) used in the lhash code are about as horrible and evil as they can be. For starters, the callback prototypes contain empty parameter lists. Yuck. This first change defines clearer prototypes - including "typedef"'d function pointer types to use as "hash" and "compare" callbacks, as well as the callbacks passed to the lh_doall and lh_doall_arg iteration functions. Now at least more explicit (and clear) casting is required in all of the dependant code - and that should be included in this commit. The next step will be to hunt down and obliterate some of the function pointer casting being used when it's not necessary - a particularly evil variant exists in the implementation of lh_doall.
2000-12-01functionality for BN_mod_sqrt timingsBodo Möller
2000-12-01"make depend"Bodo Möller
2000-11-30COMP_zlib should always be declared, even if it is not functional.Bodo Möller
Don't dump core in ssltest.
2000-11-30Fix the recently introduced test that checks if the result is 0Bodo Möller
2000-11-30First tentative impementation of Kerberos 5 cryptos and keys for SSL/TLS. ↵Richard Levitte
Implemented by Vern Staats <staatsvr@asc.hpc.mil>, further hacked and distributed by Jeffrey Altman <jaltnab@columbia.edu>
2000-11-30Fix BN_rshift, which caused lots of trouble.Bodo Möller
2000-11-30Remove randomness from the test. These constants give me a segmentBodo Möller
violation in test_kron on a 32 bit system.
2000-11-30BN_mod_exp(r,a,p,m,ctx) should not be called with r == p.Bodo Möller
But even if this is avoided, there are still segmentation violations (during one of the BN_free()s at the end of test_kron in some cases, in other cases during BN_kronecker, or later in BN_sqrt; choosing a different exponentiation algorithm in bntest.c appears to influence when the SIGSEGV takes place).
2000-11-30It's "#elif", not "#elsif".Bodo Möller
2000-11-30A few bug fixes for Windows.Richard Levitte
2000-11-30Changes to Lenka's Montgomery implementation.Bodo Möller
Submitted by: Lenka Fibikova
2000-11-30Corrections to the comments in BN_mod_inverse.Bodo Möller
2000-11-30COMP_METHOD has a new argument since some time back...Richard Levitte
2000-11-30Change c_zlib further to allow loading a shared zlib on all operatingRichard Levitte
systems where such an operation is supported.
2000-11-30BN_mod_exp problems ...Bodo Möller
2000-11-30Changes to c_zlib.c to make ZLIB.DLL dynamically loadable underRichard Levitte
Windows. Really, this should probably be done on Unix as well, but that will be a later story...
2000-11-30Move reduction step from BN_mod_exp to BN_mod_exp_mont_word.Bodo Möller
Fix BN_mod_exp_simple for a==0 (mod m). Skip useless round in BN_mod_sqrt (1 is always a square, no need to test BN_kronecker for it).
2000-11-30bn_modfs.c is no longer needed, a BN_sqrt implementationBodo Möller
exists in bn_sqrt.c now
2000-11-30Fix bntest.c problem -- one of the primes got lostBodo Möller