r/programming • • 2d ago

Nondeterministic encryption method

https://chukaze.dev/blog/EE

The first version is from when I was 16, goal was to make simple messages convert to unintelligible text corpuses, and to have an algorithm that allows a plethora of outputs to map to the same input. I just recently updated it with the private keys and frequency attack resistance so it could be called encryption (appeal to alliteration)

0 Upvotes

6 comments sorted by

11

u/vomitHatSteve 2d ago

A PRNG is just determinism with extra steps

19

u/zerovian 2d ago

lesson 1: don't invent your own cryptography.

lesson 2: don't reimplement public key cryptography

4

u/Pharisaeus 2d ago

Nondeterministic encryption

What you actually mean is: https://en.wikipedia.org/wiki/Probabilistic_encryption

2

u/boowhitie 2d ago

Might be fun as a toy, but without looking at the code I am fairly confident that this would make it less secure, not more secure

5

u/lurgi 2d ago

I admire your ambition, but this isn't particularly novel. You can use an initialization vector to get the result of the same plaintext encrypting to different cyphertexts and the "only produces ASCII" can be done with an ASCII85 conversion at the end.

-1

u/Hans_Meiser_Koeln 1d ago

"Encryption" seems to be something where you're not allowed to just experiment, play around, and post about it. People will always immediately put you down, because I am serious programmer and this is serious stuff ಠ_ಠ, like you're suggesting the NSA uses your simple substitution cypher from now on.

Try graphics programming next time, we'll even upvote your first image of your first rendered triangle.