aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecdh
Commit message (Collapse)AuthorAgeFilesLines
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-013-152/+0
|
* Give everything setting a feature test macro in build.h a version codelloyd2013-11-281-1/+1
| | | | | | so application code can check for the specific API it expects without having to keep track of what versions APIs x,y,z changed. Arbitrarily set all current API versions to 20131128.
* Move assert.h from internal to very public (included in types.h)lloyd2013-03-131-1/+0
| | | | | | This reduces friction to writing an assert, so hopefully there will be more of them as a result. And we can use asserts in public headers now, very useful for templates.
* The messages for assertion checks were done both ways, both "assertionlloyd2012-07-091-1/+1
| | | | | | X is true" and "assertion X is false". Convert all of them to the form "assertion X is true" thus making it clear what it is that we are attempting to assert by testing the expression provided.
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-182-7/+7
| | | | | | 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.
* Whitespacelloyd2012-02-021-1/+0
|
* ECC private keys had two different constructors, one taking a grouplloyd2011-04-082-4/+6
| | | | | | | | | | | | | | | | 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
* Use size_t instead of u32bit in all of pubkeylloyd2010-10-122-3/+3
|
* Use BOTAN_ASSERT in various placeslloyd2010-09-261-2/+3
|
* Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-161-2/+2
|
* Fix a few hundred Doxygen warningslloyd2010-06-151-1/+2
|
* Expose public_value() in ECDH public keylloyd2010-04-201-3/+10
|
* Replace PointGFp::check_invaraints, which would either return silentlylloyd2010-03-191-1/+3
| | | | | | | | | | | 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.
* Deconstify PK_Ops. It's quite reasonable that some op will want tolloyd2010-03-092-56/+2
| | | | | | | | | | | | | 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().
* Rename PK_Ops::Signature_Operation to PK_Ops::Signaturelloyd2010-03-051-1/+1
| | | | Rename PK_Ops::KA_Operation to PK_Ops::Key_Agreement
* The operation can assume the key will continue to exist as long as it does,lloyd2010-03-042-7/+6
| | | | so keep the curve and cofactor in ECDH op by reference instead of value.
* This checkin represents a pretty major change in how PK operations arelloyd2010-03-042-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add similar decoding constructors to the private keyslloyd2010-03-041-5/+3
|
* Add a new constructor to each public key algorithm (only the publiclloyd2010-03-041-5/+6
| | | | | | | 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.
* Make two variants of OS2ECP, one taking pointer + length, and otherlloyd2010-03-021-3/+1
| | | | | (inlined) taking a MemoryRegion& that just forwards. This makes it possible to avoid an extra copy in ECDH::derive_key.
* Add some simple constructors to the EC_ base key types to simplifylloyd2010-03-022-31/+16
| | | | the various implementations
* Remove extraneous includelloyd2010-03-021-4/+0
|
* Rename ECKAEG to ECDH. As far as I can tell they are the same algorithm,lloyd2010-03-023-0/+182
I'm not sure where the old name came from though as literally the only hits for it on Google are botan-related.