Milan Broz
f390695767
Fix crypto backend to properly handle ECB mode.
...
Despite it should be never used, it should still work :)
Bug introduced in version 2.3.2.
2020-07-21 14:14:54 +02:00
Francesco Turco
a491b938ba
use HTTPS for URLs
2020-07-04 16:43:23 +02: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
61f4363ed7
Implement EBOIV in userspace storage wrapper.
...
The EBOIV initialization vector is intended to be used
internally with BitLocker devices (for CBC mode).
It can be used in some specific cases for other devices.
This patch adds userspace implementation duplicating
the same EBOIV as the dm-crypt kernel.
Fixes : #562
2020-05-15 17:33:06 +02:00
Milan Broz
5b68dec43a
Adjust IV size in cipher benchmark.
...
The IV size for benchmark can be autodetected (for known ciphers).
For other algorithms user still can specify own values.
2020-03-23 18:46:59 +01:00
Ondrej Kozina
1e94425279
Remove unused parameter from crypto_backend_init.
2020-03-20 11:32:57 +01:00
Milan Broz
a2c13fbc48
Used CLOCK_MONOTONIC in benchmark on ancient systems.
2020-02-21 10:42:47 +01:00
Milan Broz
080566a1fd
Update copyright year.
2020-01-03 13:04:55 +01:00
Milan Broz
565de3c536
Fix check for bitlk iv overflow in crypto backend.
2019-12-30 21:53:06 +01:00
Milan Broz
f0888c1fe0
Add AEAD define on older kernel headers.
2019-12-30 21:53:06 +01:00
Milan Broz
eda2e62589
Add other backends (Nettle, NSS) for Bitlk decryption (through kernel wrapper).
2019-12-30 21:53:06 +01:00
Milan Broz
494d8ec04c
Add kernel backend for Bitlk key decryption.
2019-12-30 21:53:06 +01:00
Milan Broz
51edfb4ec9
Bitlk: add gcrypt key backend.
2019-12-30 21:53:06 +01:00
Milan Broz
79019b1ced
Bitlk: Move crypt key handling to crypto backend.
2019-12-30 21:53:06 +01:00
Yuri Chornoivan
f26a9abddb
Fix minor typos
2019-09-02 09:20:47 +00:00
Milan Broz
4d6269a42d
Fix some gcc warnings on 32bit systems.
2019-08-30 09:41:04 +02:00
Milan Broz
23bada3c5a
Fix several issues found by Coverity scan.
2019-04-10 12:30:09 +02:00
Milan Broz
238b18b8ac
Upstream fixes to bundled Argon2 code.
...
Wait for already running threads if a thread creation failed.
Use explicit_bzero() on recent glibc versions.
(Without fixed logic, we have already macro definition through automake.)
Fixes #444 .
2019-03-13 08:26:40 +01:00
Ondrej Kozina
f9fa4cc099
Add kernel only detection in crypt storage API.
2019-03-05 17:07:57 +01:00
Ondrej Kozina
a0540cafb3
alter crypt_storage interface
...
rename sector_start -> iv_start (it's now a iv shift for subsequent
en/decrypt operations)
rename count -> length. We accept length in bytes now and perform sanity
checks at the crypt_storage_init and crypt_storage_decrypt (or encrypt)
respectively.
rename sector -> offset. It's in bytes as well. Sanity checks inside
crypt_storage functions.
2019-03-05 17:07:45 +01:00
Milan Broz
1192fd27c6
Add query for cipher implementation is used through kernel API.
2019-03-01 21:43:10 +01:00
Milan Broz
cd1cb40033
Use crypto library for ciphers if algorithms are available.
2019-03-01 21:34:22 +01:00
Milan Broz
14e085f70e
Move cipher performance check to crypto backend.
2019-03-01 21:16:05 +01:00
Milan Broz
fc37d81144
Move crypt_cipher to per-lib implementation.
...
For now, it calls kernel fallback only.
2019-03-01 21:14:13 +01:00
Milan Broz
a859455aad
Move block ciphers backend wrappers to per-library files.
...
For now it always fallbacks to kernel crypto API.
2019-03-01 21:10:50 +01:00
Milan Broz
93d596ace2
Introduce internal backend header.
...
And remove commented-out test vectors (moved to tests).
2019-03-01 20:39:33 +01:00
Milan Broz
91b74b6896
Fix some compiler warnings.
2019-02-07 17:14:47 +01:00
Milan Broz
a68f3939cf
Use min memory limit from PBKDF struct in Argon benchmark.
2019-01-31 10:53:51 +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
ee8970c11e
Fix strncpy gcc warning.
2019-01-15 15:34:00 +01:00
Milan Broz
9607b322d2
Add missing struct to Nettle backend.
2019-01-15 15:00:36 +01:00
Milan Broz
304c4e3d3b
Add more common hash algorithms to kernel crypto backend.
...
Fixes #430 .
2019-01-07 20:07:18 +01:00
Milan Broz
c5b55049b9
Fix AEAD modes check with kernel and Nettle backend.
...
These do not implement backend RNG yet, so use a fixed key for test.
2019-01-07 20:05:55 +01:00
Milan Broz
4e1c62d7f1
Ignore false positive Coverity warning for string length.
2018-12-04 12:57:08 +01:00
Milan Broz
9a2dbb26a5
Fix signed/unsigned comparison warning.
2018-11-25 15:11:44 +01:00
Milan Broz
2f6d0c006c
Check for algorithms string lengths in crypt_cipher_check().
...
The kernel check will fail anyway if string is truncated, but this
make some compilers more happy.
2018-11-25 10:55:28 +01:00
Milan Broz
1167e6b86f
Add support for Adiantum cipher mode.
2018-11-23 21:03:02 +01:00
Milan Broz
b4dce61918
Try to check if AEAD cipher is available through kernel crypto API.
2018-11-22 16:02:33 +01:00
Milan Broz
2300c692b8
Check hash value in pbkdf setting early.
2018-11-22 15:51:10 +01:00
Milan Broz
9df042c0b8
Use explicit_bzero if available.
2018-10-04 15:21:01 +02:00
Rafael Fontenelle
f35ec9771e
Fix typos
...
A bunch of typos reported by codespell, most of them comments in the code
2018-07-21 07:24:25 -03:00
Ondrej Kozina
b2a1728201
Fix bundled argon2 distcheck errors.
2018-07-18 11:57:43 +02:00
Milan Broz
d3460b6cf5
Fix internal bundled Argon2 build.
2018-07-07 11:06:54 +02:00
Milan Broz
ba384d15d2
Add optimized Argon2 SSE code.
...
Note: it is always better to use external libargon2 library.
Unfortunately, until Argon2 is in generic crypto libraries,
we must sometimes use bundled version just for bureaucratic reasons.
Let's include optimized variant of reference implementation as well.
Note, this code will not add any SSE compiler switches.
If --enable-internal-sse-argon2 option is used, it checks if current
compilation flags support simple SSE progam and if so, it use
the optimized variant.
(Not tested for AVX optimizations; it expects that SSE is enabled as well.)
2018-07-07 10:36:49 +02:00
Milan Broz
2f38ade0e0
Update Argon2 header to match upstream.
2018-07-07 10:35:23 +02:00
Milan Broz
5fcf430c81
Fix crypto backend for LibreSSL >= 2.7.0.
...
There are now OpenSSL 1.1.x API functions, no need for compatibility wrapper.
Fixes #393 .
2018-06-17 16:45:09 +02:00
Milan Broz
9a72ec366d
Move generic ciper backend utilities to separate file.
...
And add wrapped key check.
2018-04-15 15:31:10 +02:00
Milan Broz
6d2979459e
Key parameter is always const in cipher and storage backend.
2018-02-23 10:40:17 +01:00
Milan Broz
dee38e9c0b
Rename buffer to key in hmac_init in crypto backend.
...
It is key and naming was confusing.
2018-02-23 10:40:14 +01:00