Sujet : Re: xorpng
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : sci.cryptDate : 04. Jan 2025, 22:51:40
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlcahc$ks00$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla Thunderbird
On 1/4/2025 1:32 PM, Stefan Claas wrote:
Chris M. Thomasson wrote:
On 1/4/2025 1:13 PM, Chris M. Thomasson wrote:
On 1/4/2025 1:08 PM, Stefan Claas wrote:
Chris M. Thomasson wrote:
On 1/4/2025 10:06 AM, Stefan Claas wrote:
Chris M. Thomasson wrote:
On 1/3/2025 7:13 AM, Stefan Claas wrote:
Chris M. Thomasson wrote:
On 12/31/2024 5:00 PM, Stefan Claas wrote:
echo 'Happy News Year 2025' | ternary
2112102022020111101010222211010022112012102120110020100021120220
10000111010121200020221000211000220022020
>
$ echo 'Happy News Year 2025' | ternary | ternary -d
Happy News Year 2025
>
(My program works with binary data as well.)
>
>
Side note, try to get 3-ary roots from the following... It's not
that
hard but its fun wrt the results one can reap from it:
>
https://paulbourke.org/fractals/multijulia
>
Nice, but I do no longer do Computer Graphics.
>
>
In a sense, its all about discovering the n-ary roots of a complex
number... For fun, I mapped actual data to said roots... :^)
>
I think I called them nits. trits would be 3-ary, akin to ternary.
>
Since you do a lot graphics programming, have you ever thought
about encrypting images with XOR?
>
Indeed.
>
>
I just did a small test with
my xorpng program and wrote a message for you with my little
WACOM tablet and Microsoft Paint. :-)
>
I think this is a really cool (but then with a mouse instead
of a tablet) when traveling and exchanging keys in advance with
family and friends and using a Bitmessage's alt.anonymous.messages
chan and my p4bm program, in case Computers are compromised at the
destination, when not carrying one and you need no credentials and
only the keys on a Kanguru Defender 3000.
>
Here are the test images:
>
https://jmp.sh/jp1A5kvq
>
and here is my xorpng and p4bm program:
>
https://github.com/706f6c6c7578/xorpng
https://github.com/706f6c6c7578/p4bm
>
>
I am sure you are familiar with tux:
>
https://words.filippo.io/the-ecb-penguin/
>
We can encrypt that image in many different ways, indeed.
>
So, do you have an image encryption solution too?
>
Here is an analysis of my k-1.png and encrypted.png.
(one must make sure that the keys are safely stored)
>
https://jmp.sh/9fvXJvmo
>
$ python3 image_analysis.py
fourier_peaks: 194566.0
wavelet_energy: {'LL': 16776624377.0, 'LH': 1891692481.0000002, 'HL':
621089515.0000001, 'HH': 619257027.0000001}
histogram_variance: {'red': 791946.0, 'green': 792130.44, 'blue':
792015.6}
lsb_ratio: 0.9868576388888889
noise_level: 45.981313657407405
region_hash_similarity: 1.0
total_pixels: 230400
different_pixels: 227953
difference_percentage: 98.93793402777777
>
>
Well, an older one was to trying to hide the points that do not escape
in any escape time fractal. You can take any image, any file for that
matter and encrypt it. Then view the file, say with one channel of
color, say, red. Each byte is mapped to a color, 0...255 Then we can see
it in this single color. Sometimes ciphers give off some rather
interesting visual hints! :^)
>
This is using fractal images to try to encrypt plaintext:
>
http://funwithfractals.atspace.cc/ffe
Nice, but it does not decrypt the image, right, which should
be the task.
That is not the task for my experiment here. Basically, it uses the fractal image as a sort of "special pad", just for fun. You have all of my code for it.
Wrt xor, decrypting the image would be just like encrypting it using any xor cipher. You create a bitmap. Encrypt it using xor. Send the ciphertext as a bitmap, or, well, I am thinking lossless here. Take the bitmap, or png, and decrypt it using xor. Simple. If the resulting image give any thing away wrt it's visual appearance, well, that is a sign that the encryption algo is not all that good...
Now, using a lossy system is fun. I have experimented with this before when I was bored. Alice encrypts using a jpg, then tries to decrypt the lossy result. If that fails, Alice tries again wrt, say, adjusting coloring, ect... Alice says okay! I finally found a lossy version of a jpg that successfully encrypted and decrypted on my end. She finally sends the jpg to Bob. Bob "should" be able to decrypt it because Alice already did the encrypt and decrypt cycle on her end.
Now, for some fun wrt floating point issues... Have you messed around with storing data in the n-ary roots of complex numbers? they can actually create interesting renderings using real user data.
https://groups.google.com/g/comp.lang.c++/c/bB1wA4wvoFc/m/ozDpUBlTAAAJWhen you get really bored! ;^)