aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Reduce RW creation min also to 512 for benchmarkslloyd2008-09-021-1/+1
|
* The counter is not specified, so do not mention itlloyd2008-08-311-1/+1
|
* Add DSS groups with 2048 and 3072 bit p values (and 256 bit q subgroups).lloyd2008-08-311-105/+141
| | | | | | These were generated using the FIPS 186-3 PRNG, with seed values generating by applying SHA-256 to the UTF-8 encodings of the strings "Botan 2048 DSS seed #51" and "Botan 3072 DSS seed #24"
* Allow generating 512 and 768 bit DSA keys.lloyd2008-08-311-6/+9
|
* Allow creating 512 bit RSA keys again (for benchmark, mostly)lloyd2008-08-311-1/+1
|
* Merge mp_sqr.cpp and mp_mul.cpp into mp_karat.cpp, since there is a lotlloyd2008-08-272-147/+132
| | | | | | of similar-but-not-identical code between them. (Can't merge for performance reasons, squaring is a special case of multiplication allowing extra optimizations)
* Use -BigInt(1) instead of BigInt("-1") to avoid the parsing overhead.lloyd2008-08-271-2/+2
| | | | | Instead just call the u64bit constructor and invert using the BigInt operator.
* Add a specialized version of theta() for NullVector, since it cleans uplloyd2008-07-151-4/+25
| | | | the key schedule, and perhaps offers slightly better code generation.
* merge of '17a621a99c0fb8685efd5f3f3411a44e4d5ff835'lloyd2008-07-131-0/+1
|\ | | | | | | and 'df7d36d4e4fe81092c682b0ef92ac3a9ef12cbd3'
| * Missing include of timers.h, error if no timer modules usedlloyd2008-07-081-0/+1
| |
* | Add the block cipher Noekeon (http://gro.noekeon.org/). Only "indirect mode"lloyd2008-07-112-0/+177
|/ | | | keying is supported (see section 2.3 of the specification for details)
* Fix return values for ressol(), saying BigInt x = -1 does somethinglloyd2008-07-071-2/+2
| | | | unexpected (see ticket #23, http://bugs.randombit.net/show_bug.cgi?id=23)
* Remove unneeded parenslloyd2008-07-071-1/+1
|
* Add an implementation of the Shanks-Tonelli algorithm, which is used tolloyd2008-07-071-0/+82
| | | | find square roots modulo a prime. Contributed by FlexSecure GmbH
* Remove printf in catch blocklloyd2008-07-071-1/+0
|
* Extend random_prime() to be able to generate primes of any bit size.lloyd2008-07-051-1/+10
| | | | | | | | | | | bits <= 1 -> error bits == 2 -> choose 2 or 3 at random bits == 3 -> choose 5 or 7 at random bits == 4 -> choose 11 or 13 at random bits >= 5 -> procedure used previously. Tested by running random_prime() with random bit sizes <= 16 until it had generated all <= 16 bit primes.
* Remove the free-standing function deref_alias. It only served as a forwarderlloyd2008-06-307-33/+32
| | | | | | for the implementation in Library_State. Instead explicitly call deref_alias on global_state() wherever the old freestanding version was used. This serves to make (more) uses of the global state explicit rather than implicit.
* Remove the default_pbe option. Instead hardcode the default intolloyd2008-06-302-5/+2
| | | | | | | PKCS8::encrypt_key - this is slightly less flexible, but removes the dependency on the Library_State object. And if someone wants to use a different algorithm, they just have to pass in an actual value for the pbe string instead of letting it default to the empty string.
* Remove option v1_assume_ca, no longer usedlloyd2008-06-301-2/+0
|
* Previously X509_Store took two configuration values from the librarylloyd2008-06-302-9/+3
| | | | | | | | | config state: how long successful validations should be cached, and the amount of slack to allow on time boundary checks. Now these are passed as arguments to the constructor, as a pair of 32-bit integers representing the number of seconds to allow as slack and the number of seconds to cache validations for. They default to the same compiled in defaults as before, 24 hours (86400 seconds) and 30 minutes (1800 seconds), respectively.
* Remove the Config class.lloyd2008-06-3011-166/+104
| | | | | | | | In reality, Config was a singleton, with the only owner being the Library_State object. Theoretically one could create and use another Config instance, but in practice it was never done. Reflect the reality and inline the members and public functions of Config in Library_State, removing Config entirely.
* Remove global_config() - replace by direct calls to global_state()lloyd2008-06-3012-41/+47
|
* Make use of RandomNumberGenerator implementing add_entropy_source inlloyd2008-06-281-14/+16
| | | | make_rng()
* Add interfaces for add_entropy_source and add_entropy tolloyd2008-06-282-8/+16
| | | | | | | | | | | RandomNumberGenerator, and make ANSI_X931_PRNG's implementations just forward the arguments to the underlying RNG. This allows seeding the RNG even if no entropy modules are loaded into the library. Also it allows actually adding user-specified data; to do it otherwise would require creating the RNG objects yourself and retaining a pointer to the Randpool, which is pretty bogus. Move Null_RNG to rng.h
* Reseed the underlying PRNG when ANSI_X931_PRNG:reseed is calledlloyd2008-06-281-0/+2
|
* The two remaining locks were not being deleted, leaking memorylloyd2008-06-281-0/+2
|
* Change make_rng to be a static member of RandomNumberGeneratorlloyd2008-06-281-1/+1
|
* New structure for entropy sources + RNGs. The entropy sources are owned bylloyd2008-06-274-164/+169
| | | | | | | Randpool, it will query them as needed (or if asked to do so). New function make_rng() that creates an RNG (X9.31 backed by a Randpool) and seeds it. Remove the entropy source related code from the Modules/Builtin_Modules classes.
* Avoid warninglloyd2008-06-271-1/+1
|
* Remove the global PRNG object as well as the global list of entropy sources.lloyd2008-06-272-117/+1
|
* Remove PRNG_Unseeded throw() specifies from the RNG randomize() functions.lloyd2008-06-272-2/+2
| | | | | | They were probably not a good idea. If nothing else, these functions might throw bad_alloc, and possibly other errors. Something broad like std::exception might be applicable, but that seems pointlessly broad.
* OctetString now requires a RandomNumberGenerator& to create a randomlloyd2008-06-271-3/+4
| | | | key or IV; it does not reference the global RNG.
* Reorganize the EMSA classes, and remove the last references to prng_referencelloyd2008-06-275-58/+126
| | | | in the library ccode.
* Previously if DL_Group was given a q value of zero, it would check tolloyd2008-06-271-4/+0
| | | | | | | | | | | | see if (p-1)/2 was prime, and if so set q to that. This is to deal with certain bogus DH formats (PKCS #3, specifically; the 'modern' ANSI formats always provide the q subgroup value). However this required access to the RNG. Rather than push RNG usage all the way down into that part of DL group, simply remove the feature. Since PKCS #3 format is only really used for DH keys, it will not much affect anything functionally (that I can see).
* Remove unneeded include of libstate.hlloyd2008-06-271-1/+0
|
* Remove load checking, as it requires an RNG (at least at the moment).lloyd2008-06-2710-58/+47
| | | | | | | | | Probably some variation of it will be added back in later, at least to do basic checks like that primes are really odd (and we can do basic primality checks, etc, even with an RNG). Alternative: call check_key() manually on public keys you load with an RNG object.
* Split IF_Core constructor into two, one for public keys and one for private.lloyd2008-06-272-5/+12
| | | | Public version doesn't need an RNG argument.
* Remove SHA1PRNG for the moment, untillloyd2008-06-231-167/+0
| | | | | | | | | a) I am sure we really want to include this (proprietary, unanalyzed?) PRNG in Botan b) I have a chance to add test cases and clean up the code. Also note a few more changes in the changelog, and set a provisial release date for sometime in July.
* Remove the hooks for the AEP module, since it was removed due to lack oflloyd2008-06-221-16/+0
| | | | | | testability (have a card still, but the drivers are for 2.4 kernel and seemingly not 64-bit or thread safe, so it's pretty much a paperweight right now).
* Similiar combining transform for the ElGamal, DSA, and NR private keylloyd2008-06-203-53/+34
| | | | constructors.
* Consolidate the two DH_PrivateKey constructors into a single one takinglloyd2008-06-201-20/+13
| | | | | a RNG reference, a group, and an (optional) private key. The public key is now always rederived from the private.
* Use RNG& argument for PKCS8::encrypt_key and PKCS8::PEM_encodelloyd2008-06-201-6/+8
|
* Convert pkcs8_decoder() and x509_decoder() to take a RandomNumberGenerator&lloyd2008-06-205-24/+35
| | | | | | | | reference, along with PKCS8::load_key get_pbe no longer calls new_params() on the newly instantiated instance, which is not backwards compatible (you have to either call new_params yourself, or explicitly set the iteration count, salt, etc)
* Pass RNG& to IF (RSA/RW) load hookslloyd2008-06-203-24/+28
|
* Pass a reference to the global PRNG as an argument to the DL_Scheme_Decoderlloyd2008-06-201-6/+12
| | | | constructor, instead of referencing it directly.
* Pass a RandomNumberGenerator& to the PK_Core constructors and the variouslloyd2008-06-206-44/+48
| | | | public key object loading hooks.
* Move RNG code from base.cpp to new rng.cpplloyd2008-06-182-49/+57
|
* The FTW_EntropySource constructor no longer takes a default argument:lloyd2008-06-171-1/+1
| | | | specify it when we instantiate one in Builtin_Modules
* Delete the public key filter classes. Advertised on the devel list previously:lloyd2008-06-161-115/+0
| | | | http://lists.randombit.net/pipermail/botan-devel/2008-June/000559.html
* Some functions in engine.cpp required BOTAN_DLL macros to compile correctly.lloyd2008-06-111-14/+14
| | | | | | | | | I didn't understand why but had let it slip, but now that it's clear that their declarations were not in scope at the point of their definitions (seen via GCC's -Wmissing-declarations) it is quite obvious: the compiler had no idea the functions should be compiled with an alternative ELF scoping. Since the declarations are now included, remove the BOTAN_DLL macros from the .cpp file.