From: Andrey Rys Date: Fri, 22 Mar 2019 09:30:17 +0000 (+0700) Subject: fix -C stream -c rand regression. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;ds=sidebyside;h=250025065332c3c318756b0912da75bdddcdbb98;hp=250025065332c3c318756b0912da75bdddcdbb98;p=tfcrypt.git 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. ---