aboutsummaryrefslogtreecommitdiffstats
path: root/checks/pk.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-181-2/+2
| | | | style cast in secmem.h
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-181-29/+29
| | | | | | using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
* propagate from branch 'net.randombit.botan.tls-state-machine' (head ↵lloyd2012-04-251-0/+6
|\ | | | | | | | | | | a4741cd07f50a9e1b29b0dd97c6fb8697c038ade) to branch 'net.randombit.botan.cxx11' (head 116e5ff139c07000be431e07d3472cc8f3919b91)
| * Some fixes for very minimal builds (typically due to --no-autoload)lloyd2012-04-201-0/+6
| |
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2011-06-131-4/+4
|\ \ | |/ |/| | | | | | | 150bd11dd8090559ee1e83394b8283bf93a018de) to branch 'net.randombit.botan.c++0x' (head 7480693bb3f1e8a4e039a3e7ba3d9a7007f9730e)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-131-4/+4
| |\ | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-09-031-4/+4
| | |\ | | | | | | | | | | | | | | | | | | | | a29c41b4a949207b1544096c3afab668f8b5179e) to branch 'net.randombit.botan.c++0x' (head a9d0c2f805b3c20a4c648575d7256959db8329fe)
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-211-4/+4
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | 96d0a1885774b624812fd143d541c8bcda319217) to branch 'net.randombit.botan.c++0x' (head e14368ab9d7976f3e111c6bc0adf24eebeb7c114)
| | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-091-4/+4
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9932d4d63417f7fcc199ada244cbaa6c1c32d9c1) to branch 'net.randombit.botan.c++0x' (head f4a385a376311edc62ef506c72cc56f69e6efd5a)
| | | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-02-251-8/+8
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c1db52e38b60afbc6549af5222d6e10b1b9730dd) to branch 'net.randombit.botan.c++0x' (head e56dfbfe6bffbd5b4e52b115549d885c5fd04586)
| | | | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-211-8/+8
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | | | * Replace the (deprecated) auto_ptr with unique_ptr.lloyd2009-04-011-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was mostly a s/auto_ptr/unique_ptr/, except in the CVC code and one function in ECDSA, which relied on auto_ptr's move semantics (ugh) and had to be modified in various ways.
* | | | | | | | ECC private keys had two different constructors, one taking a grouplloyd2011-04-081-6/+7
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and a random number generator, and the other taking a group and a preset private key value. The DL private keys instead have on constructor for this; if the x value is zero, then a new random key is created. For consistency, do this with ECC as well. ECDH actually didn't have one of these constructors, forcing you to either load from PKCS #8 or else use a random key. Rename EC_Domain_Params to EC_Group, with a typedef for compatability. More doc updates. Update mtn ignores for Sphinx output
* | | | | | | Fix CRL reason codes and updating of CRLs. Add tests for both cases.lloyd2010-10-071-1/+0
| | | | | | |
* | | | | | | Remove more uses of vector to pointer implicit conversionslloyd2010-09-131-9/+9
|/ / / / / /
* / / / / / Use the standalone version of the hex decoder instead of the wrapper thatlloyd2010-09-031-23/+32
|/ / / / / | | | | | | | | | | | | | | | previously existed in misc.cpp that emulated it via a pipe and filter.
* / / / / Add a couple of verification tests for GOST 34.10lloyd2010-03-161-0/+31
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generating the test vectors found yet another inane (and, of course, undocumented) behavior in the GOST implementation included in OpenSSL; it treats the hash inputs as little endian. Just out of curiousity, I checked RFC 5832, which supposedly specifies this algorithm; not a peep about endian conversions. The more I deal with standards coming out of the CryptoPro people, the less confidence I have in them.
* | | | Deconstify PK_Ops. It's quite reasonable that some op will want tolloyd2010-03-091-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | precompute only as needed, or will want to access some other expensive resource or etc. Change how the secret for generating blinding is done in cases where a PRNG isn't available. Use the operations public op to hide the secret, for instance the seed for a DH blinding variable is 2^x mod p. Make use of being able to mutate internal structures in the RW signer, since that does have access to a PRNG, so use it to initialize the blinder on first call to sign().
* | | | Dont need RNG in this testlloyd2010-03-091-3/+2
| | | |
* | | | Rename PK_Encryptor_MR_with_EME and PK_Decryptor_MR_with_EME tolloyd2010-03-081-6/+6
| | | | | | | | | | | | | | | | | | | | PK_Encryptor_EME and PK_Decryptor_EME; the message recovery is somewhat implicit in the recovery of the plaintext.
* | | | Modify pubkey classes to take names instead of object pointers.lloyd2010-03-081-54/+44
| | | | | | | | | | | | | | | | | | | | Remove use of look_pk from the source and examples, instead instantiate classes directly.
* | | | Remove the sign() operation from the public key objects, totally replacedlloyd2010-03-051-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | by using the ops. Add real ECDSA test vectors (two found in ANSI X9.62)
* | | | More keygen testslloyd2010-03-041-0/+8
| | | |
* | | | Test GOST with 521-bit prime field (was setting off bug before)lloyd2010-03-041-1/+1
| | | |
* | | | Split up load/store tests public vs privatelloyd2010-03-041-11/+29
| | | |
* | | | For each keygen tests, save the file as pem then reload it.lloyd2010-03-041-27/+80
| | | |
* | | | Add GOST 34.10 benchmarks. Kill of last bits of ECKAEG terminology.lloyd2010-03-021-1/+1
|/ / /
* / / Delete gfp_element.h and remove the gfpmath testslloyd2010-02-251-1/+0
|/ /
* | Clean up exceptions. Remove some unused ones like Config_Error. Makelloyd2010-01-051-14/+14
| | | | | | | | | | | | | | Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail.
* | Add copyright and license notes to pretty much every file that didn't have them,lloyd2009-12-311-0/+6
|/ | | | | | | | including the examples and self-test code. Most of these files had not copyright/license information at all; since a major point of the examples is to allow users to copy and paste code that already does something they want, an ambigious license is not good.
* Reorganize all GF(p)/ECC tests to be called from pk.cpplloyd2008-11-171-0/+2
|
* Fix segfault due to shared objects in DLIES testlloyd2008-11-111-3/+10
|
* Remove lookup.h use from DLIES, PK key agreement, DSA param gen, get_enc.cpplloyd2008-11-111-2/+3
|
* Add ECKAEG tests from InSiTo, by Manuel Hartllloyd2008-10-141-0/+1
|
* Move InSiTo's ECDSA tests into the main test suitelloyd2008-10-121-10/+11
|
* Handle building Botan with almost all public key code disabled (though onlylloyd2008-10-011-27/+38
| | | | | | | with the aid of macro hackery, at the moment). Change DH feature macro to BOTAN_HAS_DIFFIE_HELLMAN Change NR feature macro to BOTAN_HAS_NYBERG_RUEPPEL
* Report skipped DH testslloyd2008-10-011-2/+3
|
* Note in test suite output if DSA tests are being skippedlloyd2008-10-011-6/+7
|
* During the public key test suite, print . if the test passed, ? if thelloyd2008-10-011-7/+16
| | | | | | | algorithm could not be found, or X if the test fails. Before, one could disable (say) NR, and the NR tests would all look to pass, because they are being silently skipped. This gives some feedback that the test is not actually being run.
* Compliation fixeslloyd2008-09-281-6/+5
|
* Modularize the public key algorithms, though currently a great deal oflloyd2008-09-281-37/+102
| | | | | | the underlying implementation goop remains in the core library instead of being shunted off, due to various dependencies it has (most of which it shouldn't).
* Allow test suite to build even if RNG or DLIES is missinglloyd2008-09-281-1/+8
|
* Use the Timer class for all benchmarkinglloyd2008-09-051-34/+42
|
* Remove most of the direct references to the global_rng() calllloyd2008-06-281-44/+34
|
* Remove uses of global PRNG from self-test and benchmark code. Assumeslloyd2008-06-271-11/+10
| | | | access to /dev/random (will be cleaned up shortly)
* Remove load checking, as it requires an RNG (at least at the moment).lloyd2008-06-271-22/+32
| | | | | | | | | 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.
* Similiar combining transform for the ElGamal, DSA, and NR private keylloyd2008-06-201-4/+8
| | | | constructors.
* Consolidate the two DH_PrivateKey constructors into a single one takinglloyd2008-06-201-12/+18
| | | | | a RNG reference, a group, and an (optional) private key. The public key is now always rederived from the private.
* Convert pkcs8_decoder() and x509_decoder() to take a RandomNumberGenerator&lloyd2008-06-201-2/+6
| | | | | | | | 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)
* Fix remaining -Wmissing-declarations warnings in self-test/benchmark codelloyd2008-06-201-135/+121
|