aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/curve25519
Commit message (Collapse)AuthorAgeFilesLines
* Make Montgomery reduction constant time.Jack Lloyd2015-10-241-5/+5
| | | | | | | | | | | | | | It was already close, but the carry loop would break early and selecting which value to copy out was indexed on the borrow bit. Have the carry loop run through, and add a const-time conditional copy operation and use that to copy the output. Convert ct_utils to CT namespace. Templatize the utils, which I was hesitant to do initially but is pretty useful when dealing with arbitrary word sizes. Remove the poison macros, replace with inline funcs which reads cleaner at the call site.
* Make PKCS #1 and OAEP decoding constant time to avoid oracle attacksJack Lloyd2015-10-161-0/+9
| | | | | | | | via timing channels. Add annotations for checking constant-time code using ctgrind to PKCS #1 and OAEP, as well as IDEA and Curve25519 which were already written as constant time code.
* pubkey: Add missing overridesDaniel Seither2015-07-302-2/+2
|
* 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
* Add BOTAN_DLL back to LibraryInitializer and move some of the implementation tolloyd2015-03-111-1/+1
| | | | | | | a source file. Without BOTAN_DLL the LibraryInitializer was removed entirely from the list of symbols which is not desired. Add some casts to avoid scary sounding but (upon review) harmless warnings from MSVC
* Convert PK operations to using Algo_Registry instead of Engine.lloyd2015-02-032-18/+27
| | | | Remove global PRNG.
* Centralize where string.h/cstring is included to mem_ops.hlloyd2015-01-231-7/+6
| | | | See github 42 for background
* Amalgamation fixeslloyd2015-01-231-18/+1
|
* Ensure all files have copyright and license info.lloyd2015-01-102-2/+2
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Add Poly1305, based on poly1305-donna by Andrew Moon.lloyd2014-12-292-120/+0
|
* Add Curve25519 based on curve25519-donna by Adam Langley.lloyd2014-12-275-0/+790
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