aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/pubkey.cpp
Commit message (Collapse)AuthorAgeFilesLines
* The messages for assertion checks were done both ways, both "assertionlloyd2012-07-091-2/+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.
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-181-5/+5
| | | | style cast in secmem.h
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-181-23/+23
| | | | | | 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' (head ↵lloyd2010-11-041-2/+2
|\ | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-131-2/+2
| |\ | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-211-2/+2
| | |\ | | | | | | | | | | | | | | | | | | | | 96d0a1885774b624812fd143d541c8bcda319217) to branch 'net.randombit.botan.c++0x' (head e14368ab9d7976f3e111c6bc0adf24eebeb7c114)
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-131-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | 5e9c6107cbb15744c2edf2eb0e23f4bfe949f432) to branch 'net.randombit.botan.c++0x' (head 79e5920a8bba479b9e5734f8649b8c36d27d403c)
| | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-091-2/+2
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9932d4d63417f7fcc199ada244cbaa6c1c32d9c1) to branch 'net.randombit.botan.c++0x' (head f4a385a376311edc62ef506c72cc56f69e6efd5a)
| | | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-211-2/+2
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-161-1/+1
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | | * | Remove to_string, replacing with std::to_stringlloyd2009-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to_u32bit to use the new C++0x library func stoul instead of hand-written code.
* | | | | | | | Make MemoryRegion::set protected, change all callerslloyd2010-10-291-8/+15
|/ / / / / / /
* | | | | | | Use size_t instead of u32bit in all of pubkeylloyd2010-10-121-17/+17
| | | | | | |
* | | | | | | Use BOTAN_ASSERT in various placeslloyd2010-09-261-2/+6
| | | | | | |
* | | | | | | Update all uses of MemoryRegion::append to use either push_back or operator+=lloyd2010-09-151-2/+1
| | | | | | |
* | | | | | | Remove more uses of vector to pointer implicit conversionslloyd2010-09-131-5/+5
|/ / / / / /
* / / / / / Don't call get_eme or get_kdf with name "Raw" (returns NULL); ideallylloyd2010-03-191-3/+3
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | would like to replace these functions with generic engine code instead of hardcoded lookup, and NULL return value would be impossible to disambiguate.
* / / / / Give PK_Signer users the option of disabling fault protectionlloyd2010-03-131-5/+6
|/ / / /
* | | | Have PK_Signer check the validity of all signatures before releasing.lloyd2010-03-091-7/+47
| | | | | | | | | | | | | | | | Should help against many forms of fault attacks.
* | | | Rename PK_Encryptor_MR_with_EME and PK_Decryptor_MR_with_EME tolloyd2010-03-081-16/+16
| | | | | | | | | | | | | | | | | | | | PK_Encryptor_EME and PK_Decryptor_EME; the message recovery is somewhat implicit in the recovery of the plaintext.
* | | | Have the constructors in pubkey.h take all arguments look_pk does, andlloyd2010-03-081-18/+26
| | | | | | | | | | | | | | | | convert look_pk to simple forwarders.
* | | | Add ops for ElGamal encryption and decryption.lloyd2010-03-051-45/+35
| | | | | | | | | | | | | | | | | | | | 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.
* | | | Add verification ops for all signature key typeslloyd2010-03-051-61/+32
| | | |
* | | | Add signature generation operation classes. Remove sign() fromlloyd2010-03-051-44/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Clean up PK_Key_Agreement slightlylloyd2010-03-041-15/+0
|/ / /
* | | Remove catch clauses made redundant by inheritence changes in exception ↵lloyd2010-01-081-5/+0
| | | | | | | | | | | | hierarchy.
* | | Clean up exceptions. Remove some unused ones like Config_Error. Makelloyd2010-01-051-3/+3
| |/ |/| | | | | | | | | | | 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.
* | Make many more headers internal-only.lloyd2009-12-161-1/+1
|/ | | | | | | | | | | | | Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.
* Move the contents of pubkey/pubkey (which was kind of a catch-all tolloyd2009-07-151-0/+396
just toplevel pubkey). This was a convention I realized made sense sometime on when I was first doing the modularization changes. Move pkcs8.* and x509_key.* to pk_codecs