aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/pk_ops.h
Commit message (Collapse)AuthorAgeFilesLines
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-181-5/+5
| | | | | | 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.
* Use size_t instead of u32bit in all of pubkeylloyd2010-10-121-15/+15
|
* Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-161-6/+6
|
* More Doxygen updates/fixeslloyd2010-06-151-2/+14
|
* Deconstify PK_Ops. It's quite reasonable that some op will want tolloyd2010-03-091-8/+7
| | | | | | | | | | | | | 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().
* Remove the now no-op classes PK_Encrypting_Key,lloyd2010-03-081-4/+4
| | | | | PK_Decrypting_Key, PK_Signing_Key, PK_Verifying_with_MR_Key, and PK_Verifying_wo_MR_Key.
* Add ops for ElGamal encryption and decryption.lloyd2010-03-051-0/+13
| | | | | 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 opslloyd2010-03-051-6/+16
|
* Rename PK_Ops::Signature_Operation to PK_Ops::Signaturelloyd2010-03-051-4/+4
| | | | Rename PK_Ops::KA_Operation to PK_Ops::Key_Agreement
* Add verification ops for all signature key typeslloyd2010-03-051-6/+37
|
* Remove the sign() operation from the public key objects, totally replacedlloyd2010-03-051-0/+25
| | | | | | by using the ops. Add real ECDSA test vectors (two found in ANSI X9.62)
* Add signature generation operation classes. Remove sign() fromlloyd2010-03-051-0/+35
| | | | | | PK_Signing_Key, though for the moment the class remains because there are a few pieces of code that use it to detect if signatures are supported, or for passing to functions in look_pk
* This checkin represents a pretty major change in how PK operations arelloyd2010-03-041-0/+38
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.