aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Move reverse_bytes from bit_ops.h to bit_ops.cpplloyd2007-10-211-19/+3
|
* Remove useless commentlloyd2007-10-211-5/+1
|
* bit_ops.h no longer includes loadstor.hlloyd2007-10-191-3/+25
| | | | | | | | | Where loadstor.h was needed but only implicitly included via bit_ops.h, include it directly Add endian reversal functions to bit_ops.h Remove some unneeded includes in big_ops2.cpp and a few other files.
* Add support for IPv4 addresses in the X.509 alternative name extension.lloyd2007-10-162-2/+2
| | | | Original patch from Yves Jerschow.
* Add functions that can convert between binary IPv4 addresses and standardlloyd2007-10-161-0/+6
| | | | decimal-dotted string notation.
* The last checkin did not work; the Library_State constructor called code1.7.2lloyd2007-10-131-5/+9
| | | | | | | | that called global_state(), which cased an infinite recursion. Make creating a Library_State a two-phase operation, first an empty constructor (just sets all pointers to NULL), then an initializer that sets up everything needed to start up the library.
* Move most of the initializer code directly into the Library_State constructorlloyd2007-10-131-4/+3
|
* Check in an initial implementation of CBC-MAC.lloyd2007-09-161-0/+36
| | | | | | | The test vectors were generated by Crypto++ 5.5 on a Linux/x86-64 machine. Test vectors for CBC-MAC(DES) all pass, for inputs up to 63 bytes. For CBC-MAC(AES-128), all test vectors with inputs over 10 bytes fail to verify against what Crypto++ produces. Unknown at this time where the bug lies.
* Avoid C-style casts (as detected by GCC's -Wold-style-cast) and instead use lloyd2007-07-234-18/+38
| | | | static_cast or reinterpret_cast, as needed.
* Move the load/store operations to their own header, to allow assemblylloyd2007-07-232-166/+182
| | | | or other non-portable implementations as modules.
* Combine the Blowfish initial sbox contents into a single 1024 element array.lloyd2007-07-171-2/+1
|
* If an algorithm cache lookup fails, index the newly created prototype objectlloyd2007-07-171-6/+10
| | | | | | | | | | | | | | | | | | | | | under the name that the algorithm was originally requested by. This enables proper caching for algorithm names which deref_alias fails to fully dereference such as "HMAC(SHA-1)". The previous code had two major problems with names of that type, firstly that the cache was effectively bypassed due to all prototype objects in Algorithm_Cache_Impl being indexed by their canonical names rather than the alias that they were requested under, and that there existed a race condition where a prototype object might be deleted while in use in multithreaded code. The downside of this change is that using multiple names to refer to a single algorithm causes multiple prototype objects to be created, one for each name that is in use. However the memory overhead of this should be fairly minimal and given the severity of the race condition this seems like a worthwhile tradeoff. A more complete fix would be to fix deref_alias to properly derference all alias names. That fix would be complimentary with this change in that if deref_alias handled all names properly there would be a single prototype object and there would then be no additional memory overhead to the cache.
* We don't need to use locked memory in the X.509 distinguished name.lloyd2007-06-111-3/+3
|
* Remove unused include of blinding.hlloyd2007-06-111-1/+0
|
* Write functions to handle loading and saving words a block at a time, taking ↵lloyd2007-05-315-6/+146
| | | | | | | | | | | | | | | | | | into account endian differences. The current code does not take advantage of the knowledge of which endianness we are running on; an optimization suggested by Yves Jerschow is to use (unsafe) casts to speed up the load/store operations. This turns out to provide large performance increases (30% or more) in some cases. Even without the unsafe casts, this version seems to average a few percent faster, probably because the longer loading loops have been partially or fully unrolled. This also makes the code implementing low-level algorithms like ciphers and hashes a bit more succint.
* propagate from branch 'net.randombit.botan.stable' (head ↵lloyd2007-04-251-2/+5
|\ | | | | | | | | | | 8a2b79c64a13d3f70b0211d4f985a678951a9663) to branch 'net.randombit.botan' (head 677686443a5bb53b03d147999947448a9dc2679a)
| * Check in a working fix for the mem_pool issues encountered by some Visuallloyd2007-04-251-2/+5
| | | | | | | | Studio users.
* | Inline the definition of Tiger::round into Tiger::pass, which was its onlylloyd2007-03-071-1/+2
| | | | | | | | | | | | caller. The resulting code is longer and somewhat harder to read, but it's giving 25-30% performance increases on my Core2, and something a bit lower but still measurable on the P4.
* | Alter one of the constructors of DL_Group to take a parameter specifyinglloyd2007-03-031-4/+5
| | | | | | | | | | | | | | | | | | how big q should be. Add FIPS 186-3 DSA parameter generation, this allows for generating larger (2048 and 3072 bit) DSA keys. At this time there do not seem to be official test vectors for 186-3, and I have not checked against other implementations. Tests will be constructed using the latest OpenSSL snapshot.
* | BigInt::operator[] now guards against accesses that are larger than thelloyd2007-03-031-2/+2
| | | | | | | | current register size; reads return 0, writes extend the buffer.
* | Add a version of BigInt::binary_decode taking a MemoryRegion of byteslloyd2007-03-011-0/+1
| |
* | Inline the round functions of RC2. This is about 15% faster on my machine,lloyd2007-03-011-4/+1
| | | | | | | | and actually reduced the total line count.
* | Split DSA parameter generation into src/dsa_gen.cpp, and make the functionslloyd2007-03-012-6/+5
|/ | | | | | members of DL_Group (the only place they were called within the source, and outside of some rather esoteric things probably the only place you would ever need it).
* Bump copyright year to 2007lloyd2007-01-20164-164/+164
|
* Add a new parameter to the Base64_Encoder to specify that a trailinglloyd2007-01-201-1/+2
| | | | | | newline should always be added, even if the output would normally fit entirely on the current line. Monotone needs this for compatability with the Crypto++ implementation of base64.
* Work around some strange Visual Studio bugs that popped up when compilinglloyd2007-01-081-3/+5
| | | | mem_pool.cpp with debug enabled.
* Move the UI pulse functions into the global library state. That is (as bestlloyd2006-12-143-30/+27
| | | | | as I can tell) the last of the global data, with the exception of the single global_lib_state pointer in libstate.cpp
* Add a new set_option member function to Configlloyd2006-12-141-3/+3
|
* The symkey.h header no longer needs to include enums.h; remove itlloyd2006-12-145-1/+4
| | | | | Add include directives for enums.h in the headers that need it now that it isn't being pulled in by symkey.h
* Remove a dependency on x509cert.h from x509_ext.cpp by moving the definitionlloyd2006-12-122-2/+3
| | | | of NO_CERT_PATH_LIMIT to enums.h
* Add a function to Library_State allowing callers to check if the globallloyd2006-09-211-1/+3
| | | | RNG considers itself seeded.
* Do not allocate a block of memory in Pooling_Allocator::init(); this waslloyd2006-09-201-1/+0
| | | | | | | causing allocators that were never used to allocate (and thus, later deallocate) memory. This was causing a noticable slowdown when the mmap based allocator was in used (based on the strace output, this was mostly due to the calls to msync).
* Make the initialization/deinitialization functions static members oflloyd2006-09-201-14/+8
| | | | | | | 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-1/+1
| | | | | 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.
* Correctly deal with allocators added post-initialization. In particular,lloyd2006-09-114-6/+9
| | | | | | | | | | 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.
* Completely rewrite how the default X509_Store searches are performed,lloyd2006-09-102-15/+58
| | | | | | 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-101-8/+5
| | | | for.
* Return the correct type from Basic_Constraints::get_path_limit (was coercinglloyd2006-09-081-1/+1
| | | | the path limit integer to a boolean)
* Make various member functions in the PK algorithms public, particularlylloyd2006-09-078-63/+45
| | | | ones which were visible via base classes, and the empty constructors.
* Rename instances of X509_PublicKey and PKCS8_PrivateKeylloyd2006-09-0615-39/+39
|
* Split PK_Key into Public_Key and Private_Key; these new classes merge inlloyd2006-09-0611-48/+45
| | | | the interfaces previously included in X509_PublicKey and PKCS8_PrivateKey.
* Implement codec objects for private keys as well.lloyd2006-09-063-13/+28
|
* First step in a major rewrite of the high level public key code. Thelloyd2006-09-064-13/+37
| | | | | | 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-061-0/+6
| | | | 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-062-22/+40
|
* PK_Verifier no longer keeps a reference to the key being used; it onlylloyd2006-09-061-4/+11
| | | | | 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.
* Move the name() declaration in BlockCipherModePaddingMethod to match thelloyd2006-09-061-2/+1
| | | | class definition in 1.4.12
* Remove the Algorithm class; the only members it exposed where name() andlloyd2006-09-063-22/+31
| | | | | clear(), which have been declared in the appropriate places in (former) subclasses of Algorithm
* Change Engine to not rely on the existence of an Algorithm base class forlloyd2006-09-061-6/+27
| | | | the various types it wants to cache.
* Make SymmetricKey and InitializationVector simple typedefs of OctetString;lloyd2006-08-231-23/+4
| | | | | since the RNG merger in 1.5.0, they have been effectively the same type anyway.