Sujet : Re: xorpng
De : rich (at) *nospam* example.invalid (Rich)
Groupes : sci.cryptDate : 06. Jan 2025, 04:50:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlfjtn$1ande$7@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Chris M. Thomasson <
chris.m.thomasson.1@gmail.com> wrote:
On 1/5/2025 2:18 PM, Stefan Claas wrote:
Chris M. Thomasson wrote:
On 1/5/2025 2:06 PM, Chris M. Thomasson wrote:
On 1/5/2025 1:25 AM, Stefan Claas wrote:
Rich wrote:
Stefan Claas <pollux@tilde.club> wrote:
Rich wrote:
>
If instead you mean some kind of "special, PNG aware, encryptor that
only encrypted the bitmap data of a PNG", but left the file as
otherwise a proper PNG image structure, then that is slightly tricky
(and an algorithm that is only useful for PNG's alone).
>
Yes, this is what I mean.
>
Which brings up the question of: why?
>
Why go to the trouble to create an encryptor that is specalized for
just encrypting the internal bitmap data within a PNG, leaving the rest
as a PNG file, when a generic "byte stream" encryptor will encrypt the
entire PNG with no extra effort?
>
To make more content as allowed postable on social media, like X.
>
>
Well, posting a png to say, facebook, well... It's probablly going to
turn it into a jpg... This can ruin the embedded ciphertext in the png
image...
>
Actually, the damn FB allows me to send my links with embedded
ciphertext just fine.
It is for X and not Meta.
Well, sending say a PNG to X, it still might convert it into a JPG. It
might alter things for compression purposes. This can mess around with
your payload...
There are several "modifications" to a PNG that can be performed, that
for a photo or a "meme image" will not result in visible changes, but
*will* result in changes to the bitmap.
Several possibilities are:
1) convert RGBA to just RGB (remove alpha channel) -- if one created a
"crypto carrier" PNG that used an alpha channel, this conversion would
delete 25% of the data content.
2) convert RGB (24 bits per pixel) to indexed (either eight or sixteen
bits per pixel). Both require color mapping from 2^24 colors to either
2^8 or 2^16 total colors, resulting in an altered bitmap.
3) convert RGB or indexed images into a "low color" index image (i.e.,
max 64 colors) which requires the same color mapping as #2 above, and
will create a different bitmap.
Simply uploading a PNG to X, then downloading the PNG X serves, and
identifying it as a "PNG" does not tell the full story. You have to
look at what "kind" of PNG was uploaded, and what "kind" of PNG
returned, to know what transformations X performed.