3 ms·
Fileghost 0.0.1 Released. ¯\_(ツ)_/¯
- 0ut0flin3 4y agoFileghost allows to encrypt any file (or sequence of bytes, like a message) using an unique, random generated sequence of 256 bytes. Keybase Team: https://keybase.io/team/fileghost_team https://keybase.io/team/fileghost_team
- josephcsible 4y agoThis is pathetically weak and should never be used for any purpose other than maybe as homework to break in the first week of cryptanalysis 101.
- 0ut0flin3 4y agoYes, if the file size is small then an attack is possible. But if it's big, it's really very difficult. I'm also working on a pre-mask that removes repeating bytes from the input and makes it impossible to get double characters. It's just an experiment, I'll also put an encrypted file with a prize for whoever reveals the original file! Apart from these problems that are there, how are you going to guess a sequence that can have 256! different combinations and can be encrypted with several different keys?
- josephcsible 4y ago> Yes, if the file size is small then an attack is possible. But if it's big, it's really very difficult. Big files make the attack even easier. > It's just an experiment, I'll also put an encrypted file with a prize for whoever reveals the original file! Good idea. > how are you going to guess a sequence that can have 256! different combinations and can be encrypted with several different keys? Because there are other attacks possible besides just brute force.
- deleted 4y ago[deleted]
- iforgotpassword 4y agoAs others said this is very weak. The implementation seems to be that you generate a random permutation of the values 0 to 255 and use it as a lookup table. An even simpler and faster approach would be to generate a random stream of bytes and repeatedly use it to xor the input bytes (wrap-around the key if the data to encrypt is longer than the key). This shouldn't be any weaker, and has the added bonus that the encrypt and decrypt function are identical. Also, don't call it private key. That term is reserved for asymmetric encryption. This here is just a key.
- 0ut0flin3 4y agoThank you for the suggestions and clarifications. What exactly do you mean by wrap-around the key?
- iforgotpassword 4y agoSomething like for p = 0 to inputLen-1 Output[p] = Input[p] xor Key[p mod keyKen] next The modulo makes the key wrap around, so it doesn't matter how long or short it is compared to the input data.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- 0ut0flin3 4y agoCOOL! it works like a charm!
- 0ut0flin3 4y agoin any case,[I'm going to personal logic.] I was thinking back to the fact of the weakness you mention of the method I used which, said by more than one person, I don't question it. But I don't understand how that is possible. So, if I have a key that only I know, which would be an array of length 256 which always contains all the numbers from 0 to 255 but in random order. and for each byte (p) of the input file I replace p with key[int(p)]....it seems really impossible to go back to both the input and the key. due to the fact that I can't know what it was before the replacement. What am I missing? Of course there can be repetitions in the bytes and then you can draw conclusions as to what byte it is,yes..but also think if I repeat the same, several times, with different keys? However, your function rules, I will implement.