aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* propagate from branch 'net.randombit.botan' (head ↵lloyd2008-04-1211-138/+8
|\ | | | | | | | | | | bcae6a19d8d96ebde33c832c76a130ea02bc923a) to branch 'net.randombit.botan.remove-libstate' (head f640991b6e433a264f5d22a08338cfc9c24c82da)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2008-04-1011-138/+8
| |\ | | | | | | | | | | | | | | | 6afe2db1f710f75bc27e189bb8bdb23613ce1ca3) to branch 'net.randombit.botan.remove-libstate' (head e40f0dbdfd847024c30fa0092c2acefc19a550b8)
| | * Remove the Global_RNG namespace, along with rng.h and rng.cpp. This waslloyd2008-04-073-33/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | essentially a facade for the RNG object living in the global library state. Rewrite all callers to directly invoke the global state object: this makes it more clear what functions are actually accessing mutable state outside of the normal reference graph (and thus, which functions will have to be altered in order to remove this dependency). Other facades remain in place for the configuration object and the memory allocator factory.
| | * Remove X509_GlobalState in favor of static function Extensions::get_extensionlloyd2008-04-073-40/+2
| | |
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2008-04-071-4/+2
| | |\ | | | | | | | | | | | | | | | | | | | | db3791f6bba4b57dd8aed17893565dc5bcd68f02) to branch 'net.randombit.botan.remove-libstate' (head 627d12447b2bb32aa08ff5daa499ac9580a77a05)
| | * | Remove Charset_Transcoder; hardwire UTF-8/Latin-1 conversions into charset.cpplloyd2008-04-074-43/+0
| | | |
| | * | In Botan, the Timer base class provides access to a high-resolutionlloyd2008-04-075-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timer with an unspecified update rate and epoch. It is only used inside the entropy sources to provide some timing-dependent randomness. However, it is easier and basically 'as good' to treat the timers as entropy sources in their own right and feed their output directly into an entropy pool. This commit removes Library_State::system_clock and all calls to that function.
| | * | Library_State::set_timer is never called from within Botan, low hanginglloyd2008-04-071-1/+0
| | | | | | | | | | | | | | | | fruit for removal.
| | * | The intent of this branch is to remove the global library state objectlloyd2008-04-071-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Library_State, in libstate.{h,cpp}). It causes numerous 'interesting' problems with threads, etc, and the best solution here is to move to more or less an object-capability model, where the only objects that a piece of code can access are those which can be referenced through its arguments. First things first, remove the UI 'pulse' code. It is neither necessary nor sufficient for writing proper GUI/event driven code using Botan, has likely never been used in real code, and, given that, causes a distressing amount of overhead in terms of function calls made.
* | | | Modify areas that still assumed Pipe::message_id was exactly a u32bit.lloyd2008-04-123-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done by replacing Pipe::message_id with a completely opaque type and adding only the necessary operations. In this revision Pipe::message_id does remain a u32bit. However it may become an opaque type in the future. Move the Invalid_Message_Number exception to Pipe since that is the only piece of code which throws it.
* | | | Remove Config::option_as_u32bit - the only advantage it had over callinglloyd2008-04-122-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to_u32but on the return value from Config::option was that it passed it through parse_expr, which did some simple evaluation tricks so you could say 64*1024. That does not seem worth the cost in code, especially because most of the values so controlled are probably never changed. By making them compile time constants, additional optimizations are possible in the source as well as by the compiler. Remove the pkcs8_tries config option. Hardcode that value to 3 instead. I want to rewrite that code in the relatively near future and all that will (hopefully) go away.
* | | | Make the memory allocator's chunk size a compile time constant, via alloyd2008-04-122-3/+2
| | | | | | | | | | | | | | | | new build.h macro BOTAN_MEM_POOL_CHUNK_SIZE
* | | | Rename fips140.h to selftest.h, since it doesn't really have much to dolloyd2008-04-101-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with FIPS-140 aside from being a startup self test. Remove the test of X9.19 MAC at startup because it's not that important, and loading it in the startup means a prototypical object will be created and exist in memory for the entire process runtime. This actually raises an interesting idea, that periodically the cache of objects could be cleared and, if one is needed again, it can be created again as if it was the first time.
* | | | Remove unused Config::option_as_listlloyd2008-04-101-1/+0
|/ / /
* | | Remove the pem/ config arguments. Replace with arguments to the individuallloyd2008-04-101-3/+3
| | | | | | | | | | | | functions in pem.h. All have defaults with reasonable values.
* | | Add a second argument to X509_Cert_Options, which replaceslloyd2008-04-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | the configuration value default_expire Remove signing_offset as well - it is only used for setting the default time of a X509_Cert_Options: not worth the cost of a global variable.
* | | Remove the unused function Config::option_as_boollloyd2008-04-101-1/+0
| | |
* | | Change the interface of X509_CA::sign_request as follows:lloyd2008-04-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The allow_ca policy value is no longer checked. Callers should check if the request is for a CA cert and treat it accordingly; this makes it simpler to to case-by-case decisions (expecially among multiple threads) - Instead of a single time value, a u32bit representing the number of seconds from now the certificate should expire, the start and end times are passed explicitly as two X509_Time values.
* | | Change the copyrights in all files in the Botan tree to directly reflectlloyd2008-04-10165-165/+169
| |/ |/| | | | | | | | | the actual copyright holders. For rationale, see my post to botan-devel on April 9, subject 'Changing license to directly reflect contributors' (http://www.randombit.net/pipermail/botan-devel/2008-April/000527.html)
* | Remove Extensions::copy_this(). Define the Extensions copy constructor inlloyd2008-04-071-4/+2
|/ | | | terms of Extensions::operator=
* Timer::combine_timers should be protected, not private, since subclasses needlloyd2008-04-071-1/+1
| | | | to access it.
* Move combine_timers from a free-standing function in util.h to a privatelloyd2008-04-072-1/+2
| | | | | static function of the Timer base class - since that is the only code which actually needs to access it.
* Remove the Named_Mutex_Holder and associated code. Convert all uses tolloyd2008-04-023-15/+12
| | | | | | | | | | | | | | instead allocate a reference to a mutex locally and use the more typical Mutex_Holder RAII object. Named_Mutex_Holder (and in particular the string->mutex mappings contained in the global state) have been found to be pretty expensive in at least some situations (see post by Jack Cummings to monotone-devel 2008-03-12), and doesn't really buy us that much in terms of ease of use. Also, it relies on the global state object, which has shown itself to be a rich source of race conditions and locking bugs. The intent is to incrementally remove all of the shared / global state and require applications to maintain that state where necessary.
* Wrap lineslloyd2008-03-141-1/+2
|
* Use a special typedef, Pipe::message_id, rather than a bare u32bit,lloyd2008-03-141-12/+14
| | | | to represent the message number in a Pipe
* Add a new constructor for DataSource_Stream taking in a std::istream.lloyd2008-03-111-1/+4
| | | | | Previously the only method allowed was with a pathname, which is pretty inflexible since it prevents you from using devices like std::cin, etc
* In DataSink_Stream, allow explicitly setting a pathname (forlloyd2008-03-111-3/+5
| | | | | | identification purposes) when passing in a std::ostream, since there is no portable way to go from a std::ostream to the file or other device that it names
* Mostly revert 2f4fd18182d5a75c40cd831e7ee3c314be5c57d6, only keep thelloyd2008-03-10159-159/+159
| | | | | updated dates on files that have actually changed this year. This makes the diff across versions readable again.
* Increase the size of the buffers in ARC4 and WiderWake4+1 from 1K tolloyd2008-03-092-2/+6
| | | | DEFAULT_BUFFERSIZE (normally 4K); measurably faster on a Core2
* If the macro BOTAN_TARGET_UNALIGNED_LOADSTOR_OK (from build.h) is on,lloyd2008-03-091-0/+86
| | | | | | | | | | | | | the word read/write functions will be faster through the use of (slightly unsafe) pointer manipulations. On some CPUs (like SPARC), these antics can cause crashes (usually visible by SIGBUS) if what you are attempting to read or write as an integer is not aligned on a word boundary. However they are safe on x86 and x86-64. Performance increases across the board on a Core2. In most algorithms the improvement seems to be about 3%, except a few standouts like RC6 (15%), MD4 (20%), RIPEMD-128 (8%). Will be better with faster xor_buf and byte swapping.
* Alas, my definition of the new improved reverse_bytes for 64-bit values waslloyd2008-03-091-2/+5
| | | | wrong, and didn't work at all. New corrected (and tested) version.
* Alter bigint_madd2 and bigint_madd3 to take only 3 (4, resp) arguments,lloyd2008-03-092-35/+38
| | | | | | | with the last one being both one of the input values and the output carry register, since almost always they were in fact the same variable. Also update the x86 and x86-64 modules.
* Also inline xor_buf, both for immediate effeciency gains and for futurelloyd2008-03-091-3/+31
| | | | writing of it in assembly.
* Put reverse_bytes into bit_ops.h so they can be inlined. Rewrite the versionlloyd2008-03-081-4/+17
| | | | | | | for 64-bit to not use 64-bit constants - that way GCC won't complain everwhere. Plan is for a module to replace all of these with asm (bswap, xchg on x86), at least for x86-64
* Mass update of the copyright date. Honestly I don't know why I bother,lloyd2008-02-14165-165/+165
| | | | | | | but might as well keep it up to date. And it's easier to do it once with a 'perl -pi' command than to update each file over time. Apologies to anyone looking at diffs.
* Drop es_file: replaced by es_devlloyd2007-11-171-24/+0
|
* Revert the change that renamed append() to push_back(). As pointed outlloyd2007-11-151-6/+5
| | | | | | by Joel Low on the mailing list, the STL container types have only a single version of push_back(), along with variations of insert() for handling range-based appending.
* Rename MemoryRegion::append to push_backlloyd2007-11-141-5/+6
| | | | Change all callers in the library and self-test code.
* Remove the ability to load an external configuration file. Applicationslloyd2007-11-141-2/+0
| | | | | | | | | | | needing this functionality probably already have a preexisting configuration system that they would rather use. Also remove the documentation about this feature, and the example configuration (which was pretty out of date, anyway). RFC on this change sent to the mailing list on 11-13-2007, no responses after 24 hours. It seems quite likely this code is not in use anywhere.
* Make IDEA::mul_inv just a function in an anonymous namespace, since it reallylloyd2007-11-111-1/+0
| | | | had no reason/need to be a class method.
* Malloc_Allocator doesn't have a constructor anymore but the declarationlloyd2007-10-231-2/+0
| | | | remained, which caused link errors. Removed.
* Have Malloc_Allocator directly inherit from the Allocator interface, withoutlloyd2007-10-211-5/+6
| | | | | | | | | using the infrastructure in Pooling_Allocator. Using malloc directly is slightly faster than using Botan's memory pools (using the glibc implementation). It may also reduce internal fragmentation, since the current Pooling_Allocator design is rather suboptimal in that regard.
* 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.