Markus Wanner | 27 Sep 12:08
Gravatar

upgrade of included botan for mtn

Hi,

I've finally taken the time to go through upgrading the included botan 
library to 1.7.9 first, then 1.7.12. Some renaming and name conflicts 
during merging were a PITA to solve and made me do it in two steps.

The Global_RNG of botan has gone, so I've added a pointer to an RNG to 
the app_state, the key_store and the database. Most places using an RNG 
have access to a key_store object, so we could maybe even get rid of the 
pointer in the database object.

Only mkstemp.cc was puzzling me: I've now changed it to assign its own 
RNG. Dunno if that can be optimized to use monotone's, but OTOH it maybe 
doesn't matter.

The Memory_Exhausted exception has now gone, so we don't need a special 
check for that and can rely on std::bad_alloc now.

Performance of the SHA-1 remains pretty much the same since we cannot 
use the optimized SSE2 variant (+60% sha1 throughput [1]). That alone is 
a good reason to push the library-build branch.

Regards

Markus Wanner

[1]: benchmark results for sha1:

(using "mtn benchmark_sha1"):
default botan sha1: ~ 144 MiB/s
botan_sha1_sse: ~ 234 MiB/s

I've been unable to measure the amd64_asm variant, yet.

Gmane