aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix further compiler macro bug exposed by #921Jack Lloyd2017-03-191-1/+1
|
* BOTAN_TARGET_COMPILER_IS -> BOTAN_BUILD_COMPILER_ISDaniel Neus2017-03-152-2/+2
|
* Merge GH #913 Follow PKIX rules for X.509 time formattingJack Lloyd2017-03-131-2/+2
|\
| * Fix: UTCTime interpreted as GeneralizedTimeDaniel Neus2017-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Example: "200305100350Z" interpreted as "2003/05/10 03:50:00 UTC" correct is "2020/03/05 10:03:50 UTC" According to RFC 5280: UTCTime values ... MUST include seconds (i.e., times are YYMMDDHHMMSSZ) -> length 13 GeneralizedTime values ... MUST include seconds (i.e., times are YYYYMMDDHHMMSSZ) -> length 15 I think we should enforce the RFC5280 rules even if the ASN.1 rules are not that strict.
* | Small fixes in API docs [ci skip]René Korthaus2017-03-092-4/+4
|/
* Allow OCSP requests without the full subject certificateNuno Goncalves2017-03-045-16/+43
| | | | | | | | | | | | | | | | A OCSP request doesn't need the full subject certificate. This extends the API to require instead of the subject certificate: * OCSP::Request: subject serial. * OCSP::online_check: subject serial AND ocsp responder url. API breaking change: * removal of OCSP::Request::subject() as OCSP::Request doesn't need to hold the certificate, but only the serial. Signed-off-by: Nuno Goncalves <[email protected]>
* Avoid calling memmove with a null source in PKCSv1 signature encodingJack Lloyd2017-03-031-1/+7
| | | | Only occured with EMSA_Raw. Caught by GCC 7 warning
* Add missing include, caught by GCC 7Jack Lloyd2017-03-031-0/+1
| | | | Closes GH #903
* Merge GH #902 Extend EC_PublicKey check, add EC_Group check, ECC invalid key ↵Jack Lloyd2017-03-023-3/+79
|\ | | | | | | tests
| * verify ec domain in EC_PublicKey::check_keyNever2017-02-281-1/+6
| |
| * EC_PublicKey::check_key for curves with cofactor > 1Never2017-02-271-1/+24
| |
| * Add ec_group verify functionNever2017-02-242-1/+49
| |
* | Merge GH #893 Remove ECC fixed window codeJack Lloyd2017-03-021-48/+2
|\ \
| * | Converge on a single side channel silent ec mp alg: randomizedNever2017-02-221-48/+2
| |/ | | | | | | | | Montgomery ladder with order.bits()/2 bit scalar blinding and point randomization
* | Merge GH #891 Constant time decoding for ISO 9796 unpaddingJack Lloyd2017-02-261-14/+26
|\ \ | | | | | | | | | | | | | | | Including missing length check #888 Replaces #889
| * | fix possible iso9796 side channel and add length checkNever2017-02-211-14/+26
| |/
* / Remove verify_end() chained immediatly before end_cons() (close #890)Nuno Goncalves2017-02-258-12/+0
|/ | | | | | | BER_Decoder::end_cons() allready assures the verify_end() function, so it is redundant. Signed-off-by: Nuno Goncalves <[email protected]>
* Avoid use of deprecated function in (deprecated) Serialized_RNG constructorJack Lloyd2017-02-192-2/+12
|
* Merge GH #881 Adjust number of Miller-Rabin iterations in DSA param gen and ↵Jack Lloyd2017-02-192-3/+3
|\ | | | | | | RSA checks
| * increase miller-rabin iterations for RSA strong check_key. We call is_prime ↵Never2017-02-131-1/+1
| | | | | | | | with prob=128 during sampling and we should check with the same prob
| * increase miller-rabin iterations for dsa primes (FIPS-186-4)Never2017-02-131-2/+2
| |
* | Document hash, rng, mac, pbkdf and kdf in ffi handbookRené Korthaus2017-02-191-34/+171
| |
* | Add more docs for ffiRené Korthaus2017-02-191-1/+31
| |
* | Resolve Doxygen error in cpuid.hJack Lloyd2017-02-111-1/+2
|/ | | | The macro has to be on its own line or Doxygen gets confused.
* Remove function comments n*4/3 and n*3/4 in base64Evgeny Pokhilko2017-02-062-6/+29
| | | | | | | The parameter comments were misleading because they did not take into account that input_length must be rounded up to a multiple of 3 and 4 for encode and decode respectively. Two new functions were added to calculate the correct maximum output length.
* Support zero-length IV in ChaChaJack Lloyd2017-02-022-3/+17
| | | | Equivalent to an 8 byte all-zero IV, same handling as Salsa.
* Merge GH #860 Support CPU instruction probe on Windows, add ↵Jack Lloyd2017-01-314-39/+76
|\ | | | | | | OS::get_high_resolution_clock
| * Fix missing return in Windows pathJack Lloyd2017-01-301-7/+3
| |
| * Change meaning of get_processor_timestampJack Lloyd2017-01-274-38/+79
| | | | | | | | | | | | | | | | | | | | | | Now let it return 0 if we have no hardware timestamp, and add OS::get_high_resolution_clock for best available clock. This is mainly because it's confusing for get_processor_timestamp to return something that is not a processor timestamp and because it simplifies adding cycles/byte output if we know that something is or is not a cycle counter. Also adds Windows SEH version of run_cpu_instruction_probe. Untested, uncompiled.
* | Blind fixJack Lloyd2017-01-301-1/+1
| |
* | Transpose for 32-bit NEONJack Lloyd2017-01-291-1/+19
| | | | | | | | Different intrinsics API
* | Workaround for MSVC 2013Jack Lloyd2017-01-292-3/+14
| |
* | Set SIMD ISA flags when building test_simd.cppJack Lloyd2017-01-291-1/+6
| | | | | | | | Return NEON from CPUID::has_simd_32
* | Add support for NEON in SIMD_4x32Jack Lloyd2017-01-292-191/+352
| | | | | | | | Tested on qemu-aarch64
* | Remove some commented out code from NoekeonJack Lloyd2017-01-281-13/+0
| | | | | | | | | | | | It was bogus and so potentially confusing [ci skip]
* | Add static_cast in uint8_t vs enum comparison.Jack Lloyd2017-01-281-2/+2
|/ | | | Sun CC for whatever reason becomes very confused by this.
* Add =default copy constructor decls for some pubkey types.Jack Lloyd2017-01-273-1/+15
| | | | | | | This inhibits default creation of C++11 move operators which we do not want. GH #849
* Add BOTAN_UNUSED in creator functionsJack Lloyd2017-01-275-0/+15
| | | | | | If all (say) stream ciphers are disabled, avoid unused arg warning. [ci skip]
* Merge GH #857 Add --with-external-libdir to configure.pyJack Lloyd2017-01-271-1/+2
|\
| * add "--with-external-libdir" to configure.pyDaniel Neus2017-01-261-1/+2
| | | | | | | | | | | | Fixes #767 and #19 Main purpose is to support external libs like OpenSSL on Windows.
* | Fix private key ctors API docs [ci skip]René Korthaus2017-01-279-11/+12
|/
* Fix various SunCC and Solaris warnings and build problems.Jack Lloyd2017-01-248-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | Based on build output sent by @noloader. If RLIMIT_MEMLOCK is not defined, assume regular user is not able to call mlock. This probably also affected Clang/GCC on Solaris. Work around resolution issue in SIMD_4x32 where it finds ambiguity between arg taking uint32_t and __m128i. This is probably some artifact of how SunCC represents vector types, and seems highly bogus in general but is easy to work around here. Change constructor taking a single value to instead be `SIMD_4x32::splat` function. The SIMD class is internal, so no API implications. Fix various warnings about lambda functions that were missing return types and which were not a single return statement. AIUI C++11 doesn't guarantee that lambda return type will be deduced in that situation, though in practice every compiler including SunCC seems to handle it. Disable AVX2 usage, since SunCC's intrinsics seem to be broken - its _mm_loadu_si256 takes non-const pointer. Rename a few variables in the tests to avoid shadowed var warnings.
* Remove obsolete workaround for bug in some old Sun Studio versionJack Lloyd2017-01-241-5/+0
| | | | [ci skip]
* If PowerPC clock returns 0, skip it.Jack Lloyd2017-01-231-2/+10
| | | | | | Doesn't seem to be a problem with the asm, code works fine on physical hardware (POWER8) but on qemu (on CI) both instructions return zero and the test fails.
* Add CPUID::to_stringJack Lloyd2017-01-222-38/+67
| | | | | | | | | Deprecates CPUID::print, mainly to avoid use of ostream in utils. Main reasoning is some platforms do not have streams at all. If all uses of streams are for operator<< and operator>> overloads, these can be guarded by a future BOTAN_HAS_CPP_STREAMS system-feature flag. But when ostreams are required to use the API (as here), that is not possible.
* Add basic test for OS utilsJack Lloyd2017-01-221-4/+12
| | | | | Mainly driven by missing test for OS::run_cpu_instruction_probe. Currently only works on x86 and ARM. Tested on x86-64 native and aarch64 qemu.
* Remove unused iostream includeJack Lloyd2017-01-201-1/+0
| | | | [ci skip]
* Avoid requiring AT_DCACHEBSIZE (data cache size) getauxvalJack Lloyd2017-01-191-0/+3
| | | | | Missing on Android it appears, or at least on Kullo CI NDK. Not essential by any means.
* Fix for PowerPCJack Lloyd2017-01-171-2/+2
|
* Fixes for 32-bit ARMJack Lloyd2017-01-171-7/+38
|