RSA xormccann on DeviantArthttps://www.deviantart.com/mccann/art/RSA-xor-153857mccann

Deviation Actions

mccann's avatar

RSA xor

By
Published:
22.8K Views

Badge Awards

Description

I was messing around the the RSA encryption algorithm, and came up with this image, thought it was cool. There is other as well:
"RSA and" [link]

in pseudo language syntax, this image is computed with the basic algorithm:

for every y
for every x
temp = abs(x+y) xor abs(x-y)
pixel[x,y] = (temp^7) mod 257;


(if anyone wants a larger size for any reason, let me know)

-Andrew
Image size
1280x1024px 606.62 KB
© 2002 - 2026 mccann
Comments77
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
eode's avatar
This is interesting because it's the only algorithm I've ever seen that produces a (presumably) endless scape of variation that looks creative rather than repetitive. (I'm not including fractals because once you go beyond the bounds they're blank, so your only choice is to keep zooming in.)

For that reason I actually remembered it from like 7 years ago and just now revisited it.. i had to do a search because i didn't add it to my favorites then (but I did now), the only thing I remembered to search for was "mod 257" (which I remembered because I'd actually generated this image myself once based on the pseudo-code).

If I weren't too lazy I'd make a program that allows the user to scroll up/down/left/right infinitely (or maybe I already did.. don't remember).