Debian Codegraph @

CHANGES.md

raw
1 Changes 1.4.0:
2 * fix: ensure that LTO is supported (by Simo Sorce)
3 * fix: add LTO regression testing (by Ondrej Mosnacek)
4 * enhancement: add sm3sum, sm3hmac tools, add APIs kcapi_md_sm3, kcapi_md_hmac_sm3
5 * enhancement: add SM4 convenience functions
6 * fix: support AEAD encryption of arbitrary size with kcapi-enc
7
8 Changes 1.3.1:
9 * fix: fix -Wconversion warnings (by Ondrej Mosnacek)
10 * fix: fix bad data types in _kcapi_common_send_meta (by Ondrej Mosnacek)
11 * fix: Version symbols to maintain ABI compatibility (by Simo Sorce)
12
13 Changes 1.3.0:
14 * fix: disable io_getevents on systems that do not support it (by Khem Raj)
15 * fix: remove prctl PR_SET_DUMPABLE to allow library to be debugged - as the library does not store any sensitive data in data structures it owns, such security precautions may not be necessary considering the benefit of allowing regular debugging
16 * fix: ensure that sendmsg is always used as fallback when vmsplice cannot be used
17 * enhancement: add kcapi_set_maxsplicesize and kcapi_get_maxsplicesize
18 * enhancement: the variable types are changed from int32_t to ssize_t and from uint32_t to size_t to match common POSIX and Linux APIs
19
20 Changes 1.2.1:
21 * fix: MSG_MORE usage: With kernel 5.9, a precise use of MSG_MORE is mandatory
22 to support a stream cipher approach (init -> update -> update -> ... ->
23 final). All but the last update operations must use MSG_MORE, the last
24 update operation must not use MSG_MORE.
25 * add automated test for Linux kernel 5.8 and 5.9
26
27 Changes 1.2.0
28 * enhancement: kcapi-hasher: add madvise and 64 bit support by Brandur Simonsen
29 * fix: fix clang warnding in KDF implementation by Khem Raj
30 * fix: fix inverted logic in kcapi-main test logic reported by Ondrej Mosnáček
31 * fix: return error when iteration count is zero for PBKDF as reported by
32 Guido Vranken
33 * enhancement: add function kcapi_cipher_stream_update_last to indicate the
34 last block of a symmetric cipher stream operation
35 * disable XTS multithreaded tests as it triggers a race discussed in
36 https://github.com/smuellerDD/libkcapi/issues/92. The conclusion is
37 the following: xts(aes) doesn't support chaining requests like for other
38 ciphers such as CBC (at least as implemented in the kernel Crypto API).
39 That can be seen in `crypto/testmgr.h` - the ciphers that are expected to
40 return IVs usable for chaining have the `.iv_out` entries filled in in their
41 test vectors (and those that don't support it do not). One can see that only
42 CTR and CBC test vectors have them, not XTS.
43 Looking again at how XTS is defined, it seems one could implement
44 transparent chaining by simply decrypting the final tweak using the tweak
45 key and return it as the output IV... but I believe this has never been
46 mandated nor implemented in the Crypto API (likely because of the overhead
47 of the final tweak decryption, which would be pointless if you're not going
48 to use the output IV - and there is currently no way to signal to the driver
49 that you are going to need it).
50 * disable AIO parallel tests due to undefined behavior
51
52 Changes 1.1.5
53 * Fix invocation of ansi_cprng in FIPS mode during testing
54 * Fix testing on kernels >= 5.0
55 * Add virtualization test for kernel 5.1
56 * Fix the limit between vmsplice() and sendmsg() by Christophe Leroy
57 * Fix remove code duplication by Ondrej Mosnáček
58 * Fix potential memleak in speed-test
59
60 Changes 1.1.4
61 * Fix: use sendmsg when processing more than 1<<16 bytes input data which
62 improves performance on some architectures
63
64 Changes 1.1.3
65 * Fix: default location of FIPS 140-2 HMAC control file is .<orig file>.hmac
66 (was accidentally moved to <orig file>.hmac with 1.1.2)
67
68 Changes 1.1.2
69 * Fix: Bug fixes for GCC 8.1.0 regarding string length checks by
70 Krzysztof Kozlowski
71 * Enhancement: ensure that tests execute on architectures other than X86
72 by Ondrej Mosnáček
73 * Fix: Bug fix to initialize FDs at the correct time in kcapi-kernel-if.c
74 by Ondrej Mosnáček
75 * Test fix: Support test execution outside build environment by
76 Ondrej Mosnáček
77
78 Changes 1.1.1
79 * Fix: Bug fixes for kcapi_hasher by Ondrej Mosnáček
80
81 Changes 1.1.0
82 * API Enhancement: Addition of kcapi_handle_reinit
83 * Fix: simplify code by removing the internal *_fd functions from
84 kcapi-kernel-if.c
85 * Fix: add a loop around the read system call to always obtain all generated
86 data
87 * Fix: use host compiler for compiling docproc (reported by Christophe LEROY,
88 fixed by Björn Esser)
89 * Fix: make error handling of hashing applications consistent with coreutils
90 applications (reported by Christophe LEROY)
91 * Fix: support for zero length files (patched by Ondrej Mosnáček)
92 * Fix: support for zero message hashes on kernels <= 4.9 (patched by
93 Ondrej Mosnáček)
94 * Fix: Add Travis CI test system provided by Ondrej Mosnáček
95 * Fix: Add several fixes to kcapi-hasher by Ondrej Mosnáček
96 * Fix: Add additional tests for kcapi-hasher by Ondrej Mosnáček
97 * Fix: Apply unpadding only to last block of data by Ondrej Mosnáček
98 * Fix: Fix resource leaks in error code paths suggested by Ondrej Mosnáček
99 * Enhancement: achieve hmaccalc CLI equivalence by Ondrej Mosnáček
100
101 Changes 1.0.3
102 * Fix: support STDIN and --tag of sha*sum applications
103 * Enhancement: Add small enhancements to support integration with distros --
104 reported by Björn Esser
105
106 Changes 1.0.2
107 * Fix: hasher-test.sh on 32-bit systems
108 * Fix: AIO return code handling on large number of requests -- reported by
109 Jonathan Cameron
110 * Enhancement: disable coredumps of library
111 * Fix: remove unchecked -fstack-protector-strong from Makefile -- reported by
112 Mathieu Malaterre
113 * Fix: document that kcapi_cipher_stream_op must be called in a loop to collect
114 all data in a multhreaded environment.
115 * Test Fix: Update symmetric multithreaded stream test to invoke
116 kcapi_cipher_stream_op in a loop to collect all data.
117 * Fix: Initialize the cipher handle on stack with zeros as the library expects
118 a zero-initialized cipher handle. This fixes a possible segfault where
119 free() is called on a non-initialized memory location.
120 * Fix: port algif_kpp and algif_akcipher to 4.15-rc3
121
122 Changes 1.0.1
123 * Fix: constify AEAD cipher input data
124 * Fix: use GCC byte swapping acceleration if present
125 * Fix: KDF counter handling on little endian systems when generating more than
126 255 blocks
127 * Use LD_PRELOAD for execution of test cases to force using of the freshly
128 compiled binaries
129 * Fix: return code handling of _kcapi_common_vmsplice_chunk_fd as reported
130 by Christophe Leroy
131 * Fix: return code handling in _kcapi_md_update
132 * Fix: kcapi-hasher now supports files larger than 2GB
133 * Fix: kcapi-dgst now supports files larger than 2GB
134 * Fix: use stack protector
135 * Fix: rename header guards to remove leading underscore as pointed out
136 by Markus Elfring
137 * Test Fix: Allow compiing the test code without asymmetric and KPP support
138
139 Changes 1.0.0
140 * Fix: Small compile fixes for new checks of GCC 7
141 * API Change: Rename all LOG_* enums to KCAPI_LOG_* to prevent namespace
142 poisoning
143 * Fix: soname and file name of library now compiles with
144 conventions (thanks to Marcus Meissner)
145 * Fix: kcapi-rng.c: unify FD/syscall read code and fix
146 __NR_getrandom resolution
147 * Enhancement: add kcapi-enc application to access symmetric encryption on
148 command line
149 * Fix: consolidate duplicate code in kcapi-hasher
150 * Enhancement: add kcapi-dgst application to access hashes on command line
151 * Enhancement: add kcapi-rng man page
152 * Enhancement: add kcapi-rng --hex command line option
153 * Fix: enable full symmetric AIO support
154 * Fix: consolidate all test code into test/ and invoke all tests
155 with test-invocation.sh
156 * Fix: fix memleaks in error code paths as reported by clang
157 * Fix: reduce memory footprint by rearranging data structures
158 * Fix: kcapi-hasher is now fully FIPS 140-2 compliant as it now
159 includes the integrity test for libkcapi.so
160 * Enhancement: Add speed tests for MV-CESA accelerated ciphers and hash
161 algorithms (thanks to Bastian Stender)
162 * Test Enhancement: add kcapi-enc-test-large.c test testing edge conditions of
163 AF_ALG
164 * Test Enhancement: add virttest.sh - use of test system based on
165 eudyptula-boot to test on linux-4.3.6, linux-4.4.86, linux-4.5, linux-4.7,
166 linux-4.10, linux-4.12
167 * Test Enhancement: add kcapi-fuzz-test.sh to support fuzzing the AF_ALG
168 interfaces
169 * Enhancement: add RPM SPEC file (tested with Fedora 26)
170 * API Change: replace --disable-lib-asym with --enable-lib-asym as the
171 algif_akcipher.c kernel interface is not likely to be added to the kernel
172 anytime soon
173 * API Enhancement: add KPP API which is not compiled by default, use
174 --enable-lib-kpp (the algif_kpp.c kernel interface is not likely to be
175 added to the Linux kernel any time soon)
176 * Test Enhancement: Add KPP tests
177 * Enhancement: Re-enable AIO support for symmetric and AEAD ciphers down to
178 Linux kernels 4.1 and 4.7, respectively. This is due to integrating a
179 fix against a kernel crash when using AIO.
180 * Fix: simply KDF code base
181 * API Enhancement: add message digest convenience functions kcapi_md_*sha*
182 * API Enhancement: add cipher convenience functions kcapi_cipher_*_aes_*
183 * API Enhancement: add rng convenience function kcapi_rng_get_bytes
184 * API Change: remove kcapi_aead_getdata, use kcapi_aead_getdata_input and
185 kcapi_aead_getdata_output instead
186 * API Change: remove kcapi_aead_outbuflen, use kcapi_aead_outbuflen_enc and
187 kcapi_aead_outbuflen_dec instead
188
189 Changes 0.14.0
190 * AIO: fix tracking of completed IOCBs
191 * speed-test: fix AEAD handling
192 * speed-test: fix time calculation
193 * compiler now warns a user of deprecated API calls
194 * AIO: handle kernel errors for algif_skcipher gracefully
195 * AIO: using multiple IOCB if algif_aead interface supports it
196 * ASYM: add PKCS1 tests
197 * AIO: add ASYM AIO support
198 * AIO: fix AEAD AIO fallback
199 * AIO: add AIO fallback testing
200 * replace enforcement of symmetric cipher limits with a log message only
201 (the underlying kernel implementations should catch any errors)
202 * add fuzzing tests
203 * use autotools build system as provided by Georges Savoundararadj with
204 additional considerations from Marcin Nowakowski (thanks a lot)
205 * ALG_MAX_PAGES restriction is gone with current AF_ALG interface
206 * add HKDF (RFC5869)
207 * add apps/kcapi-rng
208 * add support for multiple accepts where the caller maintains the opfd
209 * fix memleak in error case in PBKDF
210 * add multithreaded symmetric cipher tests
211 * enable full AIO support for kernels 4.13 and higher (fallback AIO
212 implementation using synchronous support for earlier kernels) -- this
213 is due to the broken AIO support for earlier kernels
214 * Add tests for the AAD copy operation to be supported for kernel 4.13
215
216 Changes 0.13.0
217 * change kcapi_aead_encrypt_aio, kcapi_aead_decrypt_aio,
218 kcapi_cipher_encrypt_aio and kcapi_cipher_decrypt_aio to require the
219 user to provide IOVECs for input and output buffers separately
220 * addition of kcapi_aead_inbuflen_enc, kcapi_aead_inbuflen_dec,
221 kcapi_aead_outbuflen_enc, kcapi_aead_outbuflen_dec, kcapi_aead_getdata_input,
222 kcapi_aead_getdata_output to allow apps to be programmed without specific
223 code handling for old and new AEAD AF_ALG interface (AAD and tag handling).
224 See the documentation section "AEAD Memory Structure" for an explanation
225 on how to use the API in a way to make the calling application agnostic
226 of the kernel interface differences.
227 * significant addition to library to handle old / new AEAD AF_ALG interface
228 without the caller being aware of that
229 * change AEAD tests such to use the new API calls to make code independent
230 of AEAD interface changes
231 * split up of the library implementation into individual files to allow
232 a more clear code management and to allow even to selectively disable
233 code to make the library smaller
234 * various small fixes suggested by Zbigniew Jędrzejewski-Szmek
235 * fix memleak in kcapi_*_destroy suggested by Zbigniew Jędrzejewski-Szmek
236 * use hard-links for the kcapi-hasher apps
237 * add bi-arch tests
238 * add check that AIO interface is only initialized if the kernel supports
239 AIO (library requires kernel 4.1.0 or larger for skcipher AIO and
240 4.7.0 or larger for AEAD AIO support)
241 * add transparent fallback in case the caller requests AIO operation but
242 the AIO interface was not or could not be initialized -- the AIO API can be
243 used on systems without AIO support as the library transparently falls back
244 to the non-AIO operation (however, the library complains at the beginning
245 about the use of the AIO API on unsupported systems).
246
247 Changes 0.12.0
248 * add version.lds
249 * add KDF API
250 * add PBKDF API
251 * update Makefile to look for environment
252 * bug fix speed test
253 * add AIO support (this code is derived from the example code developed by
254 Tadeusz Struk -- thanks a lot) together with AIO test cases
255 * Move DSO_PUBLIC out of the public header file into the private header file
256 * use _kcapi_cipher_crypt for AEAD operations - eliminate code duplication
257 * update AEAD tests to verify that the kernel follows the memory and
258 processing structure defined for in-kernel users. Note, the testing
259 will assume the old AF_ALG interface handling up to and including 4.9.x.
260 The new AF_ALG AEAD interface is assumed to be present starting with 4.10.0.
261 Note, the interface differences are only visible in the return code of
262 recv which is checked by the test cases. Otherwise, user space sees no
263 difference.
264
265 Changes 0.11.1
266 * move version information to kcapi.h to allow compile time tests for wrapping
267 applications
268 * fix error code path mem leaks in _kcapi_handle_init reported by cppcheck
269
270 Changes 0.11.0:
271 * Convert all libkcapi data structures into opaque structures. This implies
272 that the *_init functions require a reference to a pointer as these init
273 functions now allocate the struct kcapi_handle data structure.
274 * Add clean and consistent logging logic
275 * fixed execution when CONFIG_CRYPTO_FIPS is disabled in kernel
276 * mark all symbols except API as hidden
277 * performance measurements for kcapi_md_updatn added
278 * update speed tests for newer AVX/AVX2 kernel handling
279 * update documentation to mark all parameters as [in] or [out]
280
281 Changes 0.10.2:
282 * Fix kernel netlink parsing error message
283 * doc: add hint for setting keys before sending data
284 * fix compiler warnings about unsigned / signed comparisons
285
286 Changes 0.10.1:
287 * Fix issues with the vmsplice usage in stream mode
288 * Fix issues with the vmsplice usage in chunk mode
289 * Any modification on the tfmfd must be performed before the accept() call as mandated
290 by the update to kernel 4.4.
291 * Add support for processing of arbitrary sized symmetric cipher input
292
293 Changes 0.10.0:
294 * simplify kcapi_aead_encrypt and kcapi_aead_decrypt
295 * comment out message truncation check
296 * test.sh: fix RFC4106 IV handling for kernels >= 4.2 due to overhaul of
297 AEAD support in the kernel
298 * use zero-copy in stream operation if possible
299 * Add set_pubkey API call
300 * convert entire API to use data types with known sizes (i.e. stdint.h)
301 * Add asymmetric tests to test.sh
302 * Add asymmetric stream cipher API
303 * update documentation to cover akcipher API
304
305 Changes 0.9.0:
306 * Add asymmetric cipher API.
307
308 Changes 0.8.0:
309 * Fix test.sh to invoke large AEAD test
310 * All kcapi_*_destroy functions are void now
311 * Update AEAD code to new kernel interface and update the AEAD API
312 * Simplify the code for AEAD
313 * Add and use kcapi_memset_secure
314 * Add AIO logic
315 * Add drop in replacements for sha1sum, sha224sum, sha256sum, sha384sum,
316 sha512sum and md5sum
317 * Remove the kernel-patch/ directory as its code is not consistent with
318 the library any more. Use the current cryptodev-2.6 tree from Herbert Xu.
319
320 Change 0.7.2:
321 * Move the library code into the directory lib/
322 * Fix issues reported by cppcheck
323 * AEAD: allow encrypt/decrypt invocations with NULL AAD and NULL PT/CT
324 * AEAD: add test for NULL AAD and NULL PT/CT
325 * RNG: always invoke seeding operation, even when seed is NULL
326
327 Change 0.7.1:
328 * AEAD kernel interface is now upstreamed, reference the patches
329 in the documentation appropriately and remove the patches from the
330 kernel patch tree.
331 * Test: add rfc4106(gcm(aes)) tests to general test and to speed test
332 * Speed test: invoke the ciphers 10 times before time measurement to prime
333 the caches.
334
335 Change 0.7.0:
336 * AEAD kernel part does not relay MSG_TRUNC any more, thus using the
337 read syscall is more efficient.
338 * remove kcapi_cipher_setiv and add an IV parameter to all necessary
339 API calls. This prevents the requirement for a function call
340 and requiring the caller to maintain the IV buffer
341 * add vmsplice tests to test framework to make sure vmsplice is really
342 executed
343 * fix documentation style
344 * allow caller to specify which kernel interface (sendmsg / vmsplice)
345 is used for one-shot API calls. This implies extension of one-shot
346 API calls
347 * Update stream API tests for AEAD to use 16 IOVECs to test the latest
348 installment of the recvmsg interface of algif_aead
349
350 Change 0.6.5:
351 * Measuring speed of vmsplice vs sendmsg interfaces and added heuristic
352 to select the fastest implementation
353 * Enhance documentation to explain usage of API better
354 * added speed measuring tests in speed-test/
355 * return errno for all syscalls through the API return codes
356 for better error handling
357 * process kernel flag of MSG_TRUNG for AEAD ciphers
358
359 Change 0.6.4:
360 * Update AEAD interface patch
361 * Add new test invoking cipher instance multiple times (-d flag of test
362 application)
363
364 Change 0.6.3:
365 * Remove several sanity checks in the API functions. This shall allow
366 the invocation of edge conditions (like no plaintext, but AAD and tag).
367 The kernel contains the appropriate sanity checks too. Therefore there
368 is no harm in removing them.
369 * Add testing of long AAD: fill 16 pages with 65504 bytes AAD and 32 bytes
370 plaintext (stream API) and 15 pages AAD plus 16th page holding plaintext
371 (one-shot API).
372 * Update AEAD interface to allow arbitrary AAD sizes.
373
374 Change 0.6.2:
375 * update all vmsplice invocations to consider the limitations of the pipe
376 buffer of 16 pages (the limitation in the kernel is enforced by
377 vmsplice_to_pipe setting nr_pages_max and splice_from_pipe_feed which
378 iterates over the available pipe->nrbufs) - this fixes message digests and
379 symmetric operations for input data larger than 16 pages; the AEAD
380 cipher contains a sanity check that the input data size is not too large --
381 thanks to Amit Uttamchandani <[email protected]> for the bug report
382 * update aead/rng kernel pages to match 3.19-rc1
383
384 Change 0.6.1:
385 * fix compile error
386
387 Change 0.6.0:
388 * add kcapi_md_blocksize
389 * add stress / negative testing
390 * add hint to NETLINK_CRYPTO patch requirement
391
392 Change 0.5.0:
393 * kernel interface for AEAD and RNG changed
394 * add kcapi_rng_seed API call
395
396 Change 0.4.0:
397 * update AEAD cipher interface for current implemetation
398 * remove nonalinged API
399 -* add one-shot and stream API
400 * use zero copy interface for one-shot APi
401 * add tests to cover one-shot and stream API
402 * full documentation update
403 * stress testing the library and the AEAD/RNG implementation
404
405 Change 0.3.0:
406 * new kernel patch for AEAD/RNG interface
407 * Support for updated AEAD kernel interface
408 * Use of NETLINK_CRYPTO instead of getsockopt (code currently disabled due to
409 a bug in crypto/crypto_user.c -- see TODO)
410
411 Changes 0.2.1:
412 * Add automation to generate nicely formatted guidance documents out of source
413 code comments. See README.md for make targets generating the respective
414 guidance documents.
415
416 Changes 0.2.0:
417 * Add kcapi_aead_[enc|dec]_* calls for non-aligned requests
418 * Updated kernel patch to match what has been sent to LKML
419 * Documentation of API calls and data structures completed
420 * Add kcapi_md_digestsize
421 * Add sanity checking to IV setting API
422 * Add kcapi_pad_iv
423 * Add sanity check around getsockopt wrapper API call
424 * API documentation marks input / output parameters
425 * API documentation explains AEAD decryption EBADMSG error code
426 * Update of teets to cover all changed / new API calls