Open pmario opened 3 months ago
Changing the default TWCore encryption strength from AES-128 to AES-256 will immediately prevent decryption of any existing tiddler data that was previously encrypted using AES-128. This TWCore change MUST be configurable to allow decryption of existing tiddler data.
Upgrading to AES-256 would then be a sequence:
$:/config/EncryptionStrength
) to 256will immediately prevent decryption of any existing tiddler data that was previously encrypted using AES-128.
That's not true, since the decrypt function is not changed by the PR. I did download TW 5.1.0-empty and I did encrypt it.
Then I did import it into TW v5.3.3 at TW-com - Everything works just fine. The decrypt info is stored with the encrypted data and the library decrypt function use it from there.
As you can see in the screenshot the PW iteration parameter with TW v5.1.0 was 1000 -- With TW v5.3.3 it is 10000 -- So with Eric's theory an encrypted v5.1.0 file could not be imported into v5.3.3 -- But it is possible, because the library uses the parameters defined with the encrypted data
The encrypted v5.1.0 file can also be decrypted by v5.3.4-pre at: https://tiddlywiki5-git-fork-pmario-sjcl-new-74649a-jermolenes-projects.vercel.app/
Due to the improvement of device capabilities it is proposed to set the default encryption strength for the AES encryption we use from 128 bit to 256 bit.
There has been a discussion at Talk: https://talk.tiddlywiki.org/t/query-how-secure-is-the-inbuilt-encryption-option-in-tw/5185/16 where I did find out that user cannot change that default.
IMO it's OK to have a hardcoded default, with the current core implementation. It avoids miss-configurations. -- But I think we should have stronger defaults now.
IMO AES-128 was OK, when the library was created, but now with the rise of quantum computers we should change it to AES 256 bit.
@Jermolene -- What do you think? -- The change is simple.