• Re: [Solution] The lost key (Chris, do not read! :-)

    From Marcel Logen@21:1/5 to All on Sun Jun 1 08:51:44 2025
    Marcel Logen in sci.crypt:

    [...]

    The ciphertext is a decimal number which has to be transformed
    (as Richard wrote here, too, some weeks ago, IIRC) to a 16-bit
    or 256-bit coded plaintext.

    Sorry, a correction:

    Read "16-bit" as "8-bit" (256 values, base 16) and "256-bit"
    as "base 256".

    - subsequently use "bc" for transformation to 16-bit:

    Read "16-bit" as "base 16".

    I. e. transform from base 10 to base 16:

    | cl@pc-731:/tmp$ echo "obase=16;$(cat two)" | BC_LINE_LENGTH=0 bc
    | A353230322F332F373220686A722E2E2E0A0A2E2E2E656E6F64206C6C65570A0A3F7468676972202C676E696874656D6F732073277461687420747562202E2E2E656772656D6520747865747265687069632065687420676E69656573206D6F72662074656720756F79206E6F6974636166736974617320666F20676E696
    C6565662065687420796C6E6F207369202C73616C61202C657A6972702072756F59202E74786574726568706963206568742064657470797263656420796C6C756673736563637573206576616820756F592021534E4F4954414C55544152474E4F43
    | cl@pc-731:/tmp$

    Marcel (Lines: 29)
    --
    ╭──────────╮ ╭───╮ ╭─╮ ╭─╮ ╭─╮ ╭─╮ ..67..
    ╮ ...3..╰───────╮ ╰───╮ ╭─╯ │ │ ╰──╯ ╰────╮ ╭──╯ ╰────╯ │ ╭─╮
    │ ╭────╮ ╭─╮ ╰─╮ ╭─╯ │ ╭──╯ ╭─╯ ..40..╭───╯ ╰─╮ ╭──────╯ │ ╰─╮
    ╰───╯ ╰─╯ ╰────╯ ╰────╯ ╰─────╯ ..40..╰────────╯ ╰────────╯ ╰─

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Marcel Logen on Sun Jun 1 07:59:59 2025
    On 01/06/2025 07:26, Marcel Logen wrote:
    - the text then has only to be reversed

    Curiouser and curiouser!

    I asked ChatGPT to have a look at this, and it too had to reverse
    the text, but...

    I didn't!

    Did the entire universe change endianness while I wasn't looking?

    --
    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 Marcel Logen@21:1/5 to All on Sun Jun 1 09:15:34 2025
    Richard Heathfield in sci.crypt:

    On 01/06/2025 07:26, Marcel Logen wrote:

    - the text then has only to be reversed

    Curiouser and curiouser!

    I asked ChatGPT to have a look at this, and it too had to reverse
    the text, but...

    I didn't!

    Did the entire universe change endianness while I wasn't looking?

    With "dc" the same result here:

    | cl@pc-731:/tmp$ dc -e "$(cat two) P" | hexdump -Cv
    | 00000000 0a 35 32 30 32 2f 33 2f 37 32 20 68 6a 72 2e 2e |.5202/3/72 hjr..|
    | 00000010 2e 0a 0a 2e 2e 2e 65 6e 6f 64 20 6c 6c 65 57 0a |......enod lleW.|
    | 00000020 0a 3f 74 68 67 69 72 20 2c 67 6e 69 68 74 65 6d |.?thgir ,gnihtem|
    | 00000030 6f 73 20 73 27 74 61 68 74 20 74 75 62 20 2e 2e |os s'taht tub ..|
    | 00000040 2e 65 67 72 65 6d 65 20 74 78 65 74 72 65 68 70 |.egreme txetrehp|
    | 00000050 69 63 20 65 68 74 20 67 6e 69 65 65 73 20 6d 6f |ic eht gniees mo|
    | 00000060 72 66 20 74 65 67 20 75 6f 79 20 6e 6f 69 74 63 |rf teg uoy noitc|
    | 00000070 61 66 73 69 74 61 73 20 66 6f 20 67 6e 69 6c 65 |afsitas fo gnile|
    | 00000080 65 66 20 65 68 74 20 79 6c 6e 6f 20 73 69 20 2c |ef eht ylno si ,|
    | 00000090 73 61 6c 61 20 2c 65 7a 69 72 70 20 72 75 6f 59 |sala ,ezirp ruoY|
    | 000000a0 20 2e 74 78 65 74 72 65 68 70 69 63 20 65 68 74 | .txetrehpic eht|
    | 000000b0 20 64 65 74 70 79 72 63 65 64 20 79 6c 6c 75 66 | detpyrced ylluf|
    | 000000c0 73 73 65 63 63 75 73 20 65 76 61 68 20 75 6f 59 |sseccus evah uoY|
    | 000000d0 20 21 53 4e 4f 49 54 41 4c 55 54 41 52 47 4e 4f | !SNOITALUTARGNO|
    | 000000e0 43 |C|
    | 000000e1

    Here the Python3 one-liner:

    | cl@pc-731:/tmp$ dc -e "$(cat two) P" | python3 -c 'import sys;a1=sys.stdin.buffer.read();b2=a1[::-1];print(b2);import hashlib;print(hashlib.md5(b2).hexdigest())'
    | b"CONGRATULATIONS! You have successfully decrypted the ciphertext. Your prize, alas, is only the feeling of satisfaction you get from seeing the ciphertext emerge... but that's something, right?\n\nWell done...\n\n...rjh 27/3/2025\n"
    | 2f682c420d4f5cd443719f33050eac67
    | cl@pc-731:/tmp$

    The "[::-1]" reverses the text.

    Marcel
    --
    Sun Jun 1 09:15:34 2025 CEST (1748762134)
    pc-731
    87 4ix0 c4v4
    Lines: 50

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Logen@21:1/5 to All on Sun Jun 1 11:14:04 2025
    Richard Heathfield in sci.crypt:

    On 01/06/2025 08:15, Marcel Logen wrote:
    Richard Heathfield in sci.crypt:
    On 01/06/2025 07:26, Marcel Logen wrote:

    - the text then has only to be reversed
    [...]
    Mystery solved.

    It turns out that my bignum library (which is little-endian)
    doesn't bother to switch to or from big-endian before file
    operations. In 25 years, this is the first time it's ever mattered.

    Hehe. Interesting.

    Marcel
    --
    Sun Jun 1 11:14:04 2025 CEST (1748769244)
    pc-731
    87 34cj ome1
    Lines: 22

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Marcel Logen on Sun Jun 1 09:54:58 2025
    On 01/06/2025 08:15, Marcel Logen wrote:
    Richard Heathfield in sci.crypt:

    On 01/06/2025 07:26, Marcel Logen wrote:

    - the text then has only to be reversed

    Curiouser and curiouser!

    I asked ChatGPT to have a look at this, and it too had to reverse
    the text, but...

    I didn't!

    Did the entire universe change endianness while I wasn't looking?

    With "dc" the same result here:

    | cl@pc-731:/tmp$ dc -e "$(cat two) P" | hexdump -Cv

    Mystery solved.

    It turns out that my bignum library (which is little-endian)
    doesn't bother to switch to or from big-endian before file
    operations. In 25 years, this is the first time it's ever mattered.

    --
    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 Marcel Logen@21:1/5 to All on Mon Jun 2 16:29:18 2025
    Marcel Logen in sci.crypt:

    [...]

    This data has an odd number of hex digits, so prepend a "0";
    then you can use the Linux tool "xxd" for transformation to
    readable text:

    If you want to use this method for 'encrypting' binary
    data, I would recommend prefixing the data with 0xFF or
    0x80 before encryption - and removing it again after
    decryption.

    | user15@o15:/tmp$ { echo -n 'ibase=16;' && echo '000102030405060708090A0B0C0D0E0F' ; } | BC_LINE_LENGTH=0 bc
    | 5233100606242806050955395731361295

    | user15@o15:/tmp$ { echo 'obase=16' && echo '5233100606242806050955395731361295' ; } | BC_LINE_LENGTH=0 bc
    | 102030405060708090A0B0C0D0E0F

    With 0xFF prepended:

    | user15@o15:/tmp$ { echo -n 'ibase=16;' && echo 'FF000102030405060708090A0B0C0D0E0F' ; } | BC_LINE_LENGTH=0 bc
    | 86772008797939914425966575850496625282575

    | user15@o15:/tmp$ { echo 'obase=16' && echo '86772008797939914425966575850496625282575' ; } | BC_LINE_LENGTH=0 bc
    | FF000102030405060708090A0B0C0D0E0F

    Marcel (Lines: 33)
    --
    ╭───────╮ ╭─╮ ╭───────╮ ╭──────────╮ ..67..
    ╰─╮ ╭─╮ │ ╭──╯ │ ╭─╮ ╰──╮ ╭─╯ ╭─╮ ╰───────╮ ╰─╮..67..
    ╮ ╰─╯ │ ╰─╯ │ │ ╰─────╯ ╰────╮ ╭──╮ │ │ ..50..╭─╮ │ ╭─╯ ╭──
    ╰──────╯ ╰─╯ ..29..╰─────╯ ╰─╯ ╰───────╯ ╰──╯ ╰─────╯

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