aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/curve25519/curve25519.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add missing override annotations [ci skip]Jack Lloyd2018-08-131-1/+1
|
* Add function to return the size of a key agreement outputJack Lloyd2018-08-121-0/+2
| | | | Very useful when using "Raw" DH/ECDH via the FFI API.
* Make use of AlgorithmIdentifier::USE_EMPTY_PARAMJack Lloyd2018-07-101-4/+1
|
* More header cleanupsJack Lloyd2017-09-231-0/+1
|
* 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.
* Slight cleanup in Curve25519_PrivateKey constructorJack Lloyd2017-08-291-8/+6
|
* Replaced USE_NULL_PARAM (0x05 0x00) by an empty vector (nothing)Francis Dupont2017-06-121-1/+4
|
* Fixed private key codeFrancis Dupont2017-06-121-12/+4
|
* Fixed public key code for *25519Francis Dupont2017-06-121-9/+2
|
* Added Curve25519_PrivateKey constructor from secret_keyFrancis Dupont2017-06-121-0/+12
|
* Remove verify_end() chained immediatly before end_cons() (close #890)Nuno Goncalves2017-02-251-2/+0
| | | | | | | BER_Decoder::end_cons() allready assures the verify_end() function, so it is redundant. Signed-off-by: Nuno Goncalves <[email protected]>
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-10/+10
| | | | | | 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.
* Public_Key derived class ctors take an std::vector<byte>René Korthaus2016-12-111-1/+1
| | | | | | | Changes all the Public_Key derived classes ctors to take a std::vector instead of a secure_vector for the DER encoded public key bits. There is no point in transporting a public key in secure storage. (GH #768)
* Add Private_Key::private_key_info()René Korthaus2016-12-051-1/+1
| | | | | | | Adds new Private_Key::private_key_info() that returns a PKCS#8 PrivateKeyInfo structure. Renames the current Private_Key::pkcs8_private_key() to private_key_bits(). BER_encode() just invokes private_key_info().
* Add Public_Key::subject_public_key()René Korthaus2016-12-051-1/+1
| | | | | | | Adds new Public_Key::subject_public_key() that returns a X.509 SubjectPublicKey structure. Renames the current Public_Key::x509_subject_public_key() to public_key_bits(). BER_encode() just invokes subject_public_key().
* Add CECPQ1 TLS ciphersuitesJack Lloyd2016-11-171-13/+12
| | | | | | | | | | | | | Tested against BoringSSL (as client + server) and google.com (as client). Fix a stupid crashing bug in NewHope's BoringSSL mode. Remove unneeded error return from curve25519_donna - always returned 0. Default policy prefers ChaChaPoly1305 over GCM and CECPQ1 over ECDH/DH, which means the default no-extra-configuration ciphersuite (for Botan client speaking to Botan server) is a ciphersuite which is both implemented in constant time on all platforms and (hopefully) provides post quantum security. Good Things.
* Remove Key_Type typedefsJack Lloyd2016-11-081-1/+0
| | | | Also part of Algo_Registry and not needed after #668
* Remove automatic self-testing of public and private keysJack Lloyd2016-11-031-4/+1
| | | | | | | | | | | | | Rarely expected and often causes performance problems, especially for private keys. Instead applications should call check_key explicitly to validate keys when necessary. Note this removal doesn't apply to tests like ECDH on-the-curve tests, where a check on the public key is required for security of our own key. Updates most APIs to remove RNG calls, where they are no longer required. Exception is PKCS8 interface, pending further work there (see GH #685) it just ignores the RNG argument now.
* X25519 key exchange for TLSJack Lloyd2016-10-211-2/+5
| | | | | Client interops with google.com, server not tested against an independent client yet.
* Revert PK_Verifier change (don't require RNG there).Jack Lloyd2016-10-071-2/+4
| | | | | | | 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-3/+8
| | | | | | | | 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.
* pubkey: Add missing overridesDaniel Seither2015-07-301-1/+1
|
* lib/pubkey: Convert &vec[0] to vec.data()Simon Warta2015-06-231-1/+1
|
* In PK encrypt/decrypt move pad calls to the operation. This allows anlloyd2015-03-141-3/+4
| | | | | | | | | 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
* Convert PK operations to using Algo_Registry instead of Engine.lloyd2015-02-031-1/+27
| | | | Remove global PRNG.
* 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.
* Add Curve25519 based on curve25519-donna by Adam Langley.lloyd2014-12-271-0/+115
This uses only the c64 version from curve25519-donna; on systems that don't have a native uint128_t type, a donna128 type stands in for just enough 128-bit operations to satisfy donna.cpp