News for hackers. Stuff that matters.
Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by why_at on Tuesday April 09, 2024 @04:26PM (#39983866)
To add to this, I solved the first puzzle but I'm not getting the right sha256sum for the answer. It's unclear to me which part of the deciphered text I should be doing the checksum on.

The text says: "here are the checksums for all the solutions to the eighty-nine puzzles", is the solution only the newly readable part, or the whole new text that has been transformed?

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by larryboyko on Tuesday April 09, 2024 @05:57PM (#39984740)
The whole new text that has been transformed.

A little earlier, the editorial instructions read: "These hash values, or checksums [...], were generated by the SHA-256 algorithm -- implementations of which you should easily be able to find and run on your own plaintexts. (By "plaintext", I mean the entire rest of the file, correctly deciphered -- of which, however, only the next chapter will be legible ... until the subsequent decipherment, and so on.)"

Is that helpful?

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by gjm11 on Tuesday April 09, 2024 @04:37PM (#39983986)
You should be (1) deleting everything up to and including "1.#####", then (2) applying the appropriate transformation to what remains. Looking at my code for this step, I see that I removed one newline character at the end of the file before doing everything else, and this apparently yielded the correct result; I didn't do this in subsequent steps.

(I've been playtesting this thing for a while. I'm not all the way through yet.)

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by larryboyko on Tuesday April 09, 2024 @06:00PM (#39984769)
>I see that I removed one newline character at the end of the file

Hm, strange. I don't see, and there shouldn't be, an extraneous newline at the end of the (original) file.

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by gjm11 on Tuesday April 09, 2024 @06:13PM (#39984875)
Interesting: maybe I added it by mistake in a text editor mishap or something :-).
Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by te on Wednesday April 10, 2024 @03:17AM (#39987868)
Hmmm. The original, in fact, does NOT have the 0x0a at the end of the file; however, in process of deleting first part of file up through and including "1.#####", my linux command line tools (or vim?) added one there (unbeknownst to me at the time). I proceeded to solve first puzzle with the 0x0a there at the end in the head-shortened ciphertext, and I got readable plaintext, but my sha256sum does not match yours. If I remove the 0x0a, I get neither readable plaintext nor a matching sha256sum.

(btw, love this project, thanks for sharing it)

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by gjm11 on Wednesday April 10, 2024 @06:44AM (#39989192)
Dunno if it's helpful for diagnosis, but my 01.txt that yields the expected sha256 sum ...

... is 0x3E1051 bytes long

... starts with <<Congratulations>>, as you already knew it should

... ends with <<IX%7M3+]vW7+zB]{\>>

(It couldn't be line-ending issues, could it? Do you have any 0x0D bytes?)

And, just in case it helps, my original text file (before stripping everything up to 1.#####, and _without_ the spurious 0x0A byte) is 0x3E404D bytes long and ends with << vhuY!niauago>>.

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by larryboyko on Wednesday April 10, 2024 @01:44PM (#39993594)
Hm. My 01.txt that yields the expected SHA256 sum of a2e617919bc0b981a4f9bb8470ed37d189958e4c5b167e58b417a84c29a66c29

is:

... 0x3e1175 bytes long

... starts with «Congratulations!»

... ends with «ZO?-m[FmGp-+;KM»

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by gjm11 on Wednesday April 10, 2024 @03:35PM (#39994877)
Am I working with an older version of the file or something, perhaps? My copy of the initial file says:

01: 851fa86ed725c26b712ca1218cdec5782259240e403166c5c6c379b22656290b

and that's the sha256sum of my 01.txt .

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by gjm11 on Wednesday April 10, 2024 @05:08PM (#39995743)
(I bet I am working with an older version -- I ran across an error in one of the puzzles, and presumably you've fixed that now.)
Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by larryboyko on Wednesday April 10, 2024 @10:56PM (#39997979)
Ah ha! That's an older version alright.

Latest at https://github.com/larryboyko/dimityjones/blob/main/DimityJo...

(I hope I've fixed the error ...!)

Re:Show HN: Dimity Jones in Puzzle Castle: An Electronic Esc... by larryboyko on Wednesday April 10, 2024 @01:31PM (#39993437)
This is odd! We can visually troubleshoot this, and see that the first characters following 1.##### are «Cnrtltos » and the final characters at the end of the (original) file are «!niauago». Taking [SPOILER] alternately the first of the first and the last of the last gives us C, o, n, g, r, a, t, u, l, a, t, i, o, n, s, !. If there is an extraneous character inserted at the end, e.g. a newline, the transformation should be spoiled and illegible: C, newline, n, o, r, g, t, a, l, u, t, a, o, i, s, n, space, !.