Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use Montgomery reduction for the important parts of PointGFp, using | lloyd | 2010-03-13 | 2 | -74/+78 |
| | | | | | code cobbled together from 1.8/InSiTo. Faster than it was in 1.9.4, but still quite slow. | ||||
* | Name args to bigint_{mul,sqr} in header | lloyd | 2010-03-13 | 1 | -5/+5 |
| | |||||
* | Give PK_Signer users the option of disabling fault protection | lloyd | 2010-03-13 | 2 | -6/+17 |
| | |||||
* | Move monty params to curve, since only depend on the prime | lloyd | 2010-03-13 | 1 | -4/+37 |
| | |||||
* | Add back code for montgomery PointGFp mult (not used atm) | lloyd | 2010-03-13 | 2 | -14/+165 |
| | |||||
* | Hide PointGFp constructors | lloyd | 2010-03-13 | 2 | -7/+14 |
| | |||||
* | Remove access to the Jacobian coordinate getters get_{x,y,z}, as well | lloyd | 2010-03-13 | 2 | -33/+9 |
| | | | | | | | | | | | | | | 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). | ||||
* | Include <netinet/in.h>; needed on FreeBSD at least | lloyd | 2010-03-10 | 1 | -1/+2 |
| | |||||
* | Remove config options to toggle if X.509 extensions are critical or | lloyd | 2010-03-10 | 7 | -96/+47 |
| | | | | | | | | 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. | ||||
* | Make cert decoding errors more verbose | lloyd | 2010-03-10 | 1 | -2/+2 |
| | |||||
* | Remove the base/default_allocator option, instead save as a per-libstate | lloyd | 2010-03-10 | 3 | -19/+25 |
| | | | | variable directly. | ||||
* | Guard call to the allocator in deallocate() by checking if the alloc | lloyd | 2010-03-10 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | pointer was actually set. Otherwise, the following problem could occur if an allocator could not be found: init() will call Allocator::get, which throws an exception init() is called from the constructor of the subclasses (MemoryVector, etc) Since the constructor of MemoryRegion has already finished, its destructor will be called. ~MemoryRegion will call deallocate() deallocate() will then access a NULL pointer By guarding the call, the exception is propagated correctly. | ||||
* | DSA and NR require certain parameters (which depend on the randomly | lloyd | 2010-03-09 | 2 | -18/+24 |
| | | | | | | choosen nonce) not be 0. Previously it would just check and throw an exception if this was the case. Change to generate a new nonce and retry if this happens. | ||||
* | Remove decls of removed RSA encrypt/decrypt | lloyd | 2010-03-09 | 1 | -5/+0 |
| | |||||
* | Oops. Secret nonce/seed for blinding for DH and ElGamal was 2^x mod p. | lloyd | 2010-03-09 | 2 | -2/+2 |
| | | | | | | | | | However if the group generator is 2, that's precisely the public key, which is hardly secret at all. Instead use y^x mod p, which while a little dubious in terms of mathematical structure is probably OK after being hashed through SHA-512 with some high resolution timestamps. | ||||
* | De-name unused rng arg | lloyd | 2010-03-09 | 1 | -1/+1 |
| | |||||
* | Deconstify PK_Ops. It's quite reasonable that some op will want to | lloyd | 2010-03-09 | 22 | -121/+79 |
| | | | | | | | | | | | | | 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(). | ||||
* | Consolidate code for choosing a window size for fixed width window | lloyd | 2010-03-09 | 4 | -72/+41 |
| | | | | exponentiation algorithms. | ||||
* | Add back RSA consistency checking (decrypt only) | lloyd | 2010-03-09 | 2 | -3/+8 |
| | |||||
* | Have PK_Signer check the validity of all signatures before releasing. | lloyd | 2010-03-09 | 2 | -8/+52 |
| | | | | Should help against many forms of fault attacks. | ||||
* | Use preexisting powermod precomputations for setting up blinders | lloyd | 2010-03-09 | 2 | -2/+2 |
| | |||||
* | Remove decls of unimplemented functions | lloyd | 2010-03-08 | 1 | -3/+0 |
| | |||||
* | Blinder::choose_nonce added a single byte of the timestamps 8 times, | lloyd | 2010-03-08 | 1 | -2/+2 |
| | | | | instead of each byte once... | ||||
* | Add back in blinding to RSA, RW, ElGamal, and DH. | lloyd | 2010-03-08 | 15 | -103/+175 |
| | | | | | | | | | | | | | | | | There are multiple unsatisfactory elements to the current solution, as compared to how blinding was previously done: Firstly, blinding is only used in the baseline implementations; the code using OpenSSL and GMP is not protected by blinding at all. Secondly, at the point we need to set up blinding, there is no access to a PRNG. Currently I am going with a quite nasty solution, of using a private key parameter to seed a simple PRNG constructed as: SHA-512(TS1 || private_key_param || public_key_param || TS2) I really want to fix both of these elements but I'm not sure how to do so easily. | ||||
* | Rename PK_Encryptor_MR_with_EME and PK_Decryptor_MR_with_EME to | lloyd | 2010-03-08 | 6 | -43/+45 |
| | | | | | 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. | lloyd | 2010-03-08 | 20 | -160/+148 |
| | | | | | Remove use of look_pk from the source and examples, instead instantiate classes directly. | ||||
* | Have the constructors in pubkey.h take all arguments look_pk does, and | lloyd | 2010-03-08 | 3 | -39/+51 |
| | | | | convert look_pk to simple forwarders. | ||||
* | Remove the now no-op classes PK_Encrypting_Key, | lloyd | 2010-03-08 | 19 | -148/+38 |
| | | | | | PK_Decrypting_Key, PK_Signing_Key, PK_Verifying_with_MR_Key, and PK_Verifying_wo_MR_Key. | ||||
* | On GMP 5.0 and later, use mpz_powm_sec, which is a version of modular | lloyd | 2010-03-05 | 1 | -0/+6 |
| | | | | exponentiation that has countermeasures against side-channel attacks. | ||||
* | Update OpenSSL engine for new interface. Similiar to GMP engine, drop | lloyd | 2010-03-05 | 9 | -503/+356 |
| | | | | support for ElGamal and NR, leaving only RSA, DSA, and DH support. | ||||
* | Add GMP PK file | lloyd | 2010-03-05 | 1 | -0/+344 |
| | |||||
* | Remove unused variable | lloyd | 2010-03-05 | 1 | -1/+0 |
| | |||||
* | Update GMP engine with new PK operations interface. | lloyd | 2010-03-05 | 8 | -481/+11 |
| | | | | | Drop support for ElGamal and NR from GMP engine, leaving just DH, DSA, and RSA | ||||
* | Set domain_encoding enum in all EC key constructors | lloyd | 2010-03-05 | 1 | -10/+15 |
| | |||||
* | Inline Engine_Core::mod_exp into singler caller, and delete | lloyd | 2010-03-05 | 4 | -74/+19 |
| | |||||
* | Remove IF_Core | lloyd | 2010-03-05 | 16 | -366/+7 |
| | |||||
* | Add RSA encrypt/decrypt ops | lloyd | 2010-03-05 | 3 | -27/+66 |
| | |||||
* | Add ops for ElGamal encryption and decryption. | lloyd | 2010-03-05 | 15 | -399/+208 |
| | | | | | 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. | ||||
* | Constify sign and verify ops | lloyd | 2010-03-05 | 13 | -41/+50 |
| | |||||
* | Remove sign and verify ops from key types | lloyd | 2010-03-05 | 6 | -109/+0 |
| | |||||
* | Remove ECDSA_PublicKey::verify | lloyd | 2010-03-05 | 2 | -40/+0 |
| | |||||
* | Rename PK_Ops::Signature_Operation to PK_Ops::Signature | lloyd | 2010-03-05 | 13 | -20/+20 |
| | | | | Rename PK_Ops::KA_Operation to PK_Ops::Key_Agreement | ||||
* | Remove NR and DSA specific hooks | lloyd | 2010-03-05 | 18 | -626/+5 |
| | |||||
* | Add verification ops for all signature key types | lloyd | 2010-03-05 | 19 | -146/+409 |
| | |||||
* | Make the modulus visible in Modular_Reducer | lloyd | 2010-03-05 | 1 | -0/+2 |
| | |||||
* | Inline look_pk funcs | lloyd | 2010-03-05 | 3 | -102/+49 |
| | |||||
* | Remove the sign() operation from the public key objects, totally replaced | lloyd | 2010-03-05 | 13 | -155/+40 |
| | | | | | | by using the ops. Add real ECDSA test vectors (two found in ANSI X9.62) | ||||
* | Force high bit in random_prime as well (done by randomize currently, but ↵ | lloyd | 2010-03-05 | 1 | -0/+3 |
| | | | | might not be later) | ||||
* | Clarify exception text on get_affine when point is zero | lloyd | 2010-03-05 | 1 | -2/+2 |
| | |||||
* | Add -Werror to gcc maintainer flags | lloyd | 2010-03-05 | 1 | -1/+1 |
| |