aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* IncludeOS has random device files nowJack Lloyd2016-12-181-0/+1
| | | | | | GH #726 [ci skip]
* Disable TLS signature and finished message checks in fuzzer modeJack Lloyd2016-12-173-3/+23
| | | | | Also use a const time comparison for the finished message, though I don't see any real way of exploiting that timing channel.
* Add support for brainpool curves in openssl providerRené Korthaus2016-12-171-1/+17
| | | | | OpenSSL 1.0.2 added support for brainpool curves, so we can use it provided the version check succeeds.
* Fix clang-analyzer warning in AES codeJack Lloyd2016-12-161-6/+4
| | | | | | The previous assert had been already put there for the benefit of clang-analyzer, but in Clang 3.9 it does not help. Instead test X value directly, which works.
* Remove debug codeJack Lloyd2016-12-141-1/+1
|
* Fix exponentiation bug, related fixesJack Lloyd2016-12-147-34/+79
| | | | | | | | | | | | | | | GH #754 exposed a bug in the non-Montgomery exponentiation case. It turned out then when the fixed window was picked to any value > 1, the result would be incorrect due to an off by one. This is the one line fix in powm_fw.cpp Also fix a bug in bigint_mul which caused incorrect results, because the output BigInt was not being zeroed out before use. This is only exposed in rare cases, found (somewhat indirectly) in OSS-Fuzz #287. Add more modular exponentiation tests, which would have caught these issues earlier.
* In ressol, prohibit a >= pJack Lloyd2016-12-111-3/+5
| | | | Technically defined, but should never be seen in practical crypto context.
* Public_Key derived class ctors take an std::vector<byte>René Korthaus2016-12-1123-37/+37
| | | | | | | 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)
* Merge GH #765 Rewrite CBC unpadding operations as const timeJack Lloyd2016-12-102-41/+69
|\
| * forgot to unpoison return valsNever2016-12-091-0/+4
| |
| * Rewrote bc unpad functions as const time operations.Never2016-12-092-41/+65
| | | | | | | | | | | | The unpad functions return the blocksize as padding position, if the padding is invalid. .
* | Merge GH #759 Add ISO 9796-2 signature schemesJack Lloyd2016-12-084-12/+414
|\ \
| * | ISO 9796: Change header guard formatNever2016-12-061-2/+2
| | |
| * | Add ISO9796-2 Signature Schemes giving message recovery 2 and 3.Never2016-12-054-12/+414
| | |
* | | Another rename in the service of filename uniquenessJack Lloyd2016-12-081-0/+0
| | |
* | | Remove <source> block from info.txt filesJack Lloyd2016-12-0816-119/+1
| | | | | | | | | | | | | | | | | | Kind of a vestigial thing from an earlier iteration of the module design, and never useful to specify anymore since taking all the cpp files is what you want exactly 100% of the time.
* | | Inline Twofish::rs_mul into its only callerJack Lloyd2016-12-082-24/+19
| | |
* | | Rename both DL and EC named group files.Jack Lloyd2016-12-082-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.
* | | Rename Serpent SIMD and Twofish SBOX source filesJack Lloyd2016-12-082-0/+0
| | | | | | | | | | | | Some attempt at consistency
* | | Merge GH #744 Allow custom extensions when creating certsJack Lloyd2016-12-087-29/+195
|\ \ \
| * | | Rename some methods, add more tests and docsRené Korthaus2016-12-043-12/+50
| | | |
| * | | Allow custom extensions in X509_Cert_OptionsRené Korthaus2016-12-027-25/+153
| | | | | | | | | | | | | | | | | | | | Allow custom extensions in CA-signed cert requests Add templated getter for extensions
* | | | Fix off by one in PKCS #1 v1.5 decryption decodingJack Lloyd2016-12-081-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the code was changed in b8966d0f89e, the offset was not changed, so it would reject ciphertexts with exactly 8 bytes of random padding (the required minimum). Found by pkcs1 fuzzer which also had problems due to not having been updated at the same time. Add a test suite for decoding of PK decryption padding to cover the problem cases.
* | | Avoid crash in PKCS1v1.5 unpadding if input len <= 2Jack Lloyd2016-12-081-0/+6
| | | | | | | | | | | | Don't think this can't happen outside of a fuzzer test
* | | Add missing netinet includes for sockaddr_inlouiz’2016-12-081-0/+1
| | |
* | | Merge GH #757 Fix X509 and PKCS8 formatting functions for PK keysJack Lloyd2016-12-0534-75/+96
|\ \ \
| * | | Fix TPM private_key_bits() exception messageRené Korthaus2016-12-051-1/+1
| | | |
| * | | Add Private_Key::private_key_info()René Korthaus2016-12-0525-38/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0524-36/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* | | | Merge GH #756 Remove ECB Cipher_Mode classJack Lloyd2016-12-055-268/+1
|\ \ \ \
| * | | | Remove ECB modeJack Lloyd2016-12-045-268/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Not a good thing to offer at this level. If you know what you are doing for the strange special case where it is necessary, the raw BlockCipher interface is available and probably more convenient.
* / / / Fix bad deref when ciphersuite value is larger than largest known idJack Lloyd2016-12-051-1/+1
|/ / / | | | | | | | | | Reported by @neverhub in GH #758 found by libFuzzer
* / / Expose pk_ops.h as public interface againJack Lloyd2016-12-0416-16/+26
|/ / | | | | | | | | | | | | | | | | | | | | | | 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
* | system_rng: workaround read only urandomAlon Bar-Lev2016-12-011-1/+4
| | | | | | | | | | | | | | | | botan_rng_reseed: System_RNG write failed error 9 FFI ran 252 tests 1 FAILED Failure 1: FFI botan_rng_reseed unexpectedly failed with error code -1 Signed-off-by: Alon Bar-Lev <[email protected]>
* | Fix missing include in kdf.cppJack Lloyd2016-11-291-0/+1
| | | | | | | | | | | | Showed up when compiling kdf.cpp with no KDFs enabled in build. [ci skip]
* | Fix BER decoder integer overflowJack Lloyd2016-11-283-2/+45
|\ \
| * | Check for overflow in BER decoder EOC scanningJack Lloyd2016-11-273-2/+45
| | |
* | | Add TLS::Policy::require_cert_revocation_infoJack Lloyd2016-11-283-1/+14
| | |
* | | Merge GH #738 Add OCSP stapling to TLS clientJack Lloyd2016-11-2816-61/+342
|\ \ \
| * | | Add OCSP stapling support to TLS clientJack Lloyd2016-11-2616-61/+342
| | | |
* | | | define NOMINMAX 1 before every include of windows.hBaruch Burstein2016-11-286-4/+6
| |/ / |/| |
* | | Add BOTAN_UNUSED when relevant OS support is missingJack Lloyd2016-11-272-0/+2
| | |
* | | Fix amalgamation for IncludeOS - avoid having <thread> pulled inJack Lloyd2016-11-271-1/+1
| | |
* | | Merge GH #590 Initial Cilk/OpenMP supportJack Lloyd2016-11-2714-261/+380
|\ \ \
| * | | Add compiler.h macro header extracted from build.hJack Lloyd2016-11-263-10/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All this is just standard C that the user should not touch, so it doesn't really make sense to have it in the build.h template file. Remove BOTAN_TARGET_CPU_HAS_KNOWN_ENDIANESS - only used twice (in loadstor.h) and that code is clearer without it.
| * | | Add Cilk/OpenMP supportJack Lloyd2016-11-2611-251/+204
| |/ /
* | | No reason to deprecate this (only internally called) constructorJack Lloyd2016-11-261-1/+2
| | |
* | | Correct output_length bug in SIV and ChaCha20Poly1305 alsoJack Lloyd2016-11-262-2/+2
| | |
* | | Add TLS::Policy::to_stringJack Lloyd2016-11-262-0/+13
| | |
* | | Simple tests for AutoSeeded_RNGJack Lloyd2016-11-262-1/+2
|/ /