aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the initialization/deinitialization functions static members oflloyd2006-09-201-21/+17
| | | | | | | the LibraryInitializer class, rather than global functions floating around inside the Init namespace. Allow callers to provide an alternative Modules object.
* The public add_engine API now always places the new engine at the frontlloyd2006-09-201-9/+8
| | | | | of the list. The only time when the other behavior was desired was inside the load() function, which now simply appends to the engines vector itself.
* Make the implementation of the round function a bit easier to read.lloyd2006-09-201-6/+12
|
* When searching the block list, first try the last block we had a goodlloyd2006-09-111-4/+4
| | | | | | | | allocation from, rather than the block after that one. This helps the pathalogical case where there are many full blocks and some free blocks at the very end of the list (as then it would loop through each one, trying and failing to allocate from an already full block until it hit the end of the list again).
* Correctly deal with allocators added post-initialization. In particular,lloyd2006-09-114-48/+40
| | | | | | | | | | handle the case where an allocator is added that has the same name as one already registered. Flush the cached allocator pointer when the default is changed. Mark comparison operations in Pooling_Allocator::Memory_Block as inline; this seems to help the STL sort and binary search algorithms tremendously.
* Remove a useless wrapper function.lloyd2006-09-101-17/+6
|
* Completely rewrite how the default X509_Store searches are performed,lloyd2006-09-101-86/+41
| | | | | | exposing the actual search objects to the user rather than wrapping them in functions. Primarily this is to avoid the Visual Studio bug alluded to in the last commit.
* Hack around some Visual Studio bugs that I can't seem to find good solutionslloyd2006-09-104-16/+35
| | | | for.
* Add parenthesis to make the order of evaluation in an expression more obviouslloyd2006-09-091-1/+1
|
* Add a couple of static_casts to make it clear where a type conversion islloyd2006-09-084-13/+15
| | | | | | | | | being performed. Undefined the prototype creating macro in x509stat.cpp after use. Avoid a possible type conversion in bigint_divop by storing high's top bit in a word instead of a bool.
* Return the correct type from Basic_Constraints::get_path_limit (was coercinglloyd2006-09-081-1/+1
| | | | the path limit integer to a boolean)
* Rename instances of X509_PublicKey and PKCS8_PrivateKeylloyd2006-09-069-34/+34
|
* Split PK_Key into Public_Key and Private_Key; these new classes merge inlloyd2006-09-0610-81/+53
| | | | the interfaces previously included in X509_PublicKey and PKCS8_PrivateKey.
* Implement codec objects for private keys as well.lloyd2006-09-065-125/+155
|
* Remove some old commented out test code.lloyd2006-09-061-54/+0
|
* First step in a major rewrite of the high level public key code. Thelloyd2006-09-063-65/+205
| | | | | | X509_PublicKey object now offers interfaces that return encoder and decoder objects. Eventually these changes will make it much easier to support alternate key formats like OpenPGP.
* Merge a formerly duplicate function (one in an anonymous namespace inlloyd2006-09-062-28/+19
| | | | x509self.cpp, the other a block of code in X509_CA's constructor).
* Move the declaration of AlgorithmIdentifier into its own header file.lloyd2006-09-061-1/+1
|
* PK_Verifier no longer keeps a reference to the key being used; it onlylloyd2006-09-061-7/+15
| | | | | ever needed it to pull a few pieces of information from the key, which it now gets by calling pure virtual functions implemented by its children.
* Change Engine to not rely on the existence of an Algorithm base class forlloyd2006-09-061-123/+83
| | | | the various types it wants to cache.
* Add a new version of the StreamCipher_Filter constructor that takes a keylloyd2006-08-231-0/+11
| | | | as well as the cipher name
* Put the definitions of Pipe::LAST_MESSAGE and Pipe::DEFAULT_MESSAGE intolloyd2006-08-231-0/+6
| | | | | pipe.cpp; apparently GCC was eliding them completely from the shared library otherwise, meaning Boost.Python couldn't reference them.
* Fix a bug that caused subject alternative name information to be savedlloyd2006-08-231-2/+5
| | | | as issuer names.
* X509_Certificate::ex_constraints and ::policies now return (if possible)lloyd2006-08-221-2/+22
| | | | | | string representations of the OIDs; anything for which a human-readable version does not exist in the OID table is returned in the normal dotted decimal representation.
* Have OIDS::lookup do the right thing when given an OID that isn'tlloyd2006-08-221-2/+8
| | | | | registered in the name database, or asked to lookup an OID with a bare OID string representation.
* Add "OrgUnit" as an additional synonym for X520.OrganizationalUnit,lloyd2006-08-221-1/+2
| | | | though it's clear that this whole naming system is very broken.
* Let SHA_160::W be resized dynamically; potentially the asm version couldlloyd2006-08-211-0/+8
| | | | use a little extra workspace, this makes that simpler to do.
* Remove an oddly placed newlinelloyd2006-08-211-1/+0
|
* Move bigint_simple_mul into mp_mul.cpp, since that is the only place itlloyd2006-08-193-15/+26
| | | | | | was used. Make a variant of bigint_simple_mul, bigint_simple_sqr, for mp_sqr.cpp
* Move Montgomery reduction algorithm into mp_asm.cpplloyd2006-08-195-65/+66
| | | | | | | | | | Move the inner-most loop of Montgomery into bigint_mul_add_words, in mp_muladd.cpp Use bigint_mul_add_words for the inner loop of bigint_simple_multiply Move the compare/subtract at the end of the Montomgery algorithm into bigint_monty_redc
* Don't test Skipjack at startup - it's really not that important, andlloyd2006-08-191-8/+0
| | | | | running the test means the algorithm prototype is loaded into memory when it will probably never be used later.
* Remove trailing whitespacelloyd2006-08-192-2/+2
|
* Simplify the implementation of bigint_divoplloyd2006-08-181-6/+8
|
* Move montgomery_reduce to after choose_window_bits for better consistencylloyd2006-08-171-18/+18
| | | | between the Montgomery and fixed-window exponentiators.
* Create a slightly higher level wrapper around bigint_monty_redc, save alloyd2006-08-171-18/+13
| | | | few lines.
* Remove whitespacelloyd2006-08-171-3/+0
|
* Inline the call to word_add in bigint_monty_redc - the carry in waslloyd2006-08-171-3/+3
| | | | | | always zero, so this is both a bit more efficient and more readable. It won't be able to take advantage of asm implementations of word_add, but the benefit from that with a single call per loop is small anyway.
* Move bigint_monty_redc to its own file; profiling indicates that thislloyd2006-08-172-33/+49
| | | | | single function is using 30+% of the runtime during RSA operations, making it a strong candidate for implementation in assembly.
* Split Montgomery reduction into two functions, the core algorithm linkedlloyd2006-08-162-4/+13
| | | | | | as C (for replacing by asm later), and another that performs a subtract if needed (inside powm_mnt.cpp). That way an asm version of the Montgomery algorithm won't have to deal with calling other functions.
* Remove some variables we didn't really need in the key schedulelloyd2006-08-151-6/+4
|
* Replace Serpent's key_xor function with a macro, so the header can belloyd2006-08-151-6/+5
| | | | shared between the C++ and assembly versions.
* Clear the W buffer inside the SHA_160::clear() functionslloyd2006-08-131-0/+1
|
* Merge the AES TD and TE arrays, so assembly versions can used indexedlloyd2006-08-132-188/+189
| | | | | addressing rather than having to keep all four pointers around. Unfortunately GCC does not seem to be taking advantage of this.
* Throw Invalid_Key_Length rather than Invalid_Argument in AES constructorlloyd2006-08-131-2/+1
| | | | if a bad key value is selected.
* Fix compile problem when no timer modules are compiled inlloyd2006-08-121-0/+1
|
* Make the ByteReader class in CAST_128::key_schedule only manipulatelloyd2006-08-101-2/+2
| | | | const pointers, as it doesn't actually need write access to anything.
* If an exception is thrown anywhere inside Init::initialize, catch itlloyd2006-08-091-34/+39
| | | | | and force a deinitialization before throwing it further up the call stack.
* Remove memory leak - the configuration object was not being deleted.lloyd2006-08-091-0/+1
|
* Alter how buffering is performed in MDx_HashFunction:add_data; ratherlloyd2006-08-051-11/+19
| | | | | | | than always placing the first block into the temp buffer, we only copy the data into there if we have to (ie, if we have an incomplete block). So calling add_data with a block that is a multiple of the hash function's internal block size is entirely zero-copy.
* Make it possible to insert Engines into the front of the queue;lloyd2006-08-051-3/+7
| | | | | | otherwise any Engines added after startup (eg, application-specific ones) would only be used for new algorithm - it wouldn't be possible for them to override existing implementations.