aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/pubkey.h
Commit message (Collapse)AuthorAgeFilesLines
* Add API stability annotations.Jack Lloyd2017-09-191-9/+9
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Fix warnings from clangs -Wdocumentation flagJack Lloyd2017-07-281-1/+1
|
* Content:Tomasz Frydrych2017-04-031-3/+3
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-52/+52
| | | | | | 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.
* Expose pk_ops.h as public interface againJack Lloyd2016-12-041-0/+1
| | | | | | | | | | | | I was initially thinking of Botan as somewhat closed system, but @cordney has a legit use case of wanting to expose a TPM sign operation, but using their internal TPM library and TPM key type. This requires the API be exposed so the derivation can occur. Add a comment in the header explaining that the header is not for normal application use and directing them to pubkey.h This basically reverts 2747e8e23aec43162
* Pubkey cleanupsJack Lloyd2016-11-121-0/+2
| | | | | | | | | | Add Public_Key::key_length usable for policy checking (as in TLS::Policy::check_peer_key_acceptable) Remove Public_Key::max_input_bits because it didn't make much sense for most algorithms actually. Remove message_parts and message_part_size from PK_Ops
* Fix doxygen warnings [ci skip]René Korthaus2016-10-191-0/+6
|
* Improve pubkey doxygen [ci skip]René Korthaus2016-10-191-1/+76
|
* Make pk_ops.h internalJack Lloyd2016-10-081-9/+43
| | | | Some fixes for missing system_rng in ECIES and tests.
* Revert PK_Verifier change (don't require RNG there).Jack Lloyd2016-10-071-17/+0
| | | | | | | Verification is deterministic and public, so really no RNG is ever needed. Change provider handling - accepts "base", "openssl", or empty, otherwise throws a Provider_Not_Found exception.
* Remove Algo_Registry usage from public key code.Jack Lloyd2016-10-071-2/+109
| | | | | | | | Instead the key types exposes operations like `create_encryption_op` which will return the relevant operation if the algorithm supports it. Changes pubkey.h interface, now RNG is passed at init time. Blinder previous created its own RNG, now it takes it from app.
* Add PK_Decryptor::decrypt_or_randomJack Lloyd2016-03-201-10/+48
| | | | | Performs content checks on the value (expected length, expected bytes) and in constant time returns either the decrypted value or a random value.
* Add ECDH via OpenSSLJack Lloyd2016-01-041-1/+4
| | | | | | | | | | Expose provider param in PK_Key_Agreement API Handle multiple providers in key agreement tests Fix some funky formatting of P-521 EC points in ecdh.vec which was being rejected by OpenSSL; for whatever reason the CAVS file had the affine coords with far more leading zeros than necessary.
* Add generalized KEM interfaceJack Lloyd2015-12-261-0/+81
| | | | | | Convert McEliece KEM to use it Add RSA-KEM
* Add update overload taking std::string to PK_Verifier and PK_SignerJack Lloyd2015-12-021-1/+19
| | | | Because convenient
* Expose providers for public key operationsJack Lloyd2015-10-141-30/+38
| | | | | | | | For PK_Encryptor and company they are requested via a new provider param to the constructors. The speed command gets a --provider option so you can see benchmark results with the different versions.
* pubkey: Add missing overridesDaniel Seither2015-07-301-3/+3
|
* lib/pubkey: Convert &vec[0] to vec.data()Simon Warta2015-06-231-11/+11
|
* Move the signature padding schemes to the PK operation classes,lloyd2015-03-231-21/+6
| | | | | | | | | as was previously done with encrypt/decrypt ops. One feature dropped on the floor here is previously PK_Signer by default did verification of signatures before releasing them as an measure against fault attacks. However in addition to being expensive this turned out to be difficult to implement with the new scheme.
* In PK encrypt/decrypt move pad calls to the operation. This allows anlloyd2015-03-141-4/+1
| | | | | | | | | op to use a padding scheme outside of our knowledge or control, for instance an OpenSSL RSA op which uses OpenSSL's padding code. Similar change for key agreement and KDFs for the same reason. Add an EME_Raw type; previously this operation was implicit in the code in pubkey.cpp
* Add new module `ffi` which provides a plain C interface, plus a newlloyd2015-02-161-2/+1
| | | | | | | | | | | | ctypes Python wrapper that uses it. The API is intentionally designed to have a very simple ABI (extern "C", all structs are opaque, no memory ownership passing the FFI boundary, limited set of simple types as args) so the ctypes wrapper is quite simple. Currently ffi provides ciphers, hashes, MACs, RNGs, PBKDF, KDF, bcrypt, and most public key operations. Remove the old boost.python wrapper and all the build code for it.
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Guess I won't be needing theselloyd2014-01-181-1/+0
|
* unique_ptr all the thingslloyd2014-01-181-39/+15
|
* Move lib into srclloyd2014-01-101-0/+461