aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Simplify RNG logic in CLI a bitJack Lloyd2017-08-311-7/+10
|
* Merge GH #1169 Add LLVM bitcode targetJack Lloyd2017-08-311-36/+73
|\
| * Work around limitation in old GCC and ClangJack Lloyd2017-08-311-1/+1
| |
| * Refactor RNG seeding logic in command line interfaceJack Lloyd2017-08-301-36/+73
| | | | | | | | | | This is needed for LLVM which doesn't have any usable entropy sources. Also useful for determinsitic private key creation, etc.
* | More MSVC warnings fixesJack Lloyd2017-08-311-1/+9
|/
* Add HOTP (RFC 4226) and TOTP (RFC 6238)Jack Lloyd2017-05-191-0/+4
|
* Reformat code with astyle + fix code styleTomasz Frydrych2017-05-011-17/+22
|
* Add hex encoder/decoder CLI utilJack Lloyd2017-04-131-0/+37
|
* Add HMAC CLI commandRené Korthaus2017-04-131-0/+48
|
* Use entropy source for cli rng.Alexander Bluhm2017-03-291-1/+11
| | | | | With "botan rng --entropy" the global entropy sources are used to seed the auto seeded random number generator.
* In CLI, if system RNG is available prefer itJack Lloyd2017-02-231-2/+2
|
* Add CPUID::to_stringJack Lloyd2017-01-221-1/+1
| | | | | | | | | Deprecates CPUID::print, mainly to avoid use of ostream in utils. Main reasoning is some platforms do not have streams at all. If all uses of streams are for operator<< and operator>> overloads, these can be guarded by a future BOTAN_HAS_CPP_STREAMS system-feature flag. But when ostreams are required to use the API (as here), that is not possible.
* Fix gen_bcrypt cmdletJack Lloyd2016-08-301-1/+1
|
* RNG changes (GH #593)Jack Lloyd2016-08-241-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change reseed interval logic to count calls to `randomize` rather than bytes, to match SP 800-90A Changes RNG reseeding API: there is no implicit reference to the global entropy sources within the RNGs anymore. The entropy sources must be supplied with the API call. Adds support for reseding directly from another RNG (such as a system or hardware RNG). Stateful_RNG keeps optional references to both an RNG and a set of entropy sources. During a reseed, both sources are used if set. These can be provided to HMAC_DRBG constructor. For HMAC_DRBG, SP800-90A requires we output no more than 2**16 bytes per DRBG request. We treat requests longer than that as if the caller had instead made several sequential maximum-length requests. This means it is possible for one or more reseeds to trigger even in the course of generating a single (long) output (generate a 256-bit key and use ChaCha or HKDF if this is a problem). Adds RNG::randomize_with_ts_input which takes timestamps and uses them as the additional_data DRBG field. Stateful_RNG overrides this to also include the process ID and the reseed counter. AutoSeeded_RNG's `randomize` uses this. Officially deprecates RNG::make_rng and the Serialized_RNG construtor which creates an AutoSeeded_RNG. With these removed, it would be possible to perform a build with no AutoSeeded_RNG/HMAC_DRBG at all (eg, for applications which only use the system RNG). Tests courtesy @cordney in GH PRs #598 and #600
* Add RDRAND_RNGJack Lloyd2016-07-191-1/+14
| | | | | | | | For those that are willing to trust uninspectible hardware. :) Changes RDRAND entropy source to call RDRAND_RNG Add --rdrand flag to rng cmdlet
* Update rng cli - can make multiple requestsJack Lloyd2016-07-171-5/+10
|
* Add missing overrides and fix -Wpedantic 'extra ;' warningsJack Lloyd2016-01-171-2/+2
| | | | | | | | | | Remove -Wsuggest-attribute=noreturn from maintainer mode flags as it seems like outside of the assertion failure macro any other suggestion would always be a false positive (an unimplemented function or the like). Or at least, if such a function needing noreturn to assist with static analysis is added in the future it will be obvious, by virtue of the static analyzer warnings which occur due to the missing noreturn preventing the analyzer from understanding code flow.
* Add final attribute to many classesJack Lloyd2016-01-101-10/+10
| | | | | | | In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
* Avoid having Command* objects be created until requested.Jack Lloyd2015-12-301-13/+20
| | | | Avoids various static init and destruction hassles.
* Add Command::rng()Jack Lloyd2015-12-271-2/+1
| | | | | | | for when a command wants an RNG but doesn't much care what kind. This adds a place where a future --rng-type= option can be consulted to eg use the system RNG or a user seeded DRBG.
* Add DSA keygen and --der-out flag to keygen and pkcs8 toolsJack Lloyd2015-12-231-1/+5
| | | | If no files are given on the command line to `hash`, default to stdin
* CLI rewriteJack Lloyd2015-12-191-0/+266
The command line tools' origin as a collection of examples and test programs glued together led to some unfortunate problems; lots of hardcoded values, missing parameters, and obsolete crypto. Adds a small library for writing command line programs of the sort needed here (cli.h), which cuts the length of many of the commands in half and makes commands more pleasant to write and extend. Generalizes a lot of the commands also, eg previously only signing/verification with DSA/SHA-1 was included! Removes the fuzzer entry point since that's fairly useless outside of an instrumented build. Removes the in-library API for benchmarking.