Encryption and decryption is a joke #1

Closed
opened 2021-08-29 03:11:45 +02:00 by EpicKnarvik97 · 2 comments

Basically, right now, decryption is fake. Books are stored as plaintext files with the password used as part of the filename, and then the books' text is scrambled.
This basically means that the encryption process itself is unnecessary as the only thing it does is scramble the contents of the book, and could just as well be replaced with filling the book with randomness.

If possible, the book should be properly encrypted and decrypted, with the password stored in a file if adminDecrypt is enabled. Perhaps use a proper encryption algorithm, but that might break compatibility with existing books.

Basically, right now, decryption is fake. Books are stored as plaintext files with the password used as part of the filename, and then the books' text is scrambled. This basically means that the encryption process itself is unnecessary as the only thing it does is scramble the contents of the book, and could just as well be replaced with filling the book with randomness. If possible, the book should be properly encrypted and decrypted, with the password stored in a file if adminDecrypt is enabled. Perhaps use a proper encryption algorithm, but that might break compatibility with existing books.
EpicKnarvik97 added the
enhancement
label 2021-08-29 03:13:24 +02:00
Author
Owner

Note: For AES, the IV and salt would need to be retained. Most likely, instead of storing the original book file, a new one would need to be stored with Base64 IV and Base64 salt stored as extra parameters, and each encrypted page would be stored instead of the original unencrypted ones.

The encryption method should be stored in the book file for each type.

Should probably have an option for real encryption vs. the current encryption.

Instead of storing the key as part of the file name, it should be stored in the file.

The existing decryption code should be retained for existing encrypted books.

Note: For AES, the IV and salt would need to be retained. Most likely, instead of storing the original book file, a new one would need to be stored with Base64 IV and Base64 salt stored as extra parameters, and each encrypted page would be stored instead of the original unencrypted ones. The encryption method should be stored in the book file for each type. Should probably have an option for real encryption vs. the current encryption. Instead of storing the key as part of the file name, it should be stored in the file. The existing decryption code should be retained for existing encrypted books.
Author
Owner

An optional true encryption mode has been added in the string-formatting branch, and will be merged once that's all finished

An optional true encryption mode has been added in the string-formatting branch, and will be merged once that's all finished
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: EpicKnarvik97/Books-Without-Borders#1
No description provided.