>One time pad >Breaking Jimbob! Get the pipe wrench!
Joshua Clark
Yeah, I guess that was pretty retarded of me
Lincoln Cook
What's the point of encrypting something when you can't decrypt it afterwards
Isaac Lewis
It is more fun than just generating random numbers
Carter Rivera
>I'm a beginner in C
Why the fuck are you using C over C++ for anything that doesn't involve ABIs?
Ian Cox
>yfw C ABI was never defined
Tyler Reyes
The C standard doesn't define an ABI because it's far too system-specific to be standardised, but they do go adding features that force implementations to break theirs.
Christopher Flores
OMFG THAT'S A REVERSE ONE TIME PAD ENCRYPTION YOU MORON.
Wyatt Nelson
It really doesn't matter when you're starting out seeing as c is a subset of c++ genius
Henry Sanchez
i just suffered a seizure because of that gif
Xavier Brooks
B..]Y`F.yBPI{FT
Nolan Richardson
Hey..g/..can you even.break this, faggots?.
Whoops haha
Eli Nguyen
Are you on windows?
Andrew Rivera
EQ{x/aSH.=i{O?gs=Fty.
Christian Reed
>HEY GUYS, GONNA INPUT COMPLETELY RANDOM LETTERS AND USE A KEY OF RANDOM DIGITS FOR YOU TO GUESS fucking idiots. You need a pattern to crack things. Theres literally no way of confirming what you think is the key. Things like this arent cracked, they are brute forced or the key is stolen from the servers. In this case you dont store the key so when the program terminates literally no one will be able to know what the key is. AKA useless encryption.
Andrew Watson
As a matter of fact, I am.
Thomas Bailey
>if(!isprint(bstr[i])) {bstr[i] = '.';} Shit way of doing this. You're ensuring that the encrypted string will get corrupted upon decryption.
Jeremiah Bennett
Everyone's already said, don't forget to solve the key distribution problem, which is the hardest part of one-time pad encryption.
> for (i = 0; i < strlen(bstr); i++) I thought this would cause buffer overflow if the input string is more than 255 bytes, but fgets inserts a null byte at the end of the buffer, so you're good.
> key[i] = (rand() % 100); > if(!isprint(bstr[i])) {bstr[i] = '.';} This should probably be mod 256, though o don't know of there are security problems with having the key be in a reduced range. But changing some of the ciphertext bytes after encryption is a surefire way to make sure the message won't get to your recipient intact. Either just output the bytes to stdout and let some other program deal with it, or do it I'm hex or base64.
Also, if you tell us exactly what time you ran this code, we could decipher it (except for the dots).
Henry Cox
>Also, if you tell us exactly what time you ran this code, we could decipher it (except for the dots).
You can assume he ran it within an hour of posting it, so you use his image timestamp. for (x = timestamp; x > timestamp - 3600; i--)
It would be pretty much impossible to decipher without the source code though.
Isaac Peterson
Right, which I think someone already did:
Aiden Martin
OP used the UNIX time in seconds to seed the standard C rand.
Presuming he generated this in the last 2-3 hours, this would be about 10000 instances to check.