From bb86c85d682e0b054fc40ff0dde8c067d7232d5d Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Mon, 7 Feb 2022 23:51:09 +0100 Subject: [PATCH] Readme --- readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index a9eb803..63783e8 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,8 @@ It's pretty ghetto, you know? * If your only other option would be no encryption at all ### I am not kidding, don't use this for critical stuff! Homebrew ciphers tend to be shit! -Especially mine!🗡️ +Especially mine!🗡️ +Even assumed it's a good cipher, it's implementation leaves a lot to be desired in terms of being cryptographically secure. The whole leaving partial keys in ram- thingy... ## How do I use this? ### *"I don't care about the library. Just let me use it from the command line!"* @@ -76,7 +77,7 @@ Without saying, this is more advanced and not as-easy as the methods supplied in ### Modes of operation * [CBC] This block cipher makes use of cipher block chaining. Nothing special. * [IV] The initialization vector is indeed a bit of special sauce, as it depends on your key instead of being static. It is generated by running the feistel network on *E(m=seed, k=seed)*. -* [RRKM] Never heard of a mode like this, so i've named it **R**olling**R**ound**K**ey**M**ode. This basically means that the round key extrapolation is carried out continously over EVERY round on EVERY block. So in addition to *Mi* being dependent on *E(M,Ki-1,0)i-1* due to CBC, so is now *Ki* dependent on *Ki-1,r* with *r* being the maximum number of extrapolated keys within a call of E(). This is handled within the feistel network class, as an instance lifecycle sees all blocks, if you want to take a peek. +* [RRKM] Never heard of a mode like this, so i've named it **R**olling**R**ound**K**ey**M**ode. This basically means that the round key extrapolation is carried out continously over EVERY round on EVERY block. So in addition to *Mi* being dependent on *E(Mi,Ki-1,0)i-1* due to CBC, so is now *Ki* dependent on *Ki-1,r* with *r* being the maximum number of extrapolated keys within a call of *E()*. This is handled within the feistel network class, as an instance lifecycle sees all blocks, if you want to take a peek. ### Password to key How does *GC* transform a password to a key? @@ -88,7 +89,7 @@ First up, we have to establish what requirements this transformation must fulfil Let's be honest, I'm not a cryptographer, i have no idea how collision resistant this is. This means, it has to be considered *insecure*! I have tried a few passwords brute-forcibly, experimentally (about 1mil) and have not been able to produce a collision. -Obviously there have to be collisions, because *|P|, len\(p\) ∈ ℵ ≫ |C|*. +Obviously there have to be collisions, since *|P|, len\(p\) ∈ ℵ ≫ |C|*. How does it work? Basically, what happens is your password gets recoded to binary. It is then split into blocks of size KEY_SIZE, they are ⨁ together, and this single block is then encrypted with itself as a key.