aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* In Botan, the Timer base class provides access to a high-resolutionlloyd2008-04-0711-59/+34
| | | | | | | | | | | 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-072-10/+0
| | | | fruit for removal.
* The intent of this branch is to remove the global library state objectlloyd2008-04-076-58/+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.
* 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-073-3/+3
| | | | | static function of the Timer base class - since that is the only code which actually needs to access it.
* Don't hard-code the user and group when doing an install: instead uselloyd2008-04-0612-48/+10
| | | | | whatever the current user/group is. If you wish to override, edit the makefile or override the INSTALL_CMD_* variables on the command line.
* Remove the Named_Mutex_Holder and associated code. Convert all uses tolloyd2008-04-026-77/+56
| | | | | | | | | | | | | | 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.
* Bump version in configure.pl to 1.7.5lloyd2008-03-311-1/+1
|
* Startup a changelog entry for 1.7.5 to document notable stuff since 1.7.4lloyd2008-03-141-0/+4
|
* Wrap lineslloyd2008-03-142-2/+4
|
* Use a special typedef, Pipe::message_id, rather than a bare u32bit,lloyd2008-03-143-23/+25
| | | | to represent the message number in a Pipe
* Add a new constructor for DataSource_Stream taking in a std::istream.lloyd2008-03-112-8/+25
| | | | | 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-112-14/+18
| | | | | | 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
* Update mp_asm64 module to use new signatures for word_madd{2,3} functions1.7.4lloyd2008-03-101-6/+6
|
* Changes for 1.7.4lloyd2008-03-103-2/+11
|
* Mostly revert 2f4fd18182d5a75c40cd831e7ee3c314be5c57d6, only keep thelloyd2008-03-10437-437/+437
| | | | | updated dates on files that have actually changed this year. This makes the diff across versions readable again.
* Add to the todo: Tests for the simple functions (bigint_*, rotate_left, etc)lloyd2008-03-101-0/+4
|
* On NetBSD with GCC, define _NETBSD_SOURCE; according to a report on thelloyd2008-03-101-1/+1
| | | | Monotone mailing list, it was needed for a build.
* Unroll the loops in SHA_160::hash that unpack the input and perform thelloyd2008-03-091-4/+15
| | | | | expansion. While I would prefer to have the compiler to this, using GCC 4.1.2 it is 4% faster on a Core2 Q6600 with the loops partially unrolled.
* Add a version of bit_ops.h with bswapl/bswapq statements. The xor_buflloyd2008-03-092-0/+91
| | | | | | | | takes advantage of unaligned reads/writes being legal for some extra performance, but should be rewritten to use SSE2 and non-termporal writes. Most of the functions in bit_ops.cpp are implemented by x86-64, just not easily accessible from C++
* 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.
* Rename offset_ variables to idx_lloyd2008-03-091-30/+30
|
* Avoid closing an invalid file descriptor, even though it is basicallylloyd2008-03-091-1/+1
| | | | harmless, to avoid a valgrind warning
* 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-097-53/+56
| | | | | | | 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-092-37/+31
| | | | writing of it in assembly.
* Put reverse_bytes into bit_ops.h so they can be inlined. Rewrite the versionlloyd2008-03-082-33/+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-14455-455/+455
| | | | | | | 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.
* Pass the second argument of works_on as a reference, requires slightlylloyd2008-02-141-5/+6
| | | | fewer explicit coercions.
* Fix compilation with GCC 3.2 - it doesn't like the :: namespace specificationlloyd2008-02-122-2/+2
| | | | for struct stat
* Mark es_dev as only running on Unix/Unix-like systems. Patch from Joel Low.lloyd2008-01-311-0/+16
| | | | | | | Has not been tested on all of the systems listed, and on many of them it won't be relevant anyway since /dev/random and company only exist on some of them (Linux, BSDs, recent Solaris, and it looks like recent AIX and HP-UX as well).
* Wrap to 80 columnslloyd2008-01-241-7/+7
|
* Update readme.txt and changelog with 1.7.3 information1.7.3lloyd2008-01-232-7/+8
|
* Reorder the output of configure.pl --help so the most important and mostlloyd2008-01-221-27/+28
| | | | commonly used options are near the top.
* Fix pk_bench.cpp compilation (remove a stray try statement)lloyd2008-01-171-3/+2
|
* merge of '3d9e9476c5b2a2ee125eee7e0dd10bfe460d0546'lloyd2007-12-24208-2110/+1788
|\ | | | | | | and '9fe0310805932b889bdfa17c9213f2b97d47ab6a'
| * Qualify (some) calls to functions in the global namespace using anlloyd2007-12-249-80/+78
| | | | | | | | | | | | explicit :: (it is unfortunate that there is no good way to detect all of such calls in an automated manner). Also use new-style casts in parts of the zlib code.
| * Add a short comment describing Turing::fixedSlloyd2007-11-191-1/+1
| |
| * Change the default list of PRNG devices fromlloyd2007-11-171-1/+1
| | | | | | | | | | | | | | | | | | /dev/urandom /dev/random to /dev/random /dev/srandom /dev/urandom because the es_dev module can handle reads from devices that may block without ever blocking for an unbounded amount of time.
| * Drop es_file: replaced by es_devlloyd2007-11-173-61/+0
| |
| * Add a hook for the es_dev module in Builtin_Moduleslloyd2007-11-171-0/+8
| |
| * Add a new module, es_dev, that will replace es_file. Instead of using C++lloyd2007-11-173-0/+153
| | | | | | | | | | iostreams, it uses unbuffered Unix I/O syscalls and is careful to avoid blocking for more than short amounts of time.
| * Replace C-style casts with static_cast (found by GCC's -Wold-style-cast)lloyd2007-11-172-6/+5
| |
| * Add base64 encoding and decoding to the set of benchmarked filterslloyd2007-11-161-0/+3
| |
| * Mark start and end as const in karatsuba_size since they are never modifiedlloyd2007-11-161-2/+2
| | | | | | | | after assignment.
| * Revert the change that renamed append() to push_back(). As pointed outlloyd2007-11-1517-49/+47
| | | | | | | | | | | | 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.
| * The porting doc describes how to port code from Botan 1.2 to 1.4, butlloyd2007-11-151-144/+0
| | | | | | | | | | doesn't go beyond that. Since 1.4 itself is pretty obsolete, and 1.6 is now in wide use, just drop the doc in mainline
| * Update log to mention the recent rename of append to push_backlloyd2007-11-141-1/+2
| |
| * Rename MemoryRegion::append to push_backlloyd2007-11-1416-47/+48
| | | | | | | | Change all callers in the library and self-test code.