tfcrypt.git
2 years agoSIGTERM, SIGINT: exit immediately, don't try to postprocess even in verbose mode.
Andrey Rys [Sat, 27 Nov 2021 12:02:47 +0000 (13:02 +0100)]
SIGTERM, SIGINT: exit immediately, don't try to postprocess even in verbose mode.

- Just report stats and exit afterwards,
- MAC signing is disabled naturally due to exit path before it happening.

4 years ago-V: fix when used with -P
Andrey Rys [Sun, 2 Aug 2020 17:16:46 +0000 (19:16 +0200)]
-V: fix when used with -P

4 years agoiotool: separate alias to do only plain I/O.
Andrey Rys [Sat, 25 Jul 2020 15:32:51 +0000 (17:32 +0200)]
iotool: separate alias to do only plain I/O.

tfbase64: fix help message for wrong alias.

4 years ago-O ftrunc=tail: trim unused tail after processing actual data.
Andrey Rys [Fri, 13 Dec 2019 23:46:30 +0000 (00:46 +0100)]
-O ftrunc=tail: trim unused tail after processing actual data.

This is a hack actually, it's not much useful in everyday life.
It is for compressing files in place, exploiting stream compressors like this:

        xz -9c -T 4 < file.tar | tfcrypt -P -O ftrunc=tail - file.tar

, or more safer way (since tfcrypt does not buffer):

        tfcrypt -P file.tar | xz -9c -T 4 | tfcrypt -P -O ftrunc=tail - file.tar

5 years agotfc_signal: add elapsed time counter.
Andrey Rys [Sun, 6 Oct 2019 12:14:50 +0000 (14:14 +0200)]
tfc_signal: add elapsed time counter.

5 years agotfe: fix endianness with blocks smaller than TF_BLOCK_SIZE.
Andrey Rys [Sun, 18 Aug 2019 10:47:28 +0000 (12:47 +0200)]
tfe: fix endianness with blocks smaller than TF_BLOCK_SIZE.

5 years agoUpdate copyright year.
Andrey Rys [Mon, 29 Apr 2019 15:54:43 +0000 (22:54 +0700)]
Update copyright year.

5 years ago-c: pattern fill support.
Andrey Rys [Mon, 29 Apr 2019 15:48:37 +0000 (22:48 +0700)]
-c: pattern fill support.

The syntax is:

        -c hexc:nr[,hexc:nr,...]

As example, filling with 16 byte counter with following:

        ffffffff3333337a7a7a7a88882a0b0c

is possible with following pattern:

        -c ff:4,33:3,7a:4,88:2,2a:1,0b:1,0c:1

To fill with zeroes (or any other static byte) is simple:

        -c 0:16

Note that any bytes that tend to overflow counter space are dropped, and any
unused bytes not filled by pattern are set to zeroes.

5 years agoDisplay hash of current defaults.
Andrey Rys [Wed, 24 Apr 2019 20:22:02 +0000 (03:22 +0700)]
Display hash of current defaults.

5 years ago-q: remove ASCII reprint of hexdump.
Andrey Rys [Sun, 21 Apr 2019 12:02:09 +0000 (19:02 +0700)]
-q: remove ASCII reprint of hexdump.

5 years agoAdd password hints to every password asking function.
Andrey Rys [Sun, 21 Apr 2019 11:49:20 +0000 (18:49 +0700)]
Add password hints to every password asking function.

Activated with -v command line option.

5 years agotfprng: expose range formula in form of macros to build custom range generators.
Andrey Rys [Wed, 10 Apr 2019 05:27:30 +0000 (12:27 +0700)]
tfprng: expose range formula in form of macros to build custom range generators.

5 years ago"-O ftrunc=": implement file truncations (without sanity checks).
Andrey Rys [Sat, 6 Apr 2019 11:49:54 +0000 (18:49 +0700)]
"-O ftrunc=": implement file truncations (without sanity checks).

5 years agofix counter adjustment on "-c zero -O iseek=".
Andrey Rys [Sat, 6 Apr 2019 07:54:52 +0000 (14:54 +0700)]
fix counter adjustment on "-c zero -O iseek=".

5 years ago-O showsecrets: display passwords in plaintext.
Andrey Rys [Thu, 4 Apr 2019 13:32:29 +0000 (20:32 +0700)]
-O showsecrets: display passwords in plaintext.

5 years agofix usage, add -O fullkey to extend key size.
Andrey Rys [Sat, 23 Mar 2019 12:37:14 +0000 (19:37 +0700)]
fix usage, add -O fullkey to extend key size.

5 years agotfc_conf: nr_turns: do not apply to sksum turns.
Andrey Rys [Sat, 23 Mar 2019 11:49:05 +0000 (18:49 +0700)]
tfc_conf: nr_turns: do not apply to sksum turns.

5 years agoSwitch to old tfcrypt1 mode by default.
Andrey Rys [Sat, 23 Mar 2019 11:07:02 +0000 (18:07 +0700)]
Switch to old tfcrypt1 mode by default.

5 years agoReplace ugly tweak size computation with explicit tweak clean API.
Andrey Rys [Sat, 23 Mar 2019 10:54:53 +0000 (17:54 +0700)]
Replace ugly tweak size computation with explicit tweak clean API.

5 years ago-c zero: assume zero counter value.
Andrey Rys [Fri, 22 Mar 2019 09:44:19 +0000 (16:44 +0700)]
-c zero: assume zero counter value.

5 years agofix -C stream -c rand regression.
Andrey Rys [Fri, 22 Mar 2019 09:30:17 +0000 (16:30 +0700)]
fix -C stream -c rand regression.

Because "STREAM" mode has separate init function and separate encryption function,
I had a mistake to put it into a wrong place at the first time I'd ported code to
tfcipher codebase. If you did encryptions with -C stream -c rand options applied in
the past, then, to decrypt such streams you must use zero counter value together with
omitting first counter bytes from stream.

This is especially disasterous if multiple encryptions were performed with same key
since STREAM here is effectively an OFB mode of operation.
Given that this mode encourages such usage patterns, I feel sorry for such a mistake.

Still, CTR mode is better than STREAM mode because it is seekable.
From CTR, STREAM differs only in being a nonseekable mode of operation, nothing more.

5 years agofix mhexdump machine detection.
Andrey Rys [Thu, 21 Mar 2019 09:27:16 +0000 (16:27 +0700)]
fix mhexdump machine detection.

5 years agoAmend previous commit.
Andrey Rys [Wed, 20 Mar 2019 11:51:54 +0000 (18:51 +0700)]
Amend previous commit.

5 years agoSupport loading tfcrypt_defs.h variables from file.
Andrey Rys [Sat, 16 Mar 2019 10:02:42 +0000 (17:02 +0700)]
Support loading tfcrypt_defs.h variables from file.

5 years agotfprng: use tf_prng_datasize even if no one uses it.
Andrey Rys [Fri, 15 Mar 2019 10:27:56 +0000 (17:27 +0700)]
tfprng: use tf_prng_datasize even if no one uses it.

5 years agoFix endianness issues.
Andrey Rys [Fri, 15 Mar 2019 10:15:50 +0000 (17:15 +0700)]
Fix endianness issues.

tfctrapi: do not post convert, do preconversion of both arguments instead, then add.
tfe: remove endianness converters, caller must do conversion.

5 years agoctr_add: replace dead with working code.
Andrey Rys [Wed, 27 Feb 2019 08:54:12 +0000 (15:54 +0700)]
ctr_add: replace dead with working code.

ctr_add came directly from 2012, and it was always broken.
The original purpose is to add two very large integers.
Still, there is no much to worry about: Threefish 64 bit integers
make it very hard to trigger the old buggy code, and it was only
used to rewind the counter. But it is time to finally fix it.

5 years agotfprng: remove legacy functions.
Andrey Rys [Mon, 18 Feb 2019 07:24:14 +0000 (14:24 +0700)]
tfprng: remove legacy functions.

5 years agoChange default seek behavior: error out, allow to ignore errors with -E xseek.
Andrey Rys [Sat, 9 Feb 2019 07:15:16 +0000 (14:15 +0700)]
Change default seek behavior: error out, allow to ignore errors with -E xseek.

5 years ago-O okey=val: offset into key (useful for block device keys, such as USB sticks).
Andrey Rys [Mon, 4 Feb 2019 15:18:00 +0000 (22:18 +0700)]
-O okey=val: offset into key (useful for block device keys, such as USB sticks).

sksum: now honors -O iseek= too to seek into source.

5 years agoDefine _DEFAULT_SOURCE.
Andrey Rys [Sat, 2 Feb 2019 12:51:44 +0000 (19:51 +0700)]
Define _DEFAULT_SOURCE.

5 years agotfc_io: xread and xwrite, which transparently handle EINTR case.
Andrey Rys [Sat, 26 Jan 2019 12:32:41 +0000 (19:32 +0700)]
tfc_io: xread and xwrite, which transparently handle EINTR case.

5 years agotfc_random: proper write error handling plus handling -E option.
Andrey Rys [Sat, 26 Jan 2019 10:15:54 +0000 (17:15 +0700)]
tfc_random: proper write error handling plus handling -E option.

5 years agoDefine _FILE_OFFSET_BITS=64
Andrey Rys [Fri, 25 Jan 2019 09:57:44 +0000 (16:57 +0700)]
Define _FILE_OFFSET_BITS=64

5 years ago-E sync: reform logic. Prequery file position, jump over error hole.
Andrey Rys [Fri, 25 Jan 2019 08:45:51 +0000 (15:45 +0700)]
-E sync: reform logic. Prequery file position, jump over error hole.

Add -E lsync to turn on older version.
tfc_fdsize: properly return NOFSIZE on errors.

5 years agoSalt user keys or passwords.
Andrey Rys [Thu, 29 Nov 2018 07:46:28 +0000 (14:46 +0700)]
Salt user keys or passwords.

Secretizing turns value was not enough, so it was decided
to add salt value which maybe hardcoded or loaded before key generation.

6 years agotfcrypt: fixing hash output stream.
Andrey Rys [Sun, 25 Nov 2018 07:43:02 +0000 (14:43 +0700)]
tfcrypt: fixing hash output stream.

6 years agotfcrypt 1.
Andrey Rys [Mon, 12 Nov 2018 05:58:34 +0000 (12:58 +0700)]
tfcrypt 1.