3870 Commits

Author SHA1 Message Date
Martijn Laan
d5571edb5a
Update to latest LZMA SDK (24.08). Doesnt contain any real changes for us so no new builds needed. It's correct that even lzma.txt and lzma-history.txt didn't change and therefore still say 24.07. 2024-09-29 13:27:31 +02:00
Martijn Laan
f727458281
Tweak WizardForm's CheckPassword + some cleanup. 2024-09-29 13:11:57 +02:00
Martijn Laan
731e73bc01
Fixes. 2024-09-29 13:00:17 +02:00
Martijn Laan
51ddc0f417
Update password topic. 2024-09-27 17:11:19 +02:00
Martijn Laan
55eedca0ea
Update encryption topic once more. 2024-09-27 16:33:00 +02:00
Martijn Laan
6876665c8a
Use PBKDF2 to get the encryption key. Chose to use 100,000 iterations and a 128-bit salt. 2024-09-27 16:24:48 +02:00
Martijn Laan
e955344670
Cleanup Compil32 using Shared.SetupTypes since last july: move the required types (TSetupStep and TUninstallStep) into a new unit instead. 2024-09-27 16:07:30 +02:00
Martijn Laan
04d605c434
Cleanup: InstFunc and SetupLdr dont actually need SetupTypes. 2024-09-27 15:52:29 +02:00
Martijn Laan
3016cc5912
Add password pre-hash as described on https://en.wikipedia.org/wiki/PBKDF2 and in other places. Also some cleanup. 2024-09-27 08:29:50 +02:00
Martijn Laan
d5927102fa
Minor cleanup. 2024-09-26 20:47:10 +02:00
Martijn Laan
c1d985b462
Minor cleanup. 2024-09-26 19:39:16 +02:00
Martijn Laan
23d6535c21
Add unit for PBKDF2-HMAC-SHA256 password-based key derivation. 2024-09-26 19:39:10 +02:00
Martijn Laan
146b9f3e80
Use SCI_SETCOPYSEPARATOR for better multi select copy. Doesn't improve multi select paste unfortunately. 2024-09-26 14:52:26 +02:00
Martijn Laan
ad8e79a8ab
Update to Scintilla 5.5.2. 2024-09-26 14:51:17 +02:00
Martijn Laan
e4b524a3b3
Cleanup duplicate info. 2024-09-26 13:49:32 +02:00
Martijn Laan
f576b7c8f4
Add note about CheckPassword vs Encryption=yes (this is not something new). 2024-09-26 13:45:01 +02:00
Martijn Laan
9a91001f91
Cleanup password testing: use the encryption itself (by encrypting 0 and comparing results) to test the password instead of having something separate as before.
Encryption itself is unchanged by this commit except that the key is now derived from the password only once. So it still uses SHA-256 for this.

The next step is changing this to a proper KDF, by changing the implementation of GenerateEncryptionKey and the TSetupEncryptionKey type.
2024-09-26 13:26:30 +02:00
Martijn Laan
1fb1c0d73b
Projects cleanup. 2024-09-26 11:54:09 +02:00
Martijn Laan
12637b1b70
Merge branch 'sha256-cleanup' 2024-09-26 11:49:49 +02:00
Martijn Laan
58b27f351b
Cleanup remaining MD5, SHA1 and Hash unit use. 2024-09-26 11:39:48 +02:00
Martijn Laan
d7fdd022ae
Update. 2024-09-23 12:57:01 +02:00
Martijn Laan
7858511690
Update by new author. 2024-09-16 11:28:44 +02:00
Jordan Russell
e31bc13027
Undo Digits size change. 2024-09-01 23:16:33 -05:00
Martijn Laan
ea6f7b69c8
Use SHA256 instead of SHA1 for the password hashing. 2024-09-01 19:46:24 +02:00
Martijn Laan
43be6a8d91
Add SHA256.pas: System.Hash.pas wrapper in the style of MD5.pas and SHA1.pas. 2024-09-01 19:41:47 +02:00
Martijn Laan
abcf3eb742
Merge branch 'chacha20' 2024-09-01 19:03:28 +02:00
Martijn Laan
a1274f5d75
Finish branch. The examples still have iscrypt.dll/.zip downloads but keeping those for now. 2024-09-01 19:03:22 +02:00
Martijn Laan
a4704a25cf
Missed cleanup. 2024-09-01 18:49:56 +02:00
Martijn Laan
db877306fa
Implement the base nonce. 2024-09-01 18:46:43 +02:00
Jordan Russell
a7d5ed9d90
Skip loop when Length=0.
Length is unsigned, so "Length-1" will underflow to $FFFFFFFF.
2024-09-01 00:05:48 -05:00
Martijn Laan
54628e263c
Update whatsnew & help. The bit about the base nonce is yet todo. 2024-08-31 22:37:46 +02:00
Martijn Laan
b64a3d62ba
Make this include file work if main file enables encryption. Not really related to branch. 2024-08-31 22:25:42 +02:00
Martijn Laan
e3590fb089
Remove ISCrypt.dll download and instead delete it on update. 2024-08-31 22:24:50 +02:00
Martijn Laan
d9d845ab62
Replace ArcFour with XChaCha20 which also removes iscrypt.dll use.
Todo:
-Use a single random base nonce for all files
-Remove/replace various iscrypt use in .iss scripts
-Delete iscrypt.dll on updates
-Update help & whatsnew & web
-Rename TSetupSalt/TSetupNonce?
2024-08-31 22:14:32 +02:00
Martijn Laan
69935ebfbf
TChaChaContext -> TChaCha20Context. 2024-08-31 22:02:11 +02:00
Martijn Laan
a30215e89c
Finish tests & some cleanup. Unit is done now. 2024-08-31 21:41:13 +02:00
Martijn Laan
f8b8e9f528
Finish XChaCha20. Test produces correct cipher 💪 Just need to make the tests check this themselves. 2024-08-31 12:23:36 +02:00
Martijn Laan
771c8bfb0e
Bit of work on XChaCha20, not finished. 2024-08-31 09:29:56 +02:00
Martijn Laan
d182809db3
Add test from https://datatracker.ietf.org/doc/html/rfc7539#section-2.4.2 2024-08-30 21:51:53 +02:00
Martijn Laan
3dd824b19a
Add support for 64-bit counter and nonce. 2024-08-30 21:27:03 +02:00
Martijn Laan
774f1cbf16
Add support for arbitrary buffer sizes. 2024-08-30 21:17:34 +02:00
Martijn Laan
51486a1813
Make it like IETF ChaCha by removing the overlap of the counter and nonce. Also some cleanup/renames. 2024-08-30 20:34:35 +02:00
Martijn Laan
4db88b67d5
Allow a zero nonce. We can use this, see https://crypto.stackexchange.com/a/73223: "If the key is chosen independently and uniformly at random for each message, then you can safely use the fixed nonce zero." 2024-08-30 07:09:28 +02:00
Martijn Laan
d2a12ecc5f
Check instead of overflow. 2024-08-30 07:02:52 +02:00
Martijn Laan
61a6558525
Simplify. 2024-08-30 06:59:16 +02:00
Martijn Laan
e9bf1e8f1f
Add initial ChaCha20Crypt. 2024-08-30 06:55:13 +02:00
Martijn Laan
2f6c3d2c6c
Fix whitespace. 2024-08-29 09:57:41 +02:00
Martijn Laan
85ec7b606f
Added alternative compile shortcut (Shift+F9 or F7). 2024-08-28 18:11:53 +02:00
Martijn Laan
969320c718
Add comment. 2024-08-28 18:10:11 +02:00
Martijn Laan
70cf0fb776
Tweak. 2024-08-28 15:26:46 +02:00