Jermolene / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.78k stars 1.16k forks source link

Set AES strength to 256 bit #8249

Open pmario opened 2 weeks ago

pmario commented 2 weeks ago

This PR fixes issue #8248

This PR changes the default AES encryption setting from 128 bit to 256 bit.

I did the following tests Windows 11 - FF latest

Import decryption test

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Jun 10, 2024 11:03am
Jermolene commented 2 weeks ago

Hi @pmario I'm happy with the idea but think it is important that we lay out the backwards compatibility implications. For example, can older versions of TiddlyWiki still open a 256-bit encrypted wiki?

pmario commented 2 weeks ago

I just did some drag & drop import test to archived empty.html wikis

AES-128 (created with TW v5.3.3) and AES-256 (created with this PR) both work

Neither AES-128 created with TW v5.3.3 nor AES-256 with PR works. -> So backwards compatibility was already broken.

It does not even matter if there is a password. So JSON decode may be broken.

image

pmario commented 2 weeks ago
Jermolene commented 2 weeks ago

TW v5.3.3 -> both work

Thanks @pmario I am afraid I don't understand this part. Could you explain the test you performed in more detail?

pmario commented 2 weeks ago

The I did take both wikis and import them into the empty wikis listed in the TW archive as shown above. Importing the encrypted wikis works as described above.

AES-128 v5.3.3 and AES-256 v5.3.4-pre can not be imported to older wikis starting with TW v5.2.1

This PR does not cause this problem. The problem has been there with v5.3.3 already.

pmario commented 2 weeks ago

@Jermolene -- I found the changes that caused the problem