Commit Graph

2183 Commits

Author SHA1 Message Date
Steffen Jaeckel
c113c03c13 run {A,UB}SAN again with GMP
Fixup of 798d7dc61f
2019-10-11 14:32:22 +02:00
Steffen Jaeckel
9c67f8ac3c Fix includes
Headers which are included with '< >' can only be found if the folder where
the files are located is given as include path.
To be able to install the files to a separate folder, include them instead
with '" "'.
2019-10-11 14:32:22 +02:00
Steffen Jaeckel
0ca8a31cd3 clean-up define 2019-10-11 14:32:22 +02:00
Steffen Jaeckel
f9ab401098 check ranges of more ciphers
Inspired by #493 of @jbech-linaro I reviewed all blockciphers
for similar patterns.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
2019-10-11 14:32:22 +02:00
Steffen Jaeckel
659540393e
Merge pull request #506 from libtom/add-tea
Add TEA blockcipher
2019-10-11 14:30:21 +02:00
Steffen Jaeckel
79f812c9f4 update TV's 2019-10-11 14:20:43 +02:00
Steffen Jaeckel
06a58ab519 update doc 2019-10-11 14:20:43 +02:00
Steffen Jaeckel
74197c81c5 Update makefiles 2019-10-11 14:20:43 +02:00
Steffen Jaeckel
0f2c415e7a add TEA 2019-10-11 14:20:43 +02:00
Steffen Jaeckel
8e044b8bf6
Merge pull request #509 from armcc/improve-des-tests
fix and cleanup des and 3des test cases
2019-10-11 09:39:13 +02:00
Andre McCurdy
d85045e18a fix and cleanup des and 3des test cases
- Drop unused 'num' field from struct des_test_case.
 - Fix the order of arguments passed to compare_testvector() (actual
   and expected buffers were swapped, leading to misleading error
   messages for failing tests).
 - Enable all DES test vectors by default and use them for both
   encrypt and decrypt. That allows the struct des_test_case 'mode'
   field (which was previously incorrect for the LTC_TEST_EXT tests)
   to be dropped.
 - Run the "encrypt / decrypt all zero's" tests once, instead of
   running repeatedly from within the test vectors loop.
 - Add minimal set of 128bit key 3DES test vectors.
 - Try to more closely align the des_test() and des3_test() functions
   (common flow, common variable names, etc).
 - Minor indent fixes.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
2019-10-10 00:58:55 -07:00
Steffen Jaeckel
64d1153e5a
Merge pull request #508 from werew/develop
Fixes #507
2019-10-08 09:07:43 +02:00
werew
25c26a3b7a Fixes #507 2019-10-03 19:57:10 +02:00
Steffen Jaeckel
734ba7ec50
Merge pull request #499 from libtom/minor-improvements
Minor improvements
2019-09-30 15:00:05 +02:00
Steffen Jaeckel
da9f55231f don't exclude other settings when giving make options
Now `make LTC_DEBUG=1` builds a full-speed library but with debug infos.

One has to do `make LTC_DEBUG=1 IGNORE_SPEED=1` now to have the same
results as before.

This was done since
1. it makes sense to enable optimization also when adding debug infos
2. clang+valgrind creates errors if there's no optimization enabled
   (c.f. #497)
2019-09-30 11:55:51 +02:00
Steffen Jaeckel
d4b8d9b507 fix scan-build error 2019-09-30 11:55:51 +02:00
Steffen Jaeckel
9416a88468 install libtool-bin 2019-09-30 11:55:49 +02:00
Steffen Jaeckel
e4dd30af54 run tests on bionic 2019-09-30 11:54:07 +02:00
Steffen Jaeckel
4458e91151 be more strict when searching scan-build-*
clang-9 brings `scan-build-py-9` which matched the old pattern
2019-09-30 11:54:03 +02:00
Steffen Jaeckel
62bbdecaff use rotate intrinsics if available 2019-09-30 11:35:49 +02:00
Steffen Jaeckel
33dabf9693 only run the standard build in travis PR's
all the other builds are only get built, the testrun is skipped
2019-09-30 11:35:49 +02:00
Steffen Jaeckel
e2f5d17dcc test default-build as first 2019-09-30 09:59:59 +02:00
Steffen Jaeckel
6f3a7c9e3e improve GNU Makefiles a bit
* unignore type-limits warning
* add the possibility to do `make V=0 >/dev/null` and still get the
  CFLAGS and LDFLAGS that are used while compilation
2019-09-30 09:59:59 +02:00
Steffen Jaeckel
1e67d81f7b
Merge pull request #498 from libtom/appveyor
Add AppVeyor MSVC builds
2019-09-29 17:33:24 +02:00
Steffen Jaeckel
eaf2c7b6b9 fix build for msvc 2019-09-24 14:09:35 +02:00
Steffen Jaeckel
d25c52b546 add AppVeyor to README 2019-09-24 14:09:35 +02:00
Steffen Jaeckel
b4c6c4c45f also build on appveyor 2019-09-24 13:24:09 +02:00
Steffen Jaeckel
a1f6312416
Merge pull request #493 from jbech-linaro/rijndael_range
check range in _rijndael_ecb_ functions
2019-09-04 13:44:47 +02:00
Joakim Bech
7b4a5c1dcf check range in _rijndael_ecb_ functions
There is no check that the 'skey' structure has been properly
initialized. For example, the skey->rijndael.Nr is assumed to contain a
positive number corresponding to the number of AES rounds to perform. In
_rijndael_ecb_encrypt the skey->rijndael.Nr is subtracted by two, which
can result in an integer underflow if the structure hasn't been
initialized correctly.

By clamping the value for skey->rijndael.Nr into the valid rounds for
AES we can return an error instead of ending up reading outside the
boundaries (of skey->rijndael.eK).

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
Reported-by: Martijn Bogaard <bogaard@riscure.com>
2019-08-02 10:39:08 +02:00
Steffen Jaeckel
e01e4c5c97
Merge pull request #491 from fperrad/20190610_lint
some linting
2019-06-11 07:55:21 +02:00
Francois Perrad
75d53696c2 remove useless initialization 2019-06-10 23:56:27 +02:00
Steffen Jaeckel
c23f4699fb
Merge pull request #490 from libtom/improve/curve25519
Improve curve25519
2019-06-10 21:53:51 +02:00
Steffen Jaeckel
c971205404 fix clang-tidy warnings: do not use else after return 2019-06-10 12:48:16 +02:00
Steffen Jaeckel
e673906026 fix differing parameter names 2019-06-10 12:48:16 +02:00
Steffen Jaeckel
0b06979b10 prefix tweetnacl crypto_ API 2019-06-10 12:48:16 +02:00
Karel Miko
10056ed540 make crypto_verify_32 static 2019-06-10 12:32:28 +02:00
Karel Miko
1301cc5d2f fix clang-tidy warnings: do not use else after return 2019-06-10 12:31:56 +02:00
Steffen Jaeckel
3da27d71a0 Improve comments&doc
[skip ci]
2019-06-10 03:28:42 +02:00
Steffen Jaeckel
55d6661d48 Update makefiles 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
fef07fd843 add documentation of Curve25519 API 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
e0a9114129 move setting of sig-verification result to crypto_sign_open() 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
0392867678 use shared {ed,x}25519_export() implementation 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
3957c22e28 remove unused code from tweetnacl 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
819656a12f add ed25519_make_key() testcase 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
41731855c9 fix comment 2019-06-09 23:20:45 +02:00
Steffen Jaeckel
e3766e16ca add real pkcs#8 import of Curve25519 private keys 2019-06-09 22:46:57 +02:00
Steffen Jaeckel
8ea0fb1195 rename x25519_set_ku() to x25519_set_key() 2019-06-09 22:46:57 +02:00
Steffen Jaeckel
5d87aa21a5
Merge pull request #364 from libtom/feature/curve25519
Add curve25519
2019-06-09 22:22:39 +02:00
Steffen Jaeckel
47c34b37ef Update makefiles 2019-06-09 20:41:04 +02:00
Steffen Jaeckel
94b894fda9 update tests 2019-06-09 20:41:04 +02:00