aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
Commit message (Collapse)AuthorAgeFilesLines
* Yet more Doxygen commentslloyd2010-06-161-16/+18
|
* More Doxygen commentslloyd2010-06-162-0/+10
|
* Deprecated some of the old lookup functions in Doxygenlloyd2010-06-152-0/+38
|
* More Doxygen updates/fixeslloyd2010-06-151-2/+2
|
* Fix a few hundred Doxygen warningslloyd2010-06-154-40/+43
|
* Use "/*" instead of "/**" in starting comments at the begining of a file.lloyd2010-06-075-5/+5
| | | | | This caused Doxygen to think this was markup meant for it, which really caused some clutter in the namespace page.
* mutex.h is internal - had been picking up system installed versionlloyd2010-04-231-1/+1
|
* Allow adding engines dynamicallylloyd2010-03-241-10/+8
|
* Delete global RNG and the mutex in ~Library_Statelloyd2010-03-231-3/+5
|
* Don't require the AES module; if it's there its there, if it's notlloyd2010-03-192-4/+2
| | | | then you can't use the global PRNG but everything else still works.
* There are some nasty API problems that are caused by having to pass alloyd2010-03-194-8/+235
| | | | | | | | | | | | | | | | | | | | | | | | PRNG everywhere. The removal of the global PRNG was generated by a desire to remove the global library state entirely. However the real point of this was to remove the use of globally visible _mutable_ state; of the mutable state, the PRNG is probably the least important, and the most useful to share. And it seems unlikely that thread contention would be a major issue in the PRNG. Add back a global PRNG to Library_State. Use lazy initialization, so apps that don't ever use a PRNG don't need a seeding step. Then have AutoSeeded_RNG call that global PRNG. Offer once again RandomNumberGenerator& Library_State::global_rng(); which returns a reference to the global PRNG. This RNG object serializes access to itself with a mutex. Remove the hack known as Blinding::choose_nonce, replace with using the global PRNG to choose a blinding nonce
* At startup, test if lock_mem() at least seems to work. If it doesn't,lloyd2010-03-131-1/+2
| | | | | immediately fall back the the plain malloc-based allocator, which is typically quite a bit faster.
* Remove config options to toggle if X.509 extensions are critical orlloyd2010-03-103-48/+0
| | | | | | | | not. Instead provide via Extensions::add(). No way to modify behavior currently, it just follows the previous default police. Remove the config options from Library_State entirely. Die, mutable singletons, die.
* Remove the base/default_allocator option, instead save as a per-libstatelloyd2010-03-103-19/+25
| | | | variable directly.
* Rename PK_Encryptor_MR_with_EME and PK_Decryptor_MR_with_EME tolloyd2010-03-081-2/+2
| | | | | PK_Encryptor_EME and PK_Decryptor_EME; the message recovery is somewhat implicit in the recovery of the plaintext.
* Have the constructors in pubkey.h take all arguments look_pk does, andlloyd2010-03-081-9/+5
| | | | convert look_pk to simple forwarders.
* Remove the now no-op classes PK_Encrypting_Key,lloyd2010-03-081-20/+4
| | | | | PK_Decrypting_Key, PK_Signing_Key, PK_Verifying_with_MR_Key, and PK_Verifying_wo_MR_Key.
* Inline Engine_Core::mod_exp into singler caller, and deletelloyd2010-03-053-72/+0
|
* Remove IF_Corelloyd2010-03-052-31/+0
|
* Add ops for ElGamal encryption and decryption.lloyd2010-03-052-27/+0
| | | | | Note: blinding is not currently being used for RSA, RW, DH or ElGamal, which used to have them. This should be added back before release.
* Remove NR and DSA specific hookslloyd2010-03-052-54/+0
|
* Add verification ops for all signature key typeslloyd2010-03-051-2/+2
|
* Inline look_pk funcslloyd2010-03-053-102/+49
|
* This checkin represents a pretty major change in how PK operations arelloyd2010-03-042-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | performed. Up until now, each key object (eg DSA_PublicKey or ECDH_PrivateKey) had two jobs: contain the key material, and know how to perform any operations on that key. However because of a desire to support alternative implementations (GNU MP, hardware, whatever), there was a notion of operations, with the key objects containing an op that they got via engine rather than actually implementing the underlying algorithms directly. Now, represent the operation as an abstract interface (typically mapping a byte string to a byte string), and pass a plain Public_Key& or Private_Key& to the engine. The engine does any checks it wants (eg based on name, typeid, key sizes, etc), and either returns nothing (I'll pass) or a pointer to a new operation that represents signatures or encryption or what-have-you using that key. This means that plain key objects no longer contain operations. This is a major break with the traditional interface. On the other hand, using these 'bare' operations without padding, KDFs, etc is 99% of the time a bad idea anyway (and if you really need them, there are options so you get the bare op but via the pubkey.h interfaces). Currently this change is only implemented for DH and ECDH (ie, key agreement algorithms). Additionally the optional engines (gnump and openssl) have not been updated. I'll probably wait to touch those until after I can change them all in one go for all algos.
* Fix ElGamal pubkey encoding (OID was unknown)lloyd2010-03-041-1/+1
|
* Catch any exception for parsing name, assume it's a bad OIDlloyd2010-03-041-1/+1
|
* Modify the ECDSA signature OIDs. Previously the ones using the BSIlloyd2010-03-021-6/+8
| | | | | | | | | | | scheme, which is supposed to use the IEEE 1363-style concatenation format, was identified with the X9.62 OIDs, which are documented to use the DER sequence format. Switch the BSI ones to use the OIDs allocated for this purpose by BSI, and add the X9.62 ECDSA/SHA-1 OID since that was missing. Correct an ECDSA test that assumed the cert was identified with the BSI OID, even though in fact the cert in question uses an X9.62-style format.
* For PEM encoding ECC domain parameters I had been using the identifierlloyd2010-03-021-58/+58
| | | | | | | | "ECC DOMAIN PARAMETERS", because I couldn't find any other library that offered PEM encoding to be compatible with so I just picked something. Turns out OpenSSL does have PEM encoding of EC params (openssl ecparam), and uses "EC PARAMETERS". As good as anything else, and allows interop, so change to use that.
* Kill ECKAEG_Oplloyd2010-03-022-32/+0
|
* Remove ECDSA_Op and its attendant bitslloyd2010-03-022-32/+0
|
* Move all of the ECC domain parameter sets to policy.cpp, encoded as PEM,lloyd2010-03-021-0/+296
| | | | instead of weird custom format hard-coded in ec_dompar.cpp
* propagate from branch 'net.randombit.botan' (head ↵lloyd2010-02-247-208/+186
|\ | | | | | | | | | | 84baf58b29f3aaaee34e2b873d0040be5a6c4368) to branch 'net.randombit.botan.gost_3410' (head 63cbe3e357c071d7960bfedc31101eff35895285)
| * In SCAN_Name's constructor, first run the input through deref_alias beforelloyd2010-02-142-3/+5
| | | | | | | | | | breaking it apart. Otherwise it would miss on things like TLS.Digest.0 which expand to Parallel(MD5,SHA-1) which needs further parsing.
| * Add OID for Serpent/CBClloyd2010-01-191-0/+1
| |
| * Add doxygen commentslloyd2009-12-291-12/+39
| |
| * Make startup self-test failures more verboselloyd2009-12-261-2/+1
| |
| * Define lookup.{h,cpp} in terms of Algorithm_Factory. Inline a lot of simplelloyd2009-12-262-187/+123
| | | | | | | | functions into the header.
| * Add OIDs for SEED/CBC and HMAC with SHAlloyd2009-12-261-0/+8
| |
| * New SCAN decoding err string was misleading in one caselloyd2009-12-261-1/+4
| |
| * Improve exception output of SCAN_Name on bad inputlloyd2009-12-261-3/+5
| |
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-241-0/+3
|\ \ | |/ |/| | | | | | | a338abd543caa402c32acd952e865c8ec8e85a69) to branch 'net.randombit.botan.gost_3410' (head d09208e0a933da2df52494876849c542e5a556ca)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-161-0/+3
| |\ | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.gost_3410' (head 761e22ccc5785e8d699f4ba80b8f72858aa5ca75)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-081-0/+5
| | |\ | | | | | | | | | | | | | | | | | | | | 142a9359ba02d5dfcf3f2c9f99902f82ab41724e) to branch 'net.randombit.botan.gost_3410' (head 064884e9c2fde8228effdd48e80fed78ff0c42cb)
| | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-201-0/+3
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | b431f4bc404f3ed4a5332b69100ff903fbbb1d6a) to branch 'net.randombit.botan.gost_3410' (head ecd662f4afc7f412d2dd9ec8fd6ac4ac47aa1c13)
| | | * | Add an implementation of GOST 34.10-2001 as described inlloyd2009-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | draft-dolmatov-cryptocom-gost34102001-06 Known problem: GOST's X.509 (and PKCS #8?) formats are different from ECDSA. ECDSA uses compressed points, GOST uses a completely raw pair of points (with, OF COURSE, no leading uncompressed pair identifier, because using something that already exists would just be too much).
* | | | | Oops, I was overzealouslloyd2009-12-231-2/+2
| | | | |
* | | | | Avoid MSVC warning 4800 about implicit conversion from T to bool. Mostlylloyd2009-12-231-4/+4
| | | | | | | | | | | | | | | | | | | | because it makes the code slightly more explicit.
* | | | | Don't require selftest in libstate; macro wraplloyd2009-12-221-2/+6
| | | | |
* | | | | Add missing BOTAN_DLL exports.lloyd2009-12-163-10/+14
|/ / / / | | | | | | | | | | | | Move most of the engine headers to internal
* | | | Make many more headers internal-only.lloyd2009-12-162-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.