Milan Broz
ede2a8a45f
Add some basic UTF conversion function test.
...
Used only in bitlk format.
2022-05-03 15:48:09 +00:00
Milan Broz
2bf0f537f6
Add constant time memcmp and use it for comparing keys.
...
There is perhaps no problem now, but it is a good practise to use
constant time for key comaprison to avoid possible side channel
issues.
2022-04-28 15:19:23 +00:00
Milan Broz
0085985419
Fix gcc warnings in tests.
2022-02-24 20:28:29 +01:00
Milan Broz
12c35da768
Check all snprintf calls for returning values for tests.
2022-02-24 20:28:25 +01:00
Milan Broz
ab975bc1c4
Update copyright year.
...
And unify format in several places.
2022-01-29 10:43:02 +01:00
Milan Broz
f1c7a9896d
Add base64 wrappers to crypto_backend.
...
We need LGPL 2.1+ implementation in crypto backend and also this code
is much easier to read and maintain.
2022-01-18 12:15:20 +01:00
Milan Broz
49177aac46
Add test vector for empty password for Argon2.
...
While it is insecure, we need crypto backend to support this :)
2021-10-06 21:54:49 +02:00
Milan Broz
5cfd5fc4cd
Crypt vectors test: add test for hash/hmac context reset.
...
The crypto API expects that after final() call the context is reset,
let's test if backend properly supports it.
2021-09-29 10:24:45 +00:00
Milan Broz
ba4d5680d6
Fix typo and EOL in vector test.
2021-09-14 10:33:38 +02:00
Milan Broz
f8eb7b225a
Do not load own OpenSSL backend context in FIPS mode.
...
In the FIPS mode keep configuration up to the system wide config.
2021-09-13 21:56:59 +02:00
Milan Broz
8c28774917
Fix vector test print message additional parameter.
2021-08-25 18:09:56 +02:00
Milan Broz
5efa782567
Ignore default algorithm test in FIPS mode.
...
This can cause unexpected failures (despite it is kind of misconfiguration).
2021-08-19 13:36:13 +02:00
Milan Broz
20774374a9
Fail if default compiled hash is not implemented.
...
If crypto backend does not provide configured hash,
fail crypto backend tests.
(User has to use configure option if backend does not provide seclected algorithm.)
Seen recently with RIPEMD160.
Note: NSS does not provide RIPEMD, use --with-plain-hash etc.
2021-08-17 19:16:35 +00:00
Milan Broz
25cd2b2fb7
Add Blake2b and Blake2s hash support for crypto backend.
...
We support most recent crypto algorithms, so this
is only addition of the Blake hash family.
Kernel and gcrypt crypto backend supports all variants,
OpenSSL only Blake2b-512 and Blake2s-256.
There is no useable support for NSS and Nettle yet.
Crypto backend supports kernel notation e.g. "blake2b-512"
that is translated to the library backend names.
2021-03-22 11:16:53 +01:00
Milan Broz
12cc7ea745
Simplify include directories.
...
To avoid confusion, use just one lib include and specify sub-directories
for format inclusions.
This should also help some analysis tools to find proper includes.
2021-02-11 13:14:58 +01:00
Milan Broz
d1d9dd8e20
Update Copyright year.
2021-01-25 22:00:25 +01:00
Milan Broz
f5910d83c4
Add option for large IV to storage wrapper.
...
Also implement some test vectors and use the same limits
as in dm-crypt (IV offset alignnment).
2020-05-29 10:59:24 +02:00
Milan Broz
157f71d78e
Add IV vector tests.
...
This test checks IV wrapper implemented in userspace.
2020-05-24 23:19:46 +02:00
Ondrej Kozina
1e94425279
Remove unused parameter from crypto_backend_init.
2020-03-20 11:32:57 +01:00
Milan Broz
080566a1fd
Update copyright year.
2020-01-03 13:04:55 +01:00
Milan Broz
5b5f76002e
Fix various tests to run again in FIPS OpenSSL mode.
2019-07-31 10:27:58 +02:00
Milan Broz
456ab38caa
Allow to set CRYPTSETUP_PATH in tests for system installed cryptsetup tools.
...
Run: make check CRYPTSETUP_PATH=/sbin
2019-03-08 08:16:45 +01:00
Milan Broz
a354b72546
Add some symmetric block ciphers vector tests for crypto backend.
2019-02-24 12:35:50 +01:00
Milan Broz
ac8f41404b
Simplify and reformat hash/HMAC test vectors test.
2019-02-24 12:35:45 +01:00
Milan Broz
a6f5ce8c7b
Update copyright year.
...
And unify name copyright format.
2019-01-25 09:45:57 +01:00
Milan Broz
fbfd0c7353
Update Nettle crypto backend.
...
WARNING: this is just experimental backend, use only for testing.
2019-01-16 21:13:00 +01:00
Milan Broz
9cbd36163c
Fix various gcc compiler warnings in tests.
2018-12-03 13:47:43 +01:00
Milan Broz
a1b606803f
Fix HMAC vector test exit value.
2018-09-05 14:38:16 +02:00
Michal Virgovič
b2c7b40568
Add test vectors for HMAC - sha1, sha256, sha512.
2018-09-05 14:17:25 +02:00
Michal Virgovič
3c1c5ef281
Add vector tests for hash algorithms.
2018-08-01 09:16:44 +02:00
Milan Broz
2d2acda404
Add crypto backend vectors test.
...
Still need to add
- hash, HMAC,
- symmetric ciphers,
- storage encryption wrapper.
2018-03-19 13:02:12 +01:00