• Re: xorpng

    From Richard Heathfield@21:1/5 to Rich on Mon Feb 10 00:59:04 2025
    On 05/01/2025 06:17, 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?

    Sorry to come late to the party.

    I can think of two places where image formats can be useful in
    cryptography.

    Firstly, lossless image formats can be used to steganographically
    hide small ciphertexts in the low bits without seriously
    degrading the image.

    Secondly, if you want an eyeball on how tangled your bits are,
    rip off the image's metadata, encrypt the bitmap data, bolt the
    metadata back on, and visually inspect the resulting image and
    look for patterns (or, if you used Tux - of course you did - any
    remnants of penguin).

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Richard Heathfield on Mon Feb 10 02:19:15 2025
    Richard Heathfield <rjh@cpax.org.uk> wrote:
    On 05/01/2025 06:17, 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?

    Sorry to come late to the party.

    I can think of two places where image formats can be useful in
    cryptography.

    Firstly, lossless image formats can be used to steganographically
    hide small ciphertexts in the low bits without seriously
    degrading the image.

    Secondly, if you want an eyeball on how tangled your bits are,
    rip off the image's metadata, encrypt the bitmap data, bolt the
    metadata back on, and visually inspect the resulting image and
    look for patterns (or, if you used Tux - of course you did - any
    remnants of penguin).

    Yes, all useful, and all also trivial to do with the netpbm image
    formats. Pad to a square/rectangular size if need be, slap on two
    lines of text for metadata at the front, then view the image with an
    image viewer.

    Stefan appeared to be making a program that, given an actual working
    PNG image file, would root around in the PNG file format itself, and
    encrypt just the internal bitmap data.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Rich on Mon Feb 10 03:19:34 2025
    On 10/02/2025 02:19, Rich wrote:

    <snip>

    Stefan appeared to be making a program that, given an actual working
    PNG image file, would root around in the PNG file format itself, and
    encrypt just the internal bitmap data.

    Been there, done that, lost the t-shirt, and just found it again
    on a /very/ old drive.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Panteltje@21:1/5 to Heathfield on Mon Feb 10 05:59:19 2025
    On a sunny day (Mon, 10 Feb 2025 00:59:04 +0000) it happened Richard
    Heathfield <rjh@cpax.org.uk> wrote in <vobj0o$t1cd$1@dont-email.me>:

    On 05/01/2025 06:17, 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?

    Sorry to come late to the party.

    I can think of two places where image formats can be useful in
    cryptography.

    Firstly, lossless image formats can be used to steganographically
    hide small ciphertexts in the low bits without seriously
    degrading the image.

    Secondly, if you want an eyeball on how tangled your bits are,
    rip off the image's metadata, encrypt the bitmap data, bolt the
    metadata back on, and visually inspect the resulting image and
    look for patterns (or, if you used Tux - of course you did - any
    remnants of penguin).

    Reading this I got a weird idea:
    what if of you use the 'Alien problem' (discussed here long ago)
    and use picture hight and picture width as the ratio for a simple ASCII message?
    Leave the picture unaltered, use resize...
    Have not tried it though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Chris M. Thomasson on Wed Mar 5 21:18:12 2025
    Chris M. Thomasson wrote:
    On 1/11/2025 4:18 AM, Stefan Claas wrote:
    Chris M. Thomasson wrote:
    On 1/11/2025 2:15 AM, Stefan Claas wrote:
    Stefan Claas wrote:

    To make things simple again, I uploaded pngcrypt, so that one can use file2png with pngcrypt. :-) https://github.com/706f6c6c7578/pngcrypt

    https://jmp.sh/ENeHGh9r

    $ echo "I wish the sci.crypt community a nice weekend!" | file2png | pngcrypt -p test > message.png

    $ pngcrypt -d -p test < message.png | file2png -d
    I wish the sci.crypt community a nice weekend!


    Make a big one, say 3840x2160 encrypting the same byte. See if you can visually see any patterns wrt the encryption algo itself?

    Please try it yourself and report back, or haven't you installed Go yet? ;-)


    Nope. I have no Go on the system I am using now. Well, humm... I should
    have some more time later on this week.

    And did you already installed Go, to try it out?

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)