aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/dl_group
Commit message (Collapse)AuthorAgeFilesLines
* Apply final annotations to the library alsoJack Lloyd2017-09-221-1/+1
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* More include header cleanupsJack Lloyd2017-09-212-3/+0
|
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-191-1/+1
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-021-1/+3
|
* Fix how DL_Group chooses generator for strong prime groups.Jack Lloyd2017-01-063-7/+22
| | | | | | | | | | | Previously it fixed g=2 but this is not always correct. GH #784 Change default PEM header for X9.42 groups to match OpenSSL. We accept either on decoding. GH #784 Change {DL_Group,EC_Group}::PEM_for_named_curve to return std::string instead of a const char*. That makes a future refactoring I have in mind possible without breaking API.
* Add DL_Group testsJack Lloyd2016-12-232-6/+6
| | | | | | | | | Fix a bug in how the 6144 and 8192 IETF MODP groups were encoded; they have g and q values switched. Fixed by just switching the PEM header to match the actual encoded format. Rename DL_Group::X942_DH_PARAMETERS to ANSI_X9_42_DH_PARAMETERS to avoid a macro conflict with Windows cryptography headers (GH #482)
* Merge GH #779 Add ECDH/ECIES blinding and DH small subgroup checkingJack Lloyd2016-12-211-5/+19
|\
| * Improved DL_Group verification. The group is invalid, if g^q mod p !=1 and ↵Never2016-12-191-5/+19
| | | | | | | | increased number of Miller-Rabin iterations, if strong is set (we pass 128 as prob in make_prm.cpp).
* | Convert to using standard uintN_t integer typesJack Lloyd2016-12-182-7/+7
|/ | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Rename both DL and EC named group files.Jack Lloyd2016-12-081-0/+0
| | | | | | | Avoid having any files within src/lib (in any subdirs) with the same name. That seems worth avoiding even just on the basis of avoiding basic confusion (looked in named.cpp - no the other one...) and may allow simplifying the build in various ways.
* Mass-prefix member vars with m_René Korthaus2016-01-082-38/+38
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-1/+1
| | | | | | | | As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
* Add more workfactor estimate helpers.Jack Lloyd2015-11-291-1/+1
| | | | | | | | | | Specifically a named one for integer factorization (despite using same formula as DL calc) which incorporates the k value from RFC 3766. Also adds dl_exponent_size which returns the exponent size, this one ignores k thus using a ~10 bit larger exponent than strictly necessary. Adding in k downgrades 1024 bit RSA to exactly 80 bits, which is probably about right.
* Prohibit creating a DL_Group smaller than 1024 bitsJack Lloyd2015-10-151-2/+2
|
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-041-1/+0
| | | | | | | | | | | | | | | Convert all uses of Algorithm_Factory and the engines to using Algo_Registry The shared pool of entropy sources remains but is moved to EntropySource. With that and few remaining initializations (default OIDs and aliases) moved elsewhere, the global state is empty and init and shutdown are no-ops. Remove almost all of the headers and code for handling the global state, except LibraryInitializer which remains as a compatability stub. Update seeding for blinding so only one hacky almost-global RNG instance needs to be setup instead of across all pubkey uses (it uses either the system RNG or an AutoSeeded_RNG if the system RNG is not available).
* Add missing files. Remove cipher lookup from engine code.lloyd2015-02-011-8/+2
|
* Ensure all files have copyright and license info.lloyd2015-01-103-3/+3
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Remove unused includeslloyd2014-11-182-2/+0
|
* Any fixed MR iterations is probably wrong for somebody. Allow the userlloyd2014-04-251-5/+4
| | | | | | to specify a probability as well as if n was randomly chosen or not. If the input is random use a better bounds to reduce the number of needed tests.
* Move lib into srclloyd2014-01-104-0/+877