Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Unbreakable encryption

Name: 1337 2020-02-15 5:26

#include<string.h>

#define QR(a, b, c, d) { a += b; d ^= a; c += d; b = ((b ^ c) << 1) ^ ((b ^ c) >> 7); }

void p(unsigned char secret[16]) {
int i;
int j;
for(i = 0; i != 16; ++i){
for(j = 0; j != 4; ++j)
QR(secret[j], secret[4+j], secret[8+j], secret[12+j]);
for(j = 0; j != 4; ++j)
QR(secret[4*j], secret[1+4*j], secret[2+4*j], secret[3+4*j]);
}
}

void encrypt(unsigned char secret[16], unsigned char key[16], unsigned char m[16]) {
int i;
memcpy(secret, key, 16);
p(secret);
for(i = 0; i != 16; ++i)
secret[i] ^= key[i] ^ m[i];
}

u cant break it ;)
faster than aes
best

Name: Anonymous 2020-02-15 7:58

Femanon here.

I'll get straight to the point: I wanna have two cocks inside me at the same time. The problem is that I don't really like the idea of being sexual with two men at once. The only solution I can think of is to find a guy with two cocks and fuck him.

I realize that the odds are against this, but has anyone here ever done anything like this? I mean how do you even go about finding a dude with two dicks?

Name: Anonymous 2020-02-15 10:27

where's the decrypt()?

Name: Anonymous 2020-02-15 12:29

>>3
Why would you introduce a weakness into an unbreakable algorithm?

Name: Anonymous 2020-02-15 13:58

>>4
Minecraft

Name: Anonymous 2020-02-15 22:41

>>2
There's only one guy with two dicks and he's a Redditor. The solution instead is to fuck two trans girls.

Name: Anonymous 2020-02-16 2:50

>>3
run encrypt with the secret as m
unsigned char key[16] = "uh oh stinky poo poo";
unsigned char m[16] = "goatfinger";
unsigned char secret[16];
encrypt(secret, key, m);
unsigned char decrypted[16];
encrypt(decrypted, key, secret);

Name: Anonymous 2020-02-16 9:39

You don't have an IV?

Name: Anonymous 2020-02-17 13:20

the simple weakness here is that this code pretends to be a block cipher but it really is a stream cipher:

for(i = 0; i != 16; ++i)
secret[i] ^= key[i] ^ m[i];


because secret at this point contains data derived from key, we can see that secret[i] ^= key[i] is really the last step of keystream derivation. the entire line (secret[i] ^= key[i] ^ m[i];) is just a stream cipher operation: bitwise XORing a message with a keystream.

block ciphers can be used as stream ciphers (CTR mode) but not really the other way around, and stream ciphers have their own problems/security considerations (the need for a unique IV). so you shouldn't compare its speed and security with AES but with other stream ciphers. stream ciphers are faster in general, and they are often implemented in hardware.

how to see if your're are cipher is a good stream cipher? well, stream ciphers are basically cryptographically secure RNGs. and as an RNG of any kind, your're are cipher has a critical flaw: as it's written, it uses a 16-byte seed to generate a 16-byte output. for comparison, Mersenne Twister generates 219937-1 bytes from a 4-byte input. and Mersennte Twister isn't even a cryptographically strong RNG (it can be reversed give 624 consecutive outputs). other important features of a good stream cipher (which I didn't bother testng for yet) are:
  • irreversible - operations used to generate keystream cannot be easily reversed, so that if you know one keystream state you cannot get the previous one
  • impossible to clone - as mentioned with regards to Mersenne Twister, observing keystream should not be enough to replicate a generator instance (which would allow the attacker to generate arbitrary keystream bytes)
  • entropic - a good keystream should look just like random noise

Name: Anonymous 2020-02-17 13:49

>>9
small correction: MT is cloneable, not reversible

Name: Anonymous 2020-02-17 13:50

small correction: check my dubs

Name: Anonymous 2020-02-17 14:10

I broke it.

Name: Anonymous 2020-02-17 14:10

I broke it. Haxxed in linear time complexity.

Name: Anonymous 2020-02-18 7:21

this is just ChaCha rewritten as a block cipher you stupid anus. ChaCha is not a block cipher so you shouldn't use it as such

Name: Anonymous 2020-02-18 9:45

>>14
can you break it though

Name: Anonymous 2020-02-18 10:38

>>15
It's not about whether I can break it. It's about whether armies of autists from the NSA/Russia/FOSS community/HackerNews/&c can break it.

Name: Anonymous 2020-02-18 13:26

>>9
Still not broken lmao

Name: Anonymous 2020-02-19 14:15

>>13
Are you talking about my anus?

Name: Anonymous 2020-02-19 14:32

It will break if you keep using the same key and secret to send messages though

Name: Anonymous 2020-02-19 14:44

>>3,4
it's symmetric, just put the encrypted data into the encrypt function and it'll spit out the original

Name: Anonymous 2020-02-19 15:20

>>18
Thats only O(0) complexity.

Name: Anonymous 2020-03-05 15:44

lol

Don't change these.
Name: Email:
Entire Thread Thread List