Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #223: The lines are all busy (busied out, that is -- why let them in to begin with?).


sci / sci.crypt / Re: xorpng

SubjectAuthor
* Ternary Encoding :-)Stefan Claas
+* Re: Ternary Encoding :-)Stefan Claas
|`* Re: Ternary Encoding :-)Rich
| +* Re: Ternary Encoding :-)Stefan Claas
| |+* Re: Ternary Encoding :-)Stefan Claas
| ||+- Re: Ternary Encoding :-)Stefan Claas
| ||`* Re: Ternary Encoding :-)Rich
| || `- Re: Ternary Encoding :-)Chris M. Thomasson
| |`- Re: Ternary Encoding :-)Rich
| `* Re: Ternary Encoding :-)Stefan Claas
|  `* Re: Ternary Encoding :-)Rich
|   `* Re: Ternary Encoding :-)Stefan Claas
|    `* Re: Ternary Encoding :-)Rich
|     `* Re: Ternary Encoding :-)Stefan Claas
|      +* Re: Ternary Encoding :-)Stefan Claas
|      |`* Re: Ternary Encoding :-)Rich
|      | `* Re: Ternary Encoding :-)Stefan Claas
|      |  `- Re: Ternary Encoding :-)Rich
|      `* Re: Ternary Encoding :-)Rich
|       `* Re: Ternary Encoding :-)Stefan Claas
|        `* Re: Ternary Encoding :-)Stefan Claas
|         +- Re: Ternary Encoding :-)Rich
|         `* Re: Ternary Encoding :-)Rich
|          +- Re: Ternary Encoding :-)Stefan Claas
|          `* Re: Ternary Encoding :-)Chax Plore
|           `- Re: Ternary Encoding :-)Rich
`* Re: Ternary Encoding :-)Chris M. Thomasson
 `* Re: Ternary Encoding :-)Stefan Claas
  `* Re: Ternary Encoding :-)Chris M. Thomasson
   `* xorpng (was: Ternary Encoding :-))Stefan Claas
    +- Re: xorpngStefan Claas
    `* Re: xorpngChris M. Thomasson
     `* Re: xorpngStefan Claas
      `* Re: xorpngChris M. Thomasson
       `* Re: xorpngChris M. Thomasson
        `* Re: xorpngStefan Claas
         `* Re: xorpngChris M. Thomasson
          `* Re: xorpngStefan Claas
           +* Re: xorpngChris M. Thomasson
           |`* Re: xorpngStefan Claas
           | `* Re: xorpngRich
           |  `* Re: xorpngStefan Claas
           |   +* Re: xorpngChris M. Thomasson
           |   |`* Re: xorpngStefan Claas
           |   | `* Re: xorpngChris M. Thomasson
           |   |  +- Re: xorpngChris M. Thomasson
           |   |  `* Re: xorpngStefan Claas
           |   |   `* Re: xorpngChris M. Thomasson
           |   |    `* Re: xorpngStefan Claas
           |   |     `- Re: xorpngChris M. Thomasson
           |   `* Re: xorpngRich
           |    `* Re: xorpngStefan Claas
           |     +* Re: xorpngStefan Claas
           |     |`* Re: xorpngRich
           |     | `* Re: xorpngStefan Claas
           |     |  `* Re: xorpngRich
           |     |   `* Re: xorpngStefan Claas
           |     |    +* Re: xorpngChris M. Thomasson
           |     |    |`* Re: xorpngChris M. Thomasson
           |     |    | `* Re: xorpngStefan Claas
           |     |    |  +* Re: xorpngChris M. Thomasson
           |     |    |  |`- Re: xorpngChris M. Thomasson
           |     |    |  +* Re: xorpngChris M. Thomasson
           |     |    |  |`* Re: xorpngStefan Claas
           |     |    |  | `* Re: xorpngStefan Claas
           |     |    |  |  `- Re: xorpngStefan Claas
           |     |    |  `* Re: xorpngRich
           |     |    |   `* Re: xorpngStefan Claas
           |     |    |    +* Re: xorpngStefan Claas
           |     |    |    |+* Re: xorpngStefan Claas
           |     |    |    ||`* Re: xorpngJan Panteltje
           |     |    |    || `- Re: xorpngStefan Claas
           |     |    |    |`- Re: xorpngRich
           |     |    |    `* Re: xorpngRich
           |     |    |     `* Re: xorpngStefan Claas
           |     |    |      `* Re: xorpngStefan Claas
           |     |    |       `* Re: xorpngStefan Claas
           |     |    |        `* Re: xorpngStefan Claas
           |     |    |         `* Re: xorpngChris M. Thomasson
           |     |    |          +- Re: xorpngChris M. Thomasson
           |     |    |          `* Re: xorpngStefan Claas
           |     |    |           `- Re: xorpngChris M. Thomasson
           |     |    `- Re: xorpngRich
           |     +- Re: xorpngRich
           |     `* Re: xorpngChris M. Thomasson
           |      +* Re: xorpngChris M. Thomasson
           |      |`* Re: xorpngStefan Claas
           |      | +* Re: xorpngChris M. Thomasson
           |      | |`- Re: xorpngRich
           |      | `- Re: xorpngChris M. Thomasson
           |      `- Re: xorpngRich
           `* Re: xorpngChris M. Thomasson
            +* Re: xorpngChris M. Thomasson
            |`- Re: xorpngStefan Claas
            `* Re: xorpngStefan Claas
             `* Re: xorpngStefan Claas
              `* Re: xorpngChris M. Thomasson
               `* Re: xorpngStefan Claas
                `- Re: xorpngChris M. Thomasson

Pages:1234
Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 09:40 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 10:40:58 +0100
Organization: To protect and to server
Message-ID: <vldk3q$psnq$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me> <vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
Mime-Version: 1.0
Injection-Date: Sun, 5 Jan 2025 09:41:14 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="848634"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:ZNvSM0EzJIROG6JBW7DGmF2pni4=
X-Ed25519-Sig: d4af9ca0bab1e4a8712f3aadf8c5ccb314daf97ce2b709635f938b9cffcb35c3
a67ced3d8642c0dc9ff554bb381252e5fa622318c1ce4167470d14eccee5c602
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Notice: Filtered by postfilter v. 0.9.3
X-Date: It's Sun Sep 11450 10:40:59 AM CET 1993, the September that never ends.
View all headers

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.

I.e, first you put data with file2png in a .png and then encrypt it
to finally post it. I can do this now with my xorpic program, but
I thought a solution with AES-GCM or XChaCha20+ploy1305 is better.

--
Regards
Stefan

Subject: Re: xorpng
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 16:30 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 16:30:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 109
Message-ID: <vlec42$13phn$1@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
Injection-Date: Sun, 05 Jan 2025 17:30:58 +0100 (CET)
Injection-Info: dont-email.me; posting-host="8484d18e4d87a7d264be721074b3dc02";
logging-data="1173047"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RDyIIiS+6OG247VnCnyLb"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:5bbHXO9KyM+FBXDENoqiw9hZMLY=
View all headers

Stefan Claas <pollux@tilde.club> 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.

Ah, because the intermediate pipe is not transparent, and essentially
does the equivalent of 'file post.png' and disallows posting of
"post.png" files that do not return as "post.png: PNG image data, ...".

In which case, you would 'simplify' your 'image encryptor' if it
instead encrypted NetPBM [1] images, and relied upon the NetPBM tools
to convert the result to a PNG (or a GIF, or a 'whatever'). A NetPBM
image is a very short ASCII text header, followed by the raw binary
bitmap data (there is even an older ASCII bitmap data format for NetPBM
if you wanted to use that).

Then, you need:
1) a generic binary encryptor/decryptor
2) a very small utility to wrap/unwrap a NetPBM header onto the binary
data (you would take care of padding to/from a "rectangle" the
binary data here)
3) the NetPBM tools to convert to/from other image formats for actual
posting

I.e., here's a very small (10x10) PNG (created with GIMP, I used
exiftool to remove the 'created with GIMP' comment):

$ ls -l sc.png
-rw-r--r-- 1 110 Jan 5 11:20 sc.png

Here's the xxd encoded version:

$ xxd sc.png
00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR
00000010: 0000 000a 0000 000a 0802 0000 0002 5058 ..............PX
00000020: ea00 0000 0970 4859 7300 002e 2300 002e .....pHYs...#...
00000030: 2301 78a5 3f76 0000 0007 7449 4d45 07e9 #.x.?v....tIME..
00000040: 0105 1013 3242 3f8a 0a00 0000 0d49 4441 ....2B?......IDA
00000050: 5418 d363 6018 05a4 0300 0136 0001 1ad5 T..c`......6....
00000060: 8d17 0000 0000 4945 4e44 ae42 6082 ......IEND.B`.

Convert it to pnm:

$ pngtopam sc.png > sc.ppm

Here is what 'file' reports:

$ file sc.ppm
sc.ppm: Netpbm image data, size = 10 x 10, rawbits, pixmap

And the file is this ASCII header:

P6
10 10
255

followed by 298 ASCII null bytes:

$ xxd sc.ppm
00000000: 5036 0a31 3020 3130 0a32 3535 0a00 0000 P6.10 10.255....
00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000130: 0000 0000 0000 0000 00 .........

It is trivial to "replace" the binary part of the ppm file above with
an encrypted version thereof. Then the 'pamtopng' tool from NetPBM can
be used to convert the 'replaced' image back into a PNG (or GIF or TIFF
or one of numerous other formats, using other pamto or pnmto
converters).

[1] https://netpbm.sourceforge.net/

Note, I've used the Unix CLI tools above for ease of demonstration
purposes. NetPBM is also a library, so you very well may have a go
module for NetPBM available, where you can perform these transforms
from within go by calling the netpbm library rather than needing the
CLI toolset installed.

Subject: Re: xorpng
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 16:36 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 16:36:00 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <vlecdg$13phn$2@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vldk3q$psnq$1@paganini.bofh.team>
Injection-Date: Sun, 05 Jan 2025 17:36:01 +0100 (CET)
Injection-Info: dont-email.me; posting-host="8484d18e4d87a7d264be721074b3dc02";
logging-data="1173047"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Q5vBSnIr2wtxHofdRLbHm"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:6wgck/DwauVCZmUIeujLr+bL4+4=
View all headers

Stefan Claas <pollux@tilde.club> wrote:
> 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.
>
> I.e, first you put data with file2png in a .png and then encrypt it
> to finally post it. I can do this now with my xorpic program, but I
> thought a solution with AES-GCM or XChaCha20+ploy1305 is better.

The "path" I outlined in my previous post, where you utilize the netpbm
image format as your 'intermediary' would allow you to use any generic
encryption routine you like, while also allowing you to convert the
encrypted binary data to/from an image format of your choice (well,
your choice within the set of other formats for which NetPBM has
to/from converters available).

This frees you from having to understand the internal structure of the
various image formats. You just work with the netpbm format (a raw
binary bit/pixel block) for the encrypt/decrypt/padding operations, and
delegate all the "image format" complexity to the netpbm library.

Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 19:50 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 20:50:11 +0100
Organization: To protect and to server
Message-ID: <vlenpl$rjtu$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me>
Mime-Version: 1.0
Injection-Date: Sun, 5 Jan 2025 19:50:13 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="905150"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:Evg7C9kKTxAErCKCBtBCX6rSkGc=
X-Ed25519-Sig: 66d1b6ea01b8c1d9c7d7559fb7a8cdb89edc920df6cd9b87e455efda2a21d89d
a245be3521eb9f8e050a053ef08fff1922ff20fc551b1e8640bedc2867858707
X-Date: It's Sun Sep 11450 08:50:11 PM CET 1993, the September that never ends.
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Notice: Filtered by postfilter v. 0.9.3
View all headers

Rich wrote:
> Stefan Claas <pollux@tilde.club> wrote:
> > 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.
> >
> > I.e, first you put data with file2png in a .png and then encrypt it
> > to finally post it. I can do this now with my xorpic program, but I
> > thought a solution with AES-GCM or XChaCha20+ploy1305 is better.
>
> The "path" I outlined in my previous post, where you utilize the netpbm
> image format as your 'intermediary' would allow you to use any generic
> encryption routine you like, while also allowing you to convert the
> encrypted binary data to/from an image format of your choice (well,
> your choice within the set of other formats for which NetPBM has
> to/from converters available).
>
> This frees you from having to understand the internal structure of the
> various image formats. You just work with the netpbm format (a raw
> binary bit/pixel block) for the encrypt/decrypt/padding operations, and
> delegate all the "image format" complexity to the netpbm library.

Thank you! My ppmenc tool works nicely, here are the test images:

https://jmp.sh/HZM9ML9f

The big problem I face when converting the encryypted image to .png
and back a diff shows a difference and the decryption fails.

Maybe someone can figure out what to do, so that a converted .ppm
can be posted online , for viewers/readers and then can be converted
back to the original .ppm, which shows no difference.

--
Regards
Stefan

Subject: Re: xorpng
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 21:07 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 21:07:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <vles9r$16v92$2@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me> <vlenpl$rjtu$1@paganini.bofh.team>
Injection-Date: Sun, 05 Jan 2025 22:07:08 +0100 (CET)
Injection-Info: dont-email.me; posting-host="8484d18e4d87a7d264be721074b3dc02";
logging-data="1277218"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PhFuMd1HrTPkWFK7m+rbC"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:LBJ0b4XVmORhwnTq9hZ+pmdbHeE=
View all headers

Stefan Claas <pollux@tilde.club> wrote:
> Rich wrote:
>> Stefan Claas <pollux@tilde.club> wrote:
>> > 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.
>> >
>> > I.e, first you put data with file2png in a .png and then encrypt
>> > it to finally post it. I can do this now with my xorpic program,
>> > but I thought a solution with AES-GCM or XChaCha20+ploy1305 is
>> > better.
>>
>> The "path" I outlined in my previous post, where you utilize the
>> netpbm image format as your 'intermediary' would allow you to use
>> any generic encryption routine you like, while also allowing you to
>> convert the encrypted binary data to/from an image format of your
>> choice (well, your choice within the set of other formats for which
>> NetPBM has to/from converters available).
>>
>> This frees you from having to understand the internal structure of
>> the various image formats. You just work with the netpbm format (a
>> raw binary bit/pixel block) for the encrypt/decrypt/padding
>> operations, and delegate all the "image format" complexity to the
>> netpbm library.
>
> Thank you! My ppmenc tool works nicely, here are the test images:
>
> https://jmp.sh/HZM9ML9f
>
> The big problem I face when converting the encryypted image to .png
> and back a diff shows a difference and the decryption fails.
>
> Maybe someone can figure out what to do, so that a converted .ppm can
> be posted online , for viewers/readers and then can be converted back
> to the original .ppm, which shows no difference.

We can't read your mind over Usenet so can you show how you converted
the encrypted image to a png and back.

Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 21:10 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 22:10:36 +0100
Organization: To protect and to server
Message-ID: <vlesgd$rrnh$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me> <vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me>
Mime-Version: 1.0
Injection-Date: Sun, 5 Jan 2025 21:10:37 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="913137"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:PFtRrRSVaDl32bZFBnwAetPnqnQ=
X-Notice: Filtered by postfilter v. 0.9.3
X-Date: It's Sun Sep 11450 10:10:36 PM CET 1993, the September that never ends.
X-Ed25519-Sig: b37a7e9dea6104c35caf987915ada7c77cd385b9e6879decd8ebc6ede6bcb9d7
e437fb6e8b93b0dfd5a7de9a37d16c56b249e176f1398ae010afa401771f8608
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
View all headers

Rich wrote:
> Stefan Claas <pollux@tilde.club> wrote:
> > Rich wrote:
> > > Stefan Claas <pollux@tilde.club> wrote:
> > > > 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.
> > > >
> > > > I.e, first you put data with file2png in a .png and then encrypt
> > > > it to finally post it. I can do this now with my xorpic program,
> > > > but I thought a solution with AES-GCM or XChaCha20+ploy1305 is
> > > > better.
> > >
> > > The "path" I outlined in my previous post, where you utilize the
> > > netpbm image format as your 'intermediary' would allow you to use
> > > any generic encryption routine you like, while also allowing you to
> > > convert the encrypted binary data to/from an image format of your
> > > choice (well, your choice within the set of other formats for which
> > > NetPBM has to/from converters available).
> > >
> > > This frees you from having to understand the internal structure of
> > > the various image formats. You just work with the netpbm format (a
> > > raw binary bit/pixel block) for the encrypt/decrypt/padding
> > > operations, and delegate all the "image format" complexity to the
> > > netpbm library.
> >
> > Thank you! My ppmenc tool works nicely, here are the test images:
> >
> > https://jmp.sh/HZM9ML9f
> >
> > The big problem I face when converting the encryypted image to .png
> > and back a diff shows a difference and the decryption fails.
> >
> > Maybe someone can figure out what to do, so that a converted .ppm can
> > be posted online , for viewers/readers and then can be converted back
> > to the original .ppm, which shows no difference.
>
> We can't read your mind over Usenet so can you show how you converted
> the encrypted image to a png and back.
>

I used Gimp with compression set to 0 and the netbmp tools.

--
Regards
Stefan

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 21:53 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 13:53:15 -0800
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <vlev0b$17khf$1@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vlcu54$o46f$1@dont-email.me> <vldj3j$pqvr$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 22:53:16 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hg56uLBBDNhX29vKYMjFiZfIUbsXJ5mY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KXrC2uysO7zCqqNLiJ7syn/jukY=
In-Reply-To: <vldj3j$pqvr$1@paganini.bofh.team>
Content-Language: en-US
View all headers

On 1/5/2025 1:24 AM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
>> On 1/4/2025 4:21 PM, Stefan Claas 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.
>>>
>>
>> Well, take a good ol' bag o' bytes and turn it into a valid png?
>
> No, encrypt a .png, so that an encrypted noise image comes out.
>

Are you talking about encrypting something A. Taking the resulting
ciphertext B and creating a new png C out of B. The png C will have B a
a visual entity. Now, since C has the ciphertext B in it, we can decrypt
that data back into A.

Is this what you are doing?

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 21:58 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 13:58:16 -0800
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <vlev9p$17khf$2@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlcde8$lb6a$2@dont-email.me> <vlci6q$j921$2@paganini.bofh.team>
<vlcj69$oal1$1@paganini.bofh.team> <vlcurt$o46f$2@dont-email.me>
<vldj9c$pqvr$3@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 22:58:18 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ySu/m6p3KiZIIIPZLua+AN64wNZhOSOo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:INFbXDX59iIYtExYG4U5kQpWLkY=
Content-Language: en-US
In-Reply-To: <vldj9c$pqvr$3@paganini.bofh.team>
View all headers

On 1/5/2025 1:27 AM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
>> On 1/4/2025 4:19 PM, Stefan Claas wrote:
>>> Stefan Claas wrote:
>>>> Chris M. Thomasson wrote:
>>>>> On 1/4/2025 2:10 PM, Stefan Claas wrote:
>>>>>> Chris M. Thomasson wrote:
>>>>>>
>>>>>>> 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/ozDpUBlTAAAJ
>>>>>>>
>>>>>>> When you get really bored! ;^)
>>>>>>
>>>>>> Well, I no longer do Computer Graphics, with formulas, like for fractals
>>>>>> etc. , or 3D CGI and 3D printing. Not sure if I ever will return to that.
>>>>>>
>>>>>> The only interests with graphics is, when it comes to encryption/decryption
>>>>>> images.
>>>>>>
>>>>>
>>>>> Fwiw, do you like stereograms? I created some with some of my depth maps
>>>>> created in GLSL shaders. Can you see this one:
>>>>>
>>>>> https://i.ibb.co/gwHwpFL/image.png
>>>>
>>>> Yes, I can see it.
>>>>
>>>>> I have an idea about them. What about combining an anaglyph with a
>>>>> stereogram such that the observer would need to do the "eye trick" while
>>>>> wearing the red and blue glasses?
>>>>
>>>> I created in 1995, with Photoshop 2.5.1/3.0 a stereo image, which needs
>>>> red/blue glasses. :-) I uploaded it to rarible.com as NFT for 50 ETH,
>>>> but it is no longer there, nor on my harddrive. :-( It looked really
>>>> really cool and was called ORIGAMI.
>>>
>>> Well,I found it on rarible.com, sorry my mistake.
>>>
>>> <https://rarible.com/token/0xc9154424b823b10579895ccbe442d41b9abd96ed:33722708843760813648285509687083650090679594480478541226033658120821450735646>
>>>
>>> use the maginfying glass to see the original size and use red/blues glasses
>>> to see the effect. :-)
>>>
>>
>> :^) I found one of my older anaglyphs I knew I posted before. the left
>> hand side should seem to project "into" the screen, and the right one
>> out of it. Can you see with with your red and blue goggles? glasses,
>> lol. ;^) I had to use two cameras in my scene to do this. One for each
>> eye of the observer.
>>
>> https://i.ibb.co/qm3jg4z/image.png
>>
>> https://www.facebook.com/photo/?fbid=135603427598664&set=pcb.135603700931970
>
> I can not find my glasses. It's been many years since I have used them.
>

Shit happens! :^) For some damn reason I have mine right by my computer.
Strange in a sense. ;^)

Now, think of viewing a "special" stereogram that takes the "special"
depth map's red and blue color channels into account. I think that
viewing the stereogram/anaglyph hybrid thing would simply have to
involve the observer doing the eye thing _while_ wearing the glasses.
Afaict, it should be able to work. I think so.

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:02 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:02:24 -0800
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <vlevhg$17khf$3@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vlcu54$o46f$1@dont-email.me> <vldj3j$pqvr$1@paganini.bofh.team>
<vlev0b$17khf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:02:25 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6rQAG2v0BqyncteJGdZt9EfFw5rAkdLQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Z6Um75+6NoJ0n8bxbIpntbjK6Ws=
In-Reply-To: <vlev0b$17khf$1@dont-email.me>
Content-Language: en-US
View all headers

On 1/5/2025 1:53 PM, Chris M. Thomasson wrote:
> On 1/5/2025 1:24 AM, Stefan Claas wrote:
>> Chris M. Thomasson wrote:
>>> On 1/4/2025 4:21 PM, Stefan Claas 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.
>>>>
>>>
>>> Well, take a good ol' bag o' bytes and turn it into a valid png?
>>
>> No, encrypt a .png, so that an encrypted noise image comes out.
>>
>
> Are you talking about encrypting something A. Taking the resulting
> ciphertext B and creating a new png C out of B. The png C will have B a
> a visual entity. Now, since C has the ciphertext B in it, we can decrypt
> that data back into A.
>
> Is this what you are doing?

We can send C (the png) out as an "image file" that holds B (the
ciphertext) as a "payload"?

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:06 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:06:57 -0800
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <vlevq2$17khf$4@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:06:58 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180ag6vGvI3dOtmr0k21VExwwjMLUTp5RQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:RMBKNFV2iPfi/ZqI8SXMjoiBGMw=
In-Reply-To: <vldj6q$pqvr$2@paganini.bofh.team>
Content-Language: en-US
View all headers

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...

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:14 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:14:08 -0800
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <vlf07h$17khf$5@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vlevq2$17khf$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:14:09 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HSrYX0gIMXupBbsIhqg84Z20367qh3M8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JfDzgSCIm9eC+cHg434L6CL/XuU=
In-Reply-To: <vlevq2$17khf$4@dont-email.me>
Content-Language: en-US
View all headers

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.

http://fractallife247.com/test/hmac_cipher/ver_0_0_0_1?ct_hmac_cipher=c9c49b1249a44477e49375ec6a2e1b13c915cd521ba7d47ec4a1f34c678cf052f096b01afbfc67527a2d5388ddfa757ab4264c2b07bbe052f70880e9b00a60b18877c0ea0c9979d453c4c72584f0283d899864

Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 22:18 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 23:18:10 +0100
Organization: To protect and to server
Message-ID: <vlf0f4$s1t0$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me> <vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vlevq2$17khf$4@dont-email.me> <vlf07h$17khf$5@dont-email.me>
Mime-Version: 1.0
Injection-Date: Sun, 5 Jan 2025 22:18:12 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="919456"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:lJmeHWE8EPCQSR9z9l6t/s/TJ8o=
X-Notice: Filtered by postfilter v. 0.9.3
X-Date: It's Sun Sep 11450 11:18:11 PM CET 1993, the September that never ends.
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Ed25519-Sig: c540969e7cd7c111194b97c5af0af53ec05e8e502c388a00b3f90a08ffdd1c2a
f72dd1a6aefbdb7cb49fc60e598a8251bff72da3d2df3a2d48ee1761b1bc8f08
View all headers

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.

--
Regards
Stefan

Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 22:21 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 23:21:48 +0100
Organization: To protect and to server
Message-ID: <vlf0lu$s1t0$2@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me> <vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me> <vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vlcu54$o46f$1@dont-email.me> <vldj3j$pqvr$1@paganini.bofh.team> <vlev0b$17khf$1@dont-email.me>
Mime-Version: 1.0
Injection-Date: Sun, 5 Jan 2025 22:21:50 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="919456"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:cuCVhrd3aLn02zyx3JhvKJKwsxA=
X-Date: It's Sun Sep 11450 11:21:48 PM CET 1993, the September that never ends.
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Ed25519-Sig: 0649c8f0abfe2d7862dab49ec8510ea43447a01f77d1a1d9b474d20d3d9068fe
5d156049a6253a15fc549dd8fcc68535bd2680f492e27a4f7f5afb2823c8b50e
X-Notice: Filtered by postfilter v. 0.9.3
View all headers

Chris M. Thomasson wrote:
> On 1/5/2025 1:24 AM, Stefan Claas wrote:
> > Chris M. Thomasson wrote:
> > > On 1/4/2025 4:21 PM, Stefan Claas 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.
> > > >
> > >
> > > Well, take a good ol' bag o' bytes and turn it into a valid png?
> >
> > No, encrypt a .png, so that an encrypted noise image comes out.
> >
>
> Are you talking about encrypting something A. Taking the resulting
> ciphertext B and creating a new png C out of B. The png C will have B a
> a visual entity. Now, since C has the ciphertext B in it, we can decrypt
> that data back into A.
>
> Is this what you are doing?

I am talking about .png image encryption. I got it working for ppm (P6)
files, so that when you have created with Gimp a ppm (raw) file it will
then be encrypted with a password and salt and results in a noise image.

Have you not seen my online folder with the example ... ???

--
Regards
Stefan

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:33 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:33:17 -0800
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <vlf1be$17khf$8@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vlcu54$o46f$1@dont-email.me> <vldj3j$pqvr$1@paganini.bofh.team>
<vlev0b$17khf$1@dont-email.me> <vlf0lu$s1t0$2@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:33:18 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Y8/ZrFn/ZlwLVMoLFKu8waqjYIuAlPyo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ZAcpojQ5lQxO4ynKWMTKHz9Uwzk=
Content-Language: en-US
In-Reply-To: <vlf0lu$s1t0$2@paganini.bofh.team>
View all headers

On 1/5/2025 2:21 PM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
>> On 1/5/2025 1:24 AM, Stefan Claas wrote:
>>> Chris M. Thomasson wrote:
>>>> On 1/4/2025 4:21 PM, Stefan Claas 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.
>>>>>
>>>>
>>>> Well, take a good ol' bag o' bytes and turn it into a valid png?
>>>
>>> No, encrypt a .png, so that an encrypted noise image comes out.
>>>
>>
>> Are you talking about encrypting something A. Taking the resulting
>> ciphertext B and creating a new png C out of B. The png C will have B a
>> a visual entity. Now, since C has the ciphertext B in it, we can decrypt
>> that data back into A.
>>
>> Is this what you are doing?
>
> I am talking about .png image encryption. I got it working for ppm (P6)
> files, so that when you have created with Gimp a ppm (raw) file it will
> then be encrypted with a password and salt and results in a noise image.
>
> Have you not seen my online folder with the example ... ???
>

The PPM still needs it proper format to be a, as you say, noise image?

I have worked a lot with PPM's. Keep in mind that storing ciphertext for
any file, even the original PPM, JPG, ect, can be stored in another PPM
for sure. So, the resulting PPM will have the payload of any file,
another PPM, no problem. Then we can look at the payload as an image on
the screen.

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:35 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:35:29 -0800
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <vlf1fi$17khf$9@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vlevq2$17khf$4@dont-email.me> <vlf07h$17khf$5@dont-email.me>
<vlf0f4$s1t0$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:35:30 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180gZoIo7xt3A7kNHGHgljbLzlRKNmDoMg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:LqH5kElUZDtlgAttj4cZdQl4ApI=
In-Reply-To: <vlf0f4$s1t0$1@paganini.bofh.team>
Content-Language: en-US
View all headers

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...

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:37 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:37:01 -0800
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <vlf1ie$17khf$10@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vlevq2$17khf$4@dont-email.me> <vlf07h$17khf$5@dont-email.me>
<vlf0f4$s1t0$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:37:03 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1298991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Vdo3DpBzsvswSc8nti7MYnkg8PiqTf+I="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:24c+N7q3X6WOaG1r7x6JShcj55Q=
In-Reply-To: <vlf0f4$s1t0$1@paganini.bofh.team>
Content-Language: en-US
View all headers

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.
>

I should actually join X and see if it allows me to post my ciphertext
links... FB works so far.

Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 22:40 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 23:40:50 +0100
Organization: To protect and to server
Message-ID: <vlf1pk$s3d3$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me> <vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me> <vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me> <vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vlcu54$o46f$1@dont-email.me> <vldj3j$pqvr$1@paganini.bofh.team> <vlev0b$17khf$1@dont-email.me> <vlf0lu$s1t0$2@paganini.bofh.team> <vlf1be$17khf$8@dont-email.me>
Mime-Version: 1.0
Injection-Date: Sun, 5 Jan 2025 22:40:52 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="920995"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:XvucRAya2TvqWvnh58xPT9fpez0=
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Notice: Filtered by postfilter v. 0.9.3
X-Ed25519-Sig: 6880c90854932018adeaceb5203874b0f40647174e39dd854d382006740a46c9
8807c4028c5e9172e957158f9c827e598a0f97eb9726305f0c89aa62c72ecc04
X-Date: It's Sun Sep 11450 11:40:50 PM CET 1993, the September that never ends.
View all headers

Chris M. Thomasson wrote:
> On 1/5/2025 2:21 PM, Stefan Claas wrote:
> > Chris M. Thomasson wrote:
> > > On 1/5/2025 1:24 AM, Stefan Claas wrote:
> > > > Chris M. Thomasson wrote:
> > > > > On 1/4/2025 4:21 PM, Stefan Claas 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.
> > > > > >
> > > > >
> > > > > Well, take a good ol' bag o' bytes and turn it into a valid png?
> > > >
> > > > No, encrypt a .png, so that an encrypted noise image comes out.
> > > >
> > >
> > > Are you talking about encrypting something A. Taking the resulting
> > > ciphertext B and creating a new png C out of B. The png C will have B a
> > > a visual entity. Now, since C has the ciphertext B in it, we can decrypt
> > > that data back into A.
> > >
> > > Is this what you are doing?
> >
> > I am talking about .png image encryption. I got it working for ppm (P6)
> > files, so that when you have created with Gimp a ppm (raw) file it will
> > then be encrypted with a password and salt and results in a noise image.
> >
> > Have you not seen my online folder with the example ... ???
> >
>
> The PPM still needs it proper format to be a, as you say, noise image?

Are you not reading the complete thread, in which I have replied to Rich?
> I have worked a lot with PPM's. Keep in mind that storing ciphertext for
> any file, even the original PPM, JPG, ect, can be stored in another PPM
> for sure. So, the resulting PPM will have the payload of any file,
> another PPM, no problem. Then we can look at the payload as an image on
> the screen.

Arrgh ... I am not talking about ciphertext or payload, I am talking about
*Image Encryption*! I had that already in the mid 90s as Photoshop plug-in,
from Japan.

--
Regards
Stefan

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:45 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:45:45 -0800
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <vlf22q$17vsk$4@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vl7ivj$3k1t8$1@dont-email.me>
<vl8urh$8hto$1@paganini.bofh.team> <vl9mkg$3796$5@dont-email.me>
<vlbtbm$i8qt$1@paganini.bofh.team> <vlc7ia$k8so$5@dont-email.me>
<vlc80o$ipdu$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vlcu54$o46f$1@dont-email.me> <vldj3j$pqvr$1@paganini.bofh.team>
<vlev0b$17khf$1@dont-email.me> <vlf0lu$s1t0$2@paganini.bofh.team>
<vlf1be$17khf$8@dont-email.me> <vlf1pk$s3d3$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:45:47 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1310612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uxVMuJ2dTMqaH5CHRWUeN7P2wptSCcp0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:lj0VCTxzj6pbGZUIiQFoEihSGIY=
In-Reply-To: <vlf1pk$s3d3$1@paganini.bofh.team>
Content-Language: en-US
View all headers

On 1/5/2025 2:40 PM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
>> On 1/5/2025 2:21 PM, Stefan Claas wrote:
>>> Chris M. Thomasson wrote:
>>>> On 1/5/2025 1:24 AM, Stefan Claas wrote:
>>>>> Chris M. Thomasson wrote:
>>>>>> On 1/4/2025 4:21 PM, Stefan Claas 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.
>>>>>>>
>>>>>>
>>>>>> Well, take a good ol' bag o' bytes and turn it into a valid png?
>>>>>
>>>>> No, encrypt a .png, so that an encrypted noise image comes out.
>>>>>
>>>>
>>>> Are you talking about encrypting something A. Taking the resulting
>>>> ciphertext B and creating a new png C out of B. The png C will have B a
>>>> a visual entity. Now, since C has the ciphertext B in it, we can decrypt
>>>> that data back into A.
>>>>
>>>> Is this what you are doing?
>>>
>>> I am talking about .png image encryption. I got it working for ppm (P6)
>>> files, so that when you have created with Gimp a ppm (raw) file it will
>>> then be encrypted with a password and salt and results in a noise image.
>>>
>>> Have you not seen my online folder with the example ... ???
>>>
>>
>> The PPM still needs it proper format to be a, as you say, noise image?
>
> Are you not reading the complete thread, in which I have replied to Rich?
>
>> I have worked a lot with PPM's. Keep in mind that storing ciphertext for
>> any file, even the original PPM, JPG, ect, can be stored in another PPM
>> for sure. So, the resulting PPM will have the payload of any file,
>> another PPM, no problem. Then we can look at the payload as an image on
>> the screen.
>
> Arrgh ... I am not talking about ciphertext or payload, I am talking about
> *Image Encryption*! I had that already in the mid 90s as Photoshop plug-in,
> from Japan.
>

Sorry. When I think of image encryption, it still makes me think of Tux.

Then we can think of an image of the letter A. We send an image of X,
and say the key is X = A. I am sorry for missing your main point.

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:48 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:48:12 -0800
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <vlf27d$17vsk$5@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me>
<vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me>
<vlesgd$rrnh$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 05 Jan 2025 23:48:13 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1310612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18esXwj3g5kStgiunwbsa8sAI/Gwg4yMIw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hP0rRRcEIBjQe/I2TpjMGKsLzG4=
In-Reply-To: <vlesgd$rrnh$1@paganini.bofh.team>
Content-Language: en-US
View all headers

On 1/5/2025 1:10 PM, Stefan Claas wrote:
> Rich wrote:
>> Stefan Claas <pollux@tilde.club> wrote:
>>> Rich wrote:
>>>> Stefan Claas <pollux@tilde.club> wrote:
>>>>> 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.
>>>>>
>>>>> I.e, first you put data with file2png in a .png and then encrypt
>>>>> it to finally post it. I can do this now with my xorpic program,
>>>>> but I thought a solution with AES-GCM or XChaCha20+ploy1305 is
>>>>> better.
>>>>
>>>> The "path" I outlined in my previous post, where you utilize the
>>>> netpbm image format as your 'intermediary' would allow you to use
>>>> any generic encryption routine you like, while also allowing you to
>>>> convert the encrypted binary data to/from an image format of your
>>>> choice (well, your choice within the set of other formats for which
>>>> NetPBM has to/from converters available).
>>>>
>>>> This frees you from having to understand the internal structure of
>>>> the various image formats. You just work with the netpbm format (a
>>>> raw binary bit/pixel block) for the encrypt/decrypt/padding
>>>> operations, and delegate all the "image format" complexity to the
>>>> netpbm library.
>>>
>>> Thank you! My ppmenc tool works nicely, here are the test images:
>>>
>>> https://jmp.sh/HZM9ML9f
>>>
>>> The big problem I face when converting the encryypted image to .png
>>> and back a diff shows a difference and the decryption fails.
>>>
>>> Maybe someone can figure out what to do, so that a converted .ppm can
>>> be posted online , for viewers/readers and then can be converted back
>>> to the original .ppm, which shows no difference.
>>
>> We can't read your mind over Usenet so can you show how you converted
>> the encrypted image to a png and back.
>>
>
> I used Gimp with compression set to 0 and the netbmp tools.
>

You should write your own program for it. The Gimp altered some bytes,
right?

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 22:50 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 14:50:53 -0800
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <vlf2cd$17vsk$6@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me>
<vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me>
<vlesgd$rrnh$1@paganini.bofh.team> <vlf27d$17vsk$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 05 Jan 2025 23:50:54 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a9b3b8b2325ec9f2ae161f5c632ce0f";
logging-data="1310612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194Kg9UMUFBmakcN0IRoiDB32VaN6FISCQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:RaOE09onatM2TWAodxH8pFcGhiI=
In-Reply-To: <vlf27d$17vsk$5@dont-email.me>
Content-Language: en-US
View all headers

On 1/5/2025 2:48 PM, Chris M. Thomasson wrote:
> On 1/5/2025 1:10 PM, Stefan Claas wrote:
>> Rich wrote:
>>> Stefan Claas <pollux@tilde.club> wrote:
>>>> Rich wrote:
>>>>> Stefan Claas <pollux@tilde.club> wrote:
>>>>>> 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.
>>>>>>
>>>>>> I.e, first you put data with file2png in a .png and then encrypt
>>>>>> it to finally post it.  I can do this now with my xorpic program,
>>>>>> but I thought a solution with AES-GCM or XChaCha20+ploy1305 is
>>>>>> better.
>>>>>
>>>>> The "path" I outlined in my previous post, where you utilize the
>>>>> netpbm image format as your 'intermediary' would allow you to use
>>>>> any generic encryption routine you like, while also allowing you to
>>>>> convert the encrypted binary data to/from an image format of your
>>>>> choice (well, your choice within the set of other formats for which
>>>>> NetPBM has to/from converters available).
>>>>>
>>>>> This frees you from having to understand the internal structure of
>>>>> the various image formats.  You just work with the netpbm format (a
>>>>> raw binary bit/pixel block) for the encrypt/decrypt/padding
>>>>> operations, and delegate all the "image format" complexity to the
>>>>> netpbm library.
>>>>
>>>> Thank you!  My ppmenc tool works nicely, here are the test images:
>>>>
>>>> https://jmp.sh/HZM9ML9f
>>>>
>>>> The big problem I face when converting the encryypted image to .png
>>>> and back a diff shows a difference and the decryption fails.
>>>>
>>>> Maybe someone can figure out what to do, so that a converted .ppm can
>>>> be posted online , for viewers/readers and then can be converted back
>>>> to the original .ppm, which shows no difference.
>>>
>>> We can't read your mind over Usenet so can you show how you converted
>>> the encrypted image to a png and back.
>>>
>>
>> I used Gimp with compression set to 0 and the netbmp tools.
>>
>
> You should write your own program for it. The Gimp altered some bytes,
> right?

Fwiw, the Cairo lib is fairly nice, well, to me at least... I use it a
lot for my 2d work. it allows you to gain access to the raw underlying
buffer. So, I can create PNG's with payloads that are intact.

Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Sun, 5 Jan 2025 23:06 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Mon, 6 Jan 2025 00:06:36 +0100
Organization: To protect and to server
Message-ID: <vlf3ae$s6de$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me> <vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me> <vlesgd$rrnh$1@paganini.bofh.team> <vlf27d$17vsk$5@dont-email.me> <vlf2cd$17vsk$6@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 5 Jan 2025 23:06:54 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="924078"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:Tinx2G84/yGrw+TdmO6H5ws8b18=
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Notice: Filtered by postfilter v. 0.9.3
X-Date: It's Mon Sep 11451 12:06:36 AM CET 1993, the September that never ends.
X-Ed25519-Sig: cc8e22a04feb59be2c9026e96daf78e4b93c39b38945133d4b35edc9eff47d8f
0b80d8ecfe7249aa7069dbc9c9e7e524284e23891eda606512f9c852a937400e
View all headers

Chris M. Thomasson wrote:
> On 1/5/2025 2:48 PM, Chris M. Thomasson wrote:
> > On 1/5/2025 1:10 PM, Stefan Claas wrote:
> > > Rich wrote:
> > > > Stefan Claas <pollux@tilde.club> wrote:
> > > > > Rich wrote:
> > > > > > Stefan Claas <pollux@tilde.club> wrote:
> > > > > > > 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.
> > > > > > >
> > > > > > > I.e, first you put data with file2png in a .png and then encrypt
> > > > > > > it to finally post it.  I can do this now with my xorpic program,
> > > > > > > but I thought a solution with AES-GCM or XChaCha20+ploy1305 is
> > > > > > > better.
> > > > > >
> > > > > > The "path" I outlined in my previous post, where you utilize the
> > > > > > netpbm image format as your 'intermediary' would allow you to use
> > > > > > any generic encryption routine you like, while also allowing you to
> > > > > > convert the encrypted binary data to/from an image format of your
> > > > > > choice (well, your choice within the set of other formats for which
> > > > > > NetPBM has to/from converters available).
> > > > > >
> > > > > > This frees you from having to understand the internal structure of
> > > > > > the various image formats.  You just work with the netpbm format (a
> > > > > > raw binary bit/pixel block) for the encrypt/decrypt/padding
> > > > > > operations, and delegate all the "image format" complexity to the
> > > > > > netpbm library.
> > > > >
> > > > > Thank you!  My ppmenc tool works nicely, here are the test images:
> > > > >
> > > > > https://jmp.sh/HZM9ML9f
> > > > >
> > > > > The big problem I face when converting the encryypted image to .png
> > > > > and back a diff shows a difference and the decryption fails.
> > > > >
> > > > > Maybe someone can figure out what to do, so that a converted .ppm can
> > > > > be posted online , for viewers/readers and then can be converted back
> > > > > to the original .ppm, which shows no difference.
> > > >
> > > > We can't read your mind over Usenet so can you show how you converted
> > > > the encrypted image to a png and back.
> > > >
> > >
> > > I used Gimp with compression set to 0 and the netbmp tools.
> > >
> >
> > You should write your own program for it. The Gimp altered some bytes,
> > right?
>
> Fwiw, the Cairo lib is fairly nice, well, to me at least... I use it a
> lot for my 2d work. it allows you to gain access to the raw underlying
> buffer. So, I can create PNG's with payloads that are intact.

Ok, here is the deal ... I have file2png (Go and Python3) which converts
any (encrypted) payload to valid noise .png images and back. I have xorpng
in Go which can create .png keys of random noise (crypto/rand) and xor
then .png images with them, to create encrypted noise images. I have ppmenc
in Go which encrypts ppm (P6) images to noise images. What I can not work
out is to convert a ppm to .png and back to the *original* .ppm (P6) file,
because .png with programs used or the Go library alter the conversion,
back to .ppm (P6). I tried many things and always failed.

*Please* try to write a .ppm (P6) to .png converter (and back) in C(++)
and see if you can get the *original* data back. The sci.crypt community
and me of course would appreciate your help very much!

--
Regards
Stefan

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 23:14 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 15:14:07 -0800
Organization: A noiseless patient Spider
Lines: 559
Message-ID: <vlf3nv$18h0m$1@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me>
<vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me>
<vlesgd$rrnh$1@paganini.bofh.team> <vlf27d$17vsk$5@dont-email.me>
<vlf2cd$17vsk$6@dont-email.me> <vlf3ae$s6de$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 06 Jan 2025 00:14:09 +0100 (CET)
Injection-Info: dont-email.me; posting-host="4f498e3dd7b2f539b15c36783567d08a";
logging-data="1328150"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZO5BMEhv9uSRgxCp2VQF89PWwOzLxMbU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:8lzGvSlS6mx57DgOReKbufuyghI=
In-Reply-To: <vlf3ae$s6de$1@paganini.bofh.team>
Content-Language: en-US
View all headers

On 1/5/2025 3:06 PM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
>> On 1/5/2025 2:48 PM, Chris M. Thomasson wrote:
>>> On 1/5/2025 1:10 PM, Stefan Claas wrote:
>>>> Rich wrote:
>>>>> Stefan Claas <pollux@tilde.club> wrote:
>>>>>> Rich wrote:
>>>>>>> Stefan Claas <pollux@tilde.club> wrote:
>>>>>>>> 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.
>>>>>>>>
>>>>>>>> I.e, first you put data with file2png in a .png and then encrypt
>>>>>>>> it to finally post it.  I can do this now with my xorpic program,
>>>>>>>> but I thought a solution with AES-GCM or XChaCha20+ploy1305 is
>>>>>>>> better.
>>>>>>>
>>>>>>> The "path" I outlined in my previous post, where you utilize the
>>>>>>> netpbm image format as your 'intermediary' would allow you to use
>>>>>>> any generic encryption routine you like, while also allowing you to
>>>>>>> convert the encrypted binary data to/from an image format of your
>>>>>>> choice (well, your choice within the set of other formats for which
>>>>>>> NetPBM has to/from converters available).
>>>>>>>
>>>>>>> This frees you from having to understand the internal structure of
>>>>>>> the various image formats.  You just work with the netpbm format (a
>>>>>>> raw binary bit/pixel block) for the encrypt/decrypt/padding
>>>>>>> operations, and delegate all the "image format" complexity to the
>>>>>>> netpbm library.
>>>>>>
>>>>>> Thank you!  My ppmenc tool works nicely, here are the test images:
>>>>>>
>>>>>> https://jmp.sh/HZM9ML9f
>>>>>>
>>>>>> The big problem I face when converting the encryypted image to .png
>>>>>> and back a diff shows a difference and the decryption fails.
>>>>>>
>>>>>> Maybe someone can figure out what to do, so that a converted .ppm can
>>>>>> be posted online , for viewers/readers and then can be converted back
>>>>>> to the original .ppm, which shows no difference.
>>>>>
>>>>> We can't read your mind over Usenet so can you show how you converted
>>>>> the encrypted image to a png and back.
>>>>>
>>>>
>>>> I used Gimp with compression set to 0 and the netbmp tools.
>>>>
>>>
>>> You should write your own program for it. The Gimp altered some bytes,
>>> right?
>>
>> Fwiw, the Cairo lib is fairly nice, well, to me at least... I use it a
>> lot for my 2d work. it allows you to gain access to the raw underlying
>> buffer. So, I can create PNG's with payloads that are intact.
>
> Ok, here is the deal ... I have file2png (Go and Python3) which converts
> any (encrypted) payload to valid noise .png images and back. I have xorpng
> in Go which can create .png keys of random noise (crypto/rand) and xor
> then .png images with them, to create encrypted noise images. I have ppmenc
> in Go which encrypts ppm (P6) images to noise images. What I can not work
> out is to convert a ppm to .png and back to the *original* .ppm (P6) file,
> because .png with programs used or the Go library alter the conversion,
> back to .ppm (P6). I tried many things and always failed.
>
> *Please* try to write a .ppm (P6) to .png converter (and back) in C(++)
> and see if you can get the *original* data back. The sci.crypt community
> and me of course would appreciate your help very much!
>

I can, but I am busy with other things. I wrote a PPM reader a long time
ago. decades. Just parse the PPM (P6) format. Here is a program I wrote
in C that stores PPM's as a series of slices for a 3d volumetric object.
The ct_canvas_save_ppm creates a PPM. The fun part is that the image
stack is a volumetric object that can even be made into a hologram.

_______________________

/*
A Simple 2d Plane For Owen, with proper aspect ratios!
Color adder, single channel
By: Chris M. Thomasson
*_____________________________________________________________*/

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <complex.h>
#include <tgmath.h>
#include <stdbool.h>

#define CT_WIDTH 1920
#define CT_HEIGHT 1080
#define CT_N 10000000

struct ct_rgb
{ unsigned char r;
unsigned char g;
unsigned char b;
};

struct ct_canvas
{ unsigned long width;
unsigned long height;
//unsigned char* buf;
struct ct_rgb* buf;
};

bool
ct_canvas_create(
struct ct_canvas* const self,
unsigned long width,
unsigned long height
){
size_t size = width * height * sizeof(*self->buf);

self->buf = calloc(1, size);

if (self->buf)
{
self->width = width;
self->height = height;

return true;
}

return false;
}

void
ct_canvas_destroy(
struct ct_canvas const* const self
){
free(self->buf);
}

bool
ct_canvas_save_ppm(
struct ct_canvas const* const self,
char const* fname
){
FILE* fout = fopen(fname, "wb");

if (fout)
{
// P6 by Bart over on:
//
https://groups.google.com/forum/#!original/comp.lang.c/4196m3Raggs/2moZ67o5EwAJ

char const ppm_head[] =
"P6\n"
"# Chris M. Thomasson Simple 2d Plane ver:0.0.0.0 (pre-alpha)";

fprintf(fout, "%s\n%lu %lu\n%u\n",
ppm_head,
self->width, self->height,
255U);

size_t size = self->width * self->height;

for (size_t i = 0; i < size; ++i)
{
//unsigned int c = self->buf[i];
struct ct_rgb* c = self->buf + i;

fprintf(fout, "%c%c%c", c->r, c->g, c->b);
//fprintf(fout, "%c%c%c", c, 0U, 0U);
}

if (! fclose(fout))
{
return true;
}
}

return false;
}

struct ct_axes
{ double xmin;
double xmax;
double ymin;
double ymax;
};

struct ct_axes
ct_axes_from_point(
double complex z,
double radius
){
struct ct_axes axes = {
creal(z) - radius, creal(z) + radius,
cimag(z) - radius, cimag(z) + radius
};

return axes;
}

struct ct_plane
{ struct ct_axes axes;
double xstep;
double ystep;
};

void
ct_plane_init(
struct ct_plane* const self,
struct ct_axes const* axes,
unsigned long width,
unsigned long height
){
self->axes = *axes;

double awidth = self->axes.xmax - self->axes.xmin;
double aheight = self->axes.ymax - self->axes.ymin;


Click here to read the complete article
Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 23:17 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 15:17:42 -0800
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <vlf3um$18h0m$2@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me>
<vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me>
<vlesgd$rrnh$1@paganini.bofh.team> <vlf27d$17vsk$5@dont-email.me>
<vlf2cd$17vsk$6@dont-email.me> <vlf3ae$s6de$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 06 Jan 2025 00:17:43 +0100 (CET)
Injection-Info: dont-email.me; posting-host="4f498e3dd7b2f539b15c36783567d08a";
logging-data="1328150"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Zz+4cnvZVPRIhNsxlZ/wGkZfvyPypd4k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xeriXvHwO3TfC5hctOcLMkCD9VQ=
Content-Language: en-US
In-Reply-To: <vlf3ae$s6de$1@paganini.bofh.team>
View all headers

On 1/5/2025 3:06 PM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
[...]
> *Please* try to write a .ppm (P6) to .png converter (and back) in C(++)
> and see if you can get the *original* data back. The sci.crypt community
> and me of course would appreciate your help very much!

Still, try this:

Upload a PNG to X and/or FB. Copy the image, download the image from
them after its up on their site. Do a file compare on it wrt your
original source PNG. Are the exactly the same?

Subject: Re: xorpng
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 5 Jan 2025 23:24 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Sun, 5 Jan 2025 15:24:29 -0800
Organization: A noiseless patient Spider
Lines: 552
Message-ID: <vlf4be$18h0m$3@dont-email.me>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me>
<vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team>
<vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team>
<vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team>
<vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team>
<vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team>
<vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me>
<vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me>
<vlesgd$rrnh$1@paganini.bofh.team> <vlf27d$17vsk$5@dont-email.me>
<vlf2cd$17vsk$6@dont-email.me> <vlf3ae$s6de$1@paganini.bofh.team>
<vlf3nv$18h0m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 06 Jan 2025 00:24:31 +0100 (CET)
Injection-Info: dont-email.me; posting-host="4f498e3dd7b2f539b15c36783567d08a";
logging-data="1328150"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yI1VGUtko5RJFcUEzvKlUiVxUkKsgzzc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HQe8aZ4+o8cya7K/CD0RBYxAP5Q=
Content-Language: en-US
In-Reply-To: <vlf3nv$18h0m$1@dont-email.me>
View all headers

On 1/5/2025 3:14 PM, Chris M. Thomasson wrote:
[...]

Ooops, I don't think that is my animation slice code, it just creates a
single frame. This one create multiple slices, or frames of the
volumetric if you will:

ct_anime is the function of interest.

Sorry about that:
____________________________________

/*
Experimental Power Stack Mandelbulb for Owen
By: Chris M. Thomasson
*_____________________________________________________________*/

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <complex.h>
#include <tgmath.h>
#include <stdbool.h>

#define CT_WIDTH 256 // width of plane
#define CT_HEIGHT 256 // height of plane
#define CT_FRAMES 256 // slices of the mbulb
#define CT_ITERS 64 // iterations per pixel

/* The Canvas
___________________________________*/
struct ct_rgb
{ unsigned char r;
unsigned char g;
unsigned char b;
};

struct ct_canvas
{ unsigned long width;
unsigned long height;
struct ct_rgb* buf;
};

bool
ct_canvas_create(
struct ct_canvas* const self,
unsigned long width,
unsigned long height
){
size_t size = width * height * sizeof(*self->buf);

self->buf = calloc(1, size);

if (self->buf)
{
self->width = width;
self->height = height;

return true;
}

return false;
}

void
ct_canvas_destroy(
struct ct_canvas const* const self
){
free(self->buf);
}

bool
ct_canvas_save_ppm(
struct ct_canvas const* const self,
char const* fname
){
FILE* fout = fopen(fname, "wb");

if (fout)
{
char const ppm_head[] =
"P6\n"
"# Chris M. Thomasson Simple 2d Plane ver:0.0.0.0 (pre-alpha)";

fprintf(fout, "%s\n%lu %lu\n%u\n",
ppm_head,
self->width, self->height,
255U);

size_t size = self->width * self->height;

for (size_t i = 0; i < size; ++i)
{
//unsigned int c = self->buf[i];
struct ct_rgb* c = self->buf + i;

fprintf(fout, "%c%c%c", c->r, c->g, c->b);
}

if (! fclose(fout))
{
return true;
}
}

return false;
}

/* The Axes
___________________________________*/
struct ct_axes
{ double xmin;
double xmax;
double ymin;
double ymax;
};

struct ct_axes
ct_axes_from_point(
double complex z,
double radius
){
struct ct_axes axes = {
creal(z) - radius, creal(z) + radius,
cimag(z) - radius, cimag(z) + radius
};

return axes;
}

/* The Plane
___________________________________*/
struct ct_plane
{ struct ct_axes axes;
double xstep;
double ystep;
};

void
ct_plane_init(
struct ct_plane* const self,
struct ct_axes const* axes,
unsigned long width,
unsigned long height
){
self->axes = *axes;

double awidth = self->axes.xmax - self->axes.xmin;
double aheight = self->axes.ymax - self->axes.ymin;

assert(width > 0 && height > 0 && awidth > 0.0);

double daspect = fabs((double)height / width);
double waspect = fabs(aheight / awidth);

if (daspect > waspect)
{
double excess = aheight * (daspect / waspect - 1.0);
self->axes.ymax += excess / 2.0;
self->axes.ymin -= excess / 2.0;
}

else if (daspect < waspect)
{
double excess = awidth * (waspect / daspect - 1.0);
self->axes.xmax += excess / 2.0;
self->axes.xmin -= excess / 2.0;
}

self->xstep = (self->axes.xmax - self->axes.xmin) / width;
self->ystep = (self->axes.ymax - self->axes.ymin) / height;
}

/* The Plot
___________________________________*/
struct ct_plot
{ struct ct_plane plane;
struct ct_canvas* canvas;
};

void
ct_plot_init(
struct ct_plot* const self,
struct ct_axes const* axes,
struct ct_canvas* canvas
){
ct_plane_init(&self->plane, axes, canvas->width - 1, canvas->height
- 1);
self->canvas = canvas;
}

bool
ct_plot_add(
struct ct_plot* const self,
double complex z,
struct ct_rgb const* color
){
long x = (creal(z) - self->plane.axes.xmin) / self->plane.xstep;
long y = (self->plane.axes.ymax - cimag(z)) / self->plane.ystep;

if (x > -1 && x < (long)self->canvas->width &&
y > -1 && y < (long)self->canvas->height)
{
// Now, we can convert to index.
size_t i = x + y * self->canvas->width;

assert(i < self->canvas->height * self->canvas->width);

struct ct_rgb exist = self->canvas->buf[i];

exist.r += 1;

self->canvas->buf[i] = exist;
return true;
}

return true;
}

bool
ct_plot_pixel(
struct ct_plot* const self,
long x,
long y,
struct ct_rgb const* color
){
if (x > -1 && x < (long)self->canvas->width &&
y > -1 && y < (long)self->canvas->height)
{
// Now, we can convert to index.
size_t i = x + y * self->canvas->width;

assert(i < self->canvas->height * self->canvas->width);

self->canvas->buf[i] = *color;
return true;
}

return false;
}

void
ct_plot_clear(
struct ct_plot* const self,
struct ct_rgb const* color
){
size_t size = self->canvas->height * self->canvas->width;

for (size_t i = 0; i < size; ++i)
{
self->canvas->buf[i] = *color;
}
}

double complex
ct_project_to_xy(
struct ct_plot* const self,
long x,
long y
){
double complex p =
(self->plane.axes.xmin + x * self->plane.xstep) +
(self->plane.axes.ymax - y * self->plane.ystep) * I;

return p;
}

bool
ct_plot_point(
struct ct_plot* const self,
double complex z,
struct ct_rgb const* color
){
long x = (creal(z) - self->plane.axes.xmin) / self->plane.xstep;
long y = (self->plane.axes.ymax - cimag(z)) / self->plane.ystep;

if (x > -1 && x < (long)self->canvas->width &&
y > -1 && y < (long)self->canvas->height)
{
// Now, we can convert to index.
size_t i = x + y * self->canvas->width;

assert(i < self->canvas->height * self->canvas->width);

self->canvas->buf[i] = *color;
return true;
}

return false;
}

// slow, so what for now... ;^)
void ct_circle(
struct ct_plot* const plot,
double complex c,
double radius,
unsigned int n
){
double abase = 6.2831853071 / n;

for (unsigned int i = 0; i < n; ++i)
{
double angle = abase * i;

double complex z =
(creal(c) + cos(angle) * radius) +
(cimag(c) + sin(angle) * radius) * I;

struct ct_rgb rgb = { 255, 255, 255 };

ct_plot_point(plot, z, &rgb);
}
}

/* Simple vec3 for just what I need
___________________________________*/
struct ct_vec3
{ double x;
double y;
double z;
};

double ct_vev3_length(
struct ct_vec3 const p
){
double sum = p.x * p.x + p.y * p.y + p.z * p.z;
return sqrt(sum);
}

struct ct_vec3
ct_vec3_add(
struct ct_vec3 const p,
struct ct_vec3 const addend
){
struct ct_vec3 sum = {
p.x + addend.x,
p.y + addend.y,
p.z + addend.z
};

return sum;
}

/* The Power Stack Mandelbulb
___________________________________*/
void
ct_iterate_mbulb_pixel(
struct ct_plot* const plot,
struct ct_vec3 const z0,
struct ct_vec3 const c0,
double power,
long x,
long y,
unsigned int n
){
struct ct_vec3 zs = z0;
struct ct_vec3 cs = c0;

for (unsigned long i = 0; i < n; ++i)
{
double r = ct_vev3_length(zs);
double rpower = pow(r, power);

double angle0 = atan2(zs.z, sqrt(zs.x * zs.x + zs.y * zs.y));
double angle1 = atan2(zs.y, zs.x);

struct ct_vec3 znew;
znew.x = rpower * cos(power * angle1) * cos(power * angle0);
znew.y = rpower * sin(power * angle1) * cos(power * angle0);
znew.z = rpower * sin(power * angle0);


Click here to read the complete article
Subject: Re: xorpng
From: Stefan Claas
Newsgroups: sci.crypt
Organization: To protect and to server
Date: Mon, 6 Jan 2025 00:07 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: xorpng
Date: Mon, 6 Jan 2025 01:07:42 +0100
Organization: To protect and to server
Message-ID: <vlf6se$11ai8$1@paganini.bofh.team>
References: <vl243l$3jkpe$1@paganini.bofh.team> <vlc891$k8s5$2@dont-email.me> <vlc8om$k8s5$3@dont-email.me> <vlc9d8$irra$1@paganini.bofh.team> <vlcahc$ks00$1@dont-email.me> <vlcbki$j00g$1@paganini.bofh.team> <vlccrh$lb6a$1@dont-email.me> <vlchr0$j921$1@paganini.bofh.team> <vlcivh$md8n$2@dont-email.me> <vlcjan$oal1$2@paganini.bofh.team> <vld86b$tdna$1@dont-email.me> <vldj6q$pqvr$2@paganini.bofh.team> <vldk3q$psnq$1@paganini.bofh.team> <vlecdg$13phn$2@dont-email.me> <vlenpl$rjtu$1@paganini.bofh.team> <vles9r$16v92$2@dont-email.me> <vlesgd$rrnh$1@paganini.bofh.team> <vlf27d$17vsk$5@dont-email.me> <vlf2cd$17vsk$6@dont-email.me> <vlf3ae$s6de$1@paganini.bofh.team> <vlf3um$18h0m$2@dont-email.me>
Mime-Version: 1.0
Injection-Date: Mon, 6 Jan 2025 00:07:42 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="1092168"; posting-host="P19FF9OOayxo5XAXCSdPUg.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: flnews/1.3.0pre29 (for GNU/Linux)
Cancel-Lock: sha1:8A6FEnPLFh6L9Qe83k74q8egXxc=
X-Notice: Filtered by postfilter v. 0.9.3
X-Ed25519-Sig: 17c4511b1a5cd276838357565e6b209136969c9e52bb5442e67f82ed3a824333
2f9acf1f12fc2f216da54c482e03085e03f750fe6dab7d65d2298c48e43af802
X-Date: It's Mon Sep 11451 01:07:42 AM CET 1993, the September that never ends.
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
View all headers

Chris M. Thomasson wrote:
> On 1/5/2025 3:06 PM, Stefan Claas wrote:
> > Chris M. Thomasson wrote:
> [...]
> > *Please* try to write a .ppm (P6) to .png converter (and back) in C(++)
> > and see if you can get the *original* data back. The sci.crypt community
> > and me of course would appreciate your help very much!
>
> Still, try this:
>
> Upload a PNG to X and/or FB. Copy the image, download the image from
> them after its up on their site. Do a file compare on it wrt your
> original source PNG. Are the exactly the same?

On X they are the same, once downloaded, which a 'diff' shows. ;-)

--
Regards
Stefan

Pages:1234

rocksolid light 0.9.8
clearnet tor