From 096f1aa000a6adc46c4d6c98e9c671e8f4c7657e Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Mon, 6 Dec 2021 10:16:29 +0100 Subject: [PATCH] Made 512bit the default block size --- GhettoCrypt/Util.h | 4 +++- readme.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/GhettoCrypt/Util.h b/GhettoCrypt/Util.h index ec69f10..128102c 100644 --- a/GhettoCrypt/Util.h +++ b/GhettoCrypt/Util.h @@ -199,7 +199,9 @@ namespace GhettoCipher return ss.str(); } - //! Creates a key of size key-size from a password of arbitrary length. + //! Creates a key of size BLOCK_SIZE from a password of arbitrary length. + //! Using passwords larger (in bits) than BLOCK_SIZE is not generally recommended. + //! Note that if your password is shorter (in bits) than BLOCK_SIZE, the rest of the key will be padded with 0x0. Further round-keys will be extrapolated though. inline Block PasswordToKey(const std::string& in) { Block b; diff --git a/readme.md b/readme.md index 9e73817..ec8b0ea 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,7 @@ This way this provides relatively good diffusion. * It's slow * It's probably super insecure * It leaves your keys sprinkled in ram✨ -* Short 128-bit keys\*🤦‍♂️ +* 512-bit keys \* * But the syntax is pythonlike easy🙇 It's pretty ghetto, you know? @@ -66,7 +66,7 @@ This way you could, for example, decrypt an ecrypted file directly into memory. Without saying, this is more advanced and not as-easy as the methods supplied in the wrapper. --- -* \* A key is always of size BLOCK_SIZE. The default block size is 128 (bit), but you can easily change it in [Config.h](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/Config.h) or wherever it'll be put in the INCLUDE/*.cpp. `BLOCK_SIZE` is also the minimal output length! +* \* A key is always of size BLOCK_SIZE. The default block size is 512 (bit), but you can easily change it in [Config.h](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/Config.h) or wherever it'll be put in the INCLUDE/*.cpp. `BLOCK_SIZE` is also the minimal output length! ## LICENSE ```