aboutsummaryrefslogtreecommitdiffstats
path: root/checks
Commit message (Collapse)AuthorAgeFilesLines
* Prevent crash if asked to benchmark unknown block cipher with a modelloyd2010-05-051-4/+11
| | | | (eg "NoSuchCipher/CBC")
* Modify the implementation of multiplication mod 65537 used in IDEA tolloyd2010-04-301-0/+520
| | | | | | | | | | be branch-free. This reduces performance noticably on my Core2 (from 32 MiB/s to a bit over 27 MiB), but so it goes. The IDEA implementation using SSE2 is already branch-free here, and runs at about 135 MiB/s on my machine. Also add more IDEA tests, generated by OpenSSL
* Add a couple of Comb4P tests, generated by the python implementationlloyd2010-04-231-0/+9
|
* Add a test for RSA verification with raw padding and an unusual keylloyd2010-04-211-0/+33
|
* Don't bother benchmarking 512 or 768 bit keys; considering an RSAlloyd2010-03-211-7/+4
| | | | | | | | | modulus of 768 bits has already been publicly factored, and discrete logarithm algorithms run in about the same time, these keys aren't safe to use no matter how fast they are. Also remove the 8192 bit RSA/RW keys - it took too long to generate them, and nobody is likely to be using 8K bit keys anytime soon anyway.
* Replace PointGFp::check_invaraints, which would either return silentlylloyd2010-03-192-16/+20
| | | | | | | | | | | or throw an exception, with PointGFp::on_the_curve, which returns a bool. Update callers. This showed several cases where check_invaraints was being called multiple times, for instance when decoding a point with OS2ECP, check_invaraints was called; many callers of OS2ECP would then call check_invaraints again on the same object.
* If check against copy fails, print algo namelloyd2010-03-191-1/+1
|
* There are some nasty API problems that are caused by having to pass alloyd2010-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a couple of verification tests for GOST 34.10lloyd2010-03-162-0/+49
| | | | | | | | | | | 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.
* Fix GOST 34.10 benchmarklloyd2010-03-161-1/+1
|
* Disable fault protection for DSA, NR, and GOST 34.10 benchmarkslloyd2010-03-151-2/+2
|
* Centralize which ECC domains are used for benchmarkinglloyd2010-03-131-34/+17
|
* Skip bench on very small ECC groups; 112 == DESlloyd2010-03-131-3/+1
|
* Add 192 and 256 bit groups to the ECDSA benchmark lineuplloyd2010-03-131-1/+3
|
* Disable fault protection for ECDSA benchmark, easier profilinglloyd2010-03-131-1/+1
|
* Simple cleanupslloyd2010-03-131-6/+13
|
* Remove access to the Jacobian coordinate getters get_{x,y,z}, as welllloyd2010-03-131-136/+59
| | | | | | | | | | | | | | as the 4-argument constructor. Define operator==() in terms of the affine coordinates. Rewrite tests that assumed access to the Jacobian coodinates in terms of the affine coordinates. This change allows for using arbitrary coordinate systems in PointGFp, as long as it can convert to the normal affine coordinates (which are what is used by all ECC algorithms implemented currently, and probably all interesting ECC algorithms in general).
* Remove call to disable key testing, now a per-build optionlloyd2010-03-101-4/+2
|
* Deconstify PK_Ops. It's quite reasonable that some op will want tolloyd2010-03-092-27/+34
| | | | | | | | | | | | | 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-082-10/+10
| | | | | 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-085-139/+139
| | | | | 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-054-203/+113
| | | | | | by using the ops. Add real ECDSA test vectors (two found in ANSI X9.62)
* This checkin represents a pretty major change in how PK operations arelloyd2010-03-042-138/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use KDF2/PK_Key_Agreement in DH benchmarklloyd2010-03-041-5/+5
|
* 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 similar decoding constructors to the private keyslloyd2010-03-042-3/+3
|
* Add a new constructor to each public key algorithm (only the publiclloyd2010-03-042-97/+2
| | | | | | | keys so far, private keys not changed) that takes an AlgorithmIdentifier and a MemoryRegion<byte>&. This performs the X.509 decoding. It is not possible anymore to create uninitialized PK objects.
* Remove odd DH use in ECDH testlloyd2010-03-041-4/+0
|
* Some botan exception throws are plain STL exceptionslloyd2010-03-041-7/+1
|
* Add a new function to public key x509_subject_public_key which returnslloyd2010-03-041-6/+2
| | | | | what x509_encoder()->key_bits() used to return. This is much simpler than using the explicit encoder objects. Remove X509_Encoder entirely.
* Reduce deps slightly in selftest codelloyd2010-03-031-4/+17
|
* Avoid warnings under VC++ in ECC testslloyd2010-03-032-2/+2
|
* Fix some -Wmissing-declarations warnings in the test codelloyd2010-03-032-14/+11
|
* Add XSalsa20lloyd2010-03-031-0/+82
|
* Modify the ECDSA signature OIDs. Previously the ones using the BSIlloyd2010-03-021-1/+1
| | | | | | | | | | | 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.
* Make CVC tests a bit more verboselloyd2010-03-021-8/+10
|
* Add GOST 34.10 benchmarks. Kill of last bits of ECKAEG terminology.lloyd2010-03-024-24/+92
|
* Rename PointGFp::get_jac_proj_{x,y,z} simply get_{x,y,z}lloyd2010-03-021-32/+32
|
* Rename ECKAEG to ECDH. As far as I can tell they are the same algorithm,lloyd2010-03-022-54/+52
| | | | | I'm not sure where the old name came from though as literally the only hits for it on Google are botan-related.
* Remove auto_ptr from ECC key typeslloyd2010-03-022-8/+7
|
* Remove a fairly useless member of EC_PublicKey that was only used forlloyd2010-03-021-4/+4
| | | | | | | handling ImplicitCA ECDSA keys in the CVC code. Currently dealt with in CVC by simply commenting out the calls - CVC is already pretty broken and I'd much rather have ECC sane and under control and CVC totally broken than ECC remaining in its current state.
* Kill get_EC_Dom_Pars_by_oidlloyd2010-03-016-28/+32
|
* Clean up EC_Domain_Paramslloyd2010-03-011-6/+6
|
* Delete gfp_element.h and remove the gfpmath testslloyd2010-02-253-531/+0
|
* Change create_random_point to use Modular_Reducerlloyd2010-02-251-11/+9
|
* Remove unneeded include of gfp_elementh.hlloyd2010-02-251-1/+0
|