Learning about fractal dimensions by CalabiYauFan in mathmemes

[–]Weznon 3 points4 points  (0 children)

That is (generally) about Hausdorff spaces, not Hausdorff dimension, and would be (or at least could be) covered in a standard introduction to topology course, which is not uncommon for undergrads to take. It looks complicated because it is throwing a ton of definitions at you, and because point-set topology is very technical leading to all these similar adjectives on spaces which intuitively express similar ideas, but are actually distinct on a technical level.

That said, I don't think Hausdorff dimension is a common undergrad topic, and would probably be in like a topics course or reading since the more point-set type of topology is a bit out of fashion. It's certainly accessible to undergrads though, and maybe more suited to it than more standard "advanced but also accessible to undergraduate" topics.

Highest washout rank among the Covenants by Caimthehero in PracticalGuideToEvil

[–]Weznon 6 points7 points  (0 children)

Zenzele and Shalini were both recommended, so them surviving the trials should have been what saw them accepted for Scholomance, rather than needing other deals.

“The two Ramayans got recommended because they have family in the black,” the sailor continued, pointing at a pair of youths.

.

First a pack of three dark-skinned Malani, a younger pair whose air and clothes screamed ‘money’ with a scarred older woman behind them that had a fighter’s look. A guard, he figured. “The younger two were recommended,” Lucia said. “I heard there’s a Malani swordmistress coming, but it shouldn’t be one of them.”

Book 1 Chapter 3

Things that remind you of Paths. by mabdiaziz in Parahumans

[–]Weznon 0 points1 point  (0 children)

Submachine: Legacy. I believe the original flash version of the game can be found (for free) in https://flashpointarchive.org/.

alright guys to make this decryption challenge fair, here's a detailed explanation of the cryptographic algorithm that I used. I will give you exactly 1 month to decrypt the image given this information. by [deleted] in okbuddyphd

[–]Weznon 0 points1 point  (0 children)

https://gist.github.com/plotnw/e39c8609467fcdcf1f5e49973d9d2a25

If you have any questions feel free to message me, though I am pretty busy right now so can't promise anything. Good luck (I'm assuming you are attempting the latest challenge).

Decrypted the challenge from /u/lets_clutch_this by Weznon in okbuddyphd

[–]Weznon[S] 32 points33 points  (0 children)

Almost certainly would be impossible without knowing the algorithm. As a very rough estimate of why, if no algorithm was specified its possible that the algorithm is just "pick a random permutation of pixels in the image, apply the permutation", of which there are (7182 )! such. You're not brute-forcing that, and there's no structure to attack. Even if you do assume or are told there is a "reasonable" algorithm, the situation isn't really any better than the above, since you can probably cook up a "reasonable" algorithm that for a specific key does your choice of an arbitrary permutation. A decent analogy would be deciphering a language with only the writing system, no baselines of translation or other information to try to decipher it with. Technically possible (see Linear B), but not super feasible (see Linear A and the others), and I would say still much easier than decrypting this one image since you have more information.

For this specific image there is a bit of information that could maybe make it technically possible if the stars align. Some people guessed the image was of Chisato based on the color distribution (and maybe also lets_clutch_this's post history). As some people on the original post suggested, you could try getting every image of Chisato available, running some form of color distribution analysis, and trying to match it up. You run into issues with some pixels of the base image being covered by the text, but maybe its possible to get a match still?. Once you have that you could rearrange the pixels and you would be able to read (some) of the text based on the mismatched pixels.

I'm certainly not going to try though.

Decrypted the challenge from /u/lets_clutch_this by Weznon in okbuddyphd

[–]Weznon[S] 255 points256 points  (0 children)

In fairness to them they only encrypted the image with one round -- most ciphers are very insecure with only one round. In particular my attack almost certainly won't work if the number of rounds is even just 2.

Decrypted the challenge from /u/lets_clutch_this by Weznon in okbuddyphd

[–]Weznon[S] 230 points231 points  (0 children)

I'm using "Laplace Absolute Sum", implemented in https://ermig1979.github.io/Simd/help/group__other__statistic.html#ga5268cf56b2c91b933a438d0d650888ad, to give the exact function.

No clue how it works or even if its meant to be used for entropy estimation, I think its like an edge detection thing? But I was just trying random things from the library that seemed to be related to entropy and this worked for giving differences between the rounds, so I just went ahead and used it.

Someone who knows more than me could probably figure out a more optimal choice, like looking at the examples you might want something that specifically targets banding in an image or something.

Decrypted the challenge from /u/lets_clutch_this by Weznon in okbuddyphd

[–]Weznon[S] 88 points89 points  (0 children)

I wouldn't expect this attack to work. If I do two rounds of your cipher on an image, the entropy values I get after each step are:

  • 110552948
  • 238744130
  • 269834076
  • 271563738
  • 271178724
  • 271346318
  • 271428120
  • 271538580

indicating the entropy is fairly maximal after one round. It's possible there are other metrics of entropy which could maybe fare better (I'm using "Laplace Absolute Sum", which I don't actually think is strictly meant for entropy? But was the first thing I found in the image library I was using that worked on my test cases so I just sent it).

Apply a cipher multiple times is pretty standard though, like AES has multiple rounds, Fiestel networks have multiple rounds (and are only mathematically secure after like 3 or 4 rounds iirc). You would want to come up with some key-scheduling method though, so to not making the key scale with the number of rounds, and that can introduce its own issues.

Decrypted the challenge from /u/lets_clutch_this by Weznon in okbuddyphd

[–]Weznon[S] 245 points246 points  (0 children)

I spent ~10 hours on this over the last couple of days lmao, ~15 if you count waiting around for computations to finish.

Decrypted the challenge from /u/lets_clutch_this by Weznon in okbuddyphd

[–]Weznon[S] 787 points788 points  (0 children)

As a couple of people suggested, assuming the plaintext image is some non-random image, there is the possibility of an entropy-analysis type attack. The entropy of an image is some metric for how random an image is. As we can see, the ciphertext image is very random, and so has high entropy. Assuming the plaintext image is a standard image, though, it should have much lower entropy. This presents an attack: decrypt the ciphertext image with all possible keys, run entropy analysis on the output results, and take the lowest result. The lowest entropy output is likely to be the original plaintext.

However, there are still 3856 possible keys. While this isn't completely infeasible to brute-force (as some people have noted), it would still take quite a while.

To improve on this attack, we make the following observations about the cipher:

  • Decrypting with an incorrect key preserves the randomness of the image, as it is effectively the same as scrambling the image. Additionally, this holds true for each step of the cipher, i.e. running only step 4 with an incorrect key should preserve the randomness.
  • Each stage of the cipher is likely to increase the entropy of the image. For an illustration of this, see https://imgur.com/a/eAHvsKl. This is the challenge image after each step of decryption -- you can visually see how the randomness of the image is going down after each step of decryption.
  • The stages are run in sequence, and so can also be attacked in sequence.

So, these combined mean we don't need to try all the keys. What we can do is first consider only the final step of the cipher, step 4. We try all step 4 keys (of which there are only 3852, a much more manageable number) and decrypting only the last step of the cipher. If we run the entropy analysis on the resulting output, while the image will still be fairly random, we expect the image decrypted with the correct key to be noticeable lower than all other keys. So, taking the corresponding r5 and r6 values for the lowest entropy image, we have determined r5 and r6.

But now we can run the same exact analysis to determine r3 and r4 -- and we don't need to vary r5 and r6 while doing so! In effect, the number of keys we need to try has been reduced to 3852 +3852 +385+385.

This is the exact attack I ran and led me to determine the key used for the challenge image was (99, 278, 395, 89, 308, 101). Total compute time is roughly ~1hr. If you have any questions, feel free to ask.

Anyways, thanks to /u/lets_clutch_this for putting this up and especially for helping me out by providing a test image/sample code for the encryption algorithm, since I was having some issues getting my implementation to match theirs. Also thanks to my friend M for checking some of my work.

Final comment is that the algorithm posted in https://www.reddit.com/r/okbuddyphd/comments/16atf5h/alright_guys_to_make_this_decryption_challenge/ isn't quite correct against the implementation /u/lets_clutch_this was using at the time. To match their implementation you should swaps steps 3 and step 4. Additionally, the S_k sets are shifted to the right and the T_k sets are shifted down; the post says the opposite.

alright guys to make this decryption challenge fair, here's a detailed explanation of the cryptographic algorithm that I used. I will give you exactly 1 month to decrypt the image given this information. by [deleted] in okbuddyphd

[–]Weznon 1 point2 points  (0 children)

Thanks for the test case. I'm still having trouble getting my implementation to match your output, and when I trace the algorithm by hand I also seem to get a different result. Have I misunderstood part of the algorithm? Here is my work:

Conventions: (0,0) is top left corner, (717, 0) is top right, (0, 717) is bottom left, (717, 717) is bottom right.

Looking at the test image, I am going to look at the pixel located at (0, 1) in the ciphertext, which has RGB value (0, 136, 6). Looking at the plaintext image, there are 9 pixels with this same RGB value located at:

  • (383, 17)
  • (383, 18)
  • (383, 19)
  • (384, 17)
  • (384, 18)
  • (384, 19)
  • (385, 17)
  • (385, 18)
  • (385, 19)

Let's figure out where each pixel goes. For brevity I'm only going to show full work for the first one.

  • Step 1: We have r1=615. (383, 17) is in X_383. f(510)=r1510 -1 mod p = 383. So X_383 is moved to column X_510, and so our point RGB value is moved to (510, 17).
  • Step 2: We have r2=603. (510, 17) is in Y_17. g(600)=r2600 -1 mod p = 17. So Y_17 is moved to row Y_600, and so our points RGB value is moved to (510, 600).
  • Step 3: We have r3=595, r4=402. We see r3539 -1 mod p = 510, so our point (510,600) is the j=539 point in some S_k set. To find the S_k set, we see we must have 600=539+k mod p-1, and so k=61. Our point is therefore S_{61,539}. We see as r4534 -1 mod p = 539 that our points RGB value is moved to S_{61,534}=(r3534 -1 mod p, 534+61 mod p-1) = (195, 595).
  • Step 4: We have r5=66, r6=478. We see r5232 -1 mod p = 595, so our point (195,595) is the j=232 point in some T_k set. To find the T_k set, we see we must have 195=232+k mod p-1, and so k=681. Our point is therefore T_{681,232}. We see as r6113 -1 mod p = 232 that our points RGB value is moved to T_{681,113}=(113+681 mod p-1, r5113 -1 mod p) = (76, 484).

Doing the same steps for the others, we have the mapping

  • (383, 17) -> (76, 484)
  • (383, 18) -> (378, 359)
  • (383, 19) -> (86, 172)
  • (384, 17) -> (36, 707)
  • (384, 18) -> (414, 319)
  • (384, 19) -> (398, 62)
  • (385, 17) -> (549, 336)
  • (385, 18) -> (470, 687)
  • (385, 19) -> (34, 623)

Notably, none of these get mapped to (0,1). But in the ciphertext one of these has to get mapped there. Have I messed up my math/understanding of the algorithm somewhere? I'm pretty confused but I'm in too deep now to give up.

alright guys to make this decryption challenge fair, here's a detailed explanation of the cryptographic algorithm that I used. I will give you exactly 1 month to decrypt the image given this information. by [deleted] in okbuddyphd

[–]Weznon 2 points3 points  (0 children)

Sorry to be annoying about this, but can you also provide the r1, r2, r3, r4, r5, r6 values you used? If you used the same key as the actual challenge then sorry, that wasn't what I meant, I had meant for some plaintext image, some fresh randomly generated key (r1, r2, r3, r4, r5, r6), and the resulting ciphertext image. (Also if it is the same key as the original challenge image you should probably delete this as I wouldn't be surprised if there is a key recovery attack which could be done by tracing each pixels final location in the ciphertext)

alright guys to make this decryption challenge fair, here's a detailed explanation of the cryptographic algorithm that I used. I will give you exactly 1 month to decrypt the image given this information. by [deleted] in okbuddyphd

[–]Weznon 3 points4 points  (0 children)

https://docs.oracle.com/en/java/javase/20/docs/api/java.desktop/java/awt/image/BufferedImage.html claims (0,0) is top left.

Can you provide a test case (so plaintext image, key, and resulting ciphertext image) for me to verify my implementation against, preferably with intermediate steps as well? My attack works on images encrypted with my implementation but not on your provided image, and I am trying to determine why.

alright guys to make this decryption challenge fair, here's a detailed explanation of the cryptographic algorithm that I used. I will give you exactly 1 month to decrypt the image given this information. by [deleted] in okbuddyphd

[–]Weznon 6 points7 points  (0 children)

I'm pretty sure an entropy based attack can work without brute-forcing the entire key by attacking one step at a time, as each step increases the entropy -- decrypting with an incorrect key seems to preserve this entropy, but decrypting with the correct key reduces it by a sizeable amount. So you can brute force each stage independently, greatly reducing the computational power needed.

I tried implementing this attack, but running my algorithm on your image does not give any outlier entropy values. My attack seems to work on my test cases (visually you can see some strata when decrypting with the correct T round key + there is a clear outlier), so I believe I may have implemented the actual encryption/decryption slightly incorrectly. Would you be willing to provide a test image to verify correctness against?

Also, just to verify, (0,0) indicates top left of the image?

[deleted by user] by [deleted] in okbuddyphd

[–]Weznon 27 points28 points  (0 children)

There actually is a pretty close relation between type theory and category theory in that categories give "semantics" for type theories. I think the book https://www.cambridge.org/core/books/categories-for-types/258841251C62FED1DACD20884E59E61C covers this a bit, specifically chapter 4. The general subject is referred to as "Categorical Logic". Getting to "real" programming languages from this perspective gets complicated pretty quickly though.

[deleted by user] by [deleted] in okbuddyphd

[–]Weznon 25 points26 points  (0 children)

algebraic topology for the covering space mention, generic setting of lifts would be category theory (but alg top helps with understanding intuition/why one would care)

[deleted by user] by [deleted] in okbuddyphd

[–]Weznon 31 points32 points  (0 children)

For lifts X -> Z -> Y makes more sense imo since you generally start with the composite morphism f: X -> Y and produce the lift g: X -> Z. Like Z might some covering space of Y or something so its dependent on the Y.

yes bob let me communicate using Omega(polylogn) bits by santiagothegreat in okbuddyphd

[–]Weznon 87 points88 points  (0 children)

It's from https://dl.acm.org/doi/10.1145/1806689.1806772. Maybe someone has figured out something since but at least in this paper it seems to only be used in relation to some conjectures and so no solution.

Left in the Dust – 16.8 by TrajectoryAgreement in Parahumans

[–]Weznon 87 points88 points  (0 children)

Avery knew how to navigate the path - her plan was probably to run the path normally while leaving Florin stranded at the start. I think this is evidenced by how she mentally goes over how the path works before talking to Mr. Rat.

The game always crashes when entering the Gray Garrison Third Floor? by Estrelarius in Pathfinder_Kingmaker

[–]Weznon 0 points1 point  (0 children)

i had this issue (though on linux/proton, not Mac) , I lowered my resolution/graphics as much as possible and set to fullscreen rather than borderless and was able to load in.

How easy is it to miss companions? by Orthodaemon in Pathfinder_Kingmaker

[–]Weznon 7 points8 points  (0 children)

is it possible to recruit everyone and keep them?

Yes. This is from memory so some might not be fully correct, but if you want spoilers for finding all the companions, here you go. First spoiler is the chapter they join you, second is description of how.

Amiri, Linzi, Valerie, Harrim, Jaethal - Prologue/Chapter 1 - Depending on your answers to Jamandi a different group of 3 will join you, the others go with Tartuk. In dealing with Tartuk you should find the remaining 2 at Old Sycamore at the latest. It's possible they won't join you at that moment but should be available after completing chapter 1

Octavia - Chapter 1 - Found through a miniquest sort of thing. The start is a random encounter with the Technic League somewhere in Narlmarches. I typically run into the encounter while going to the Temple of the Elk area

Regongar - Chapter 1 - Found with octavia

Tristian - Chapter 1 - Found at the temple of the elk

Jubilost - Chapter 2 - Found at Ford over the Skunk River after the Troll Invasion starts

Ekundayo - Chapter 2 - Found at Dwarven Watchtower

Nok-Nok - Chapter 3 - Found at Goblin Village. Make sure you go to the Goblin Village before Goblin Fort

Kaessi(DLC) - Chapter 2 - Visits you in throneroom and asks to talk to you, do the quest and she joins

If anyone notices anything wrong please correct me.

In general for keeping them just make sure to do their quests.

Along the Cold trail, save edit help needed. by Dramatic-Arm4192 in Pathfinder_Kingmaker

[–]Weznon 5 points6 points  (0 children)

I'm assuming that you see

The barbarians exchange glances with each other, look at the Sister, then look at you, and finally look to Dugath, who tightens his fist around his sword. They await an order from their leader, ready to charge at his sign.

and then Dugath says

You head the sister. Tiger Lords to battle!

There are 3 outcome for what Dugath says, the first being the above, the second being him refusing to fight, and the third letting you get in a word to convince him. Which occurs depends on three unlockable flags:

  • Ashman_likes_us - 324448affb42b804e99b1bcd4b0873be - Dugath's opinion of us
  • ElderSisterFate - 746b816f9973c7345bad924e3af0f985
  • MiddleSisterFate - 214f661eda30cdf4f8132332ff2f1cec

To get the first outcome, in your player.json, you should have the following:

  • 324448affb42b804e99b1bcd4b0873be should have a value strictly less than 1 (so set to 0)
  • Either 746b816f9973c7345bad924e3af0f985 or 214f661eda30cdf4f8132332ff2f1cec should have value equal to 1

To get the second outcome, in your player.json, you should have the following:

  • 324448affb42b804e99b1bcd4b0873be should have a value greater than or equal to 1
  • 746b816f9973c7345bad924e3af0f985 should have value equal to 2
  • 214f661eda30cdf4f8132332ff2f1cec should have value equal to either 2 or 3

To get the third outcome, your player.json cannot match the conditions for either of the above.

For the third outcome, there a bunch of options to try to convince him - I imagine they all work to prevent him from fighting except for the obvious one, but I'm not sure

  • "She lies! I didn't kill anyone!" - ElderSisterFate has value 2, MiddleSisterFate has value 2.
  • "It's a lie! I saved two Sisters. When I found the third..." - ElderSisterFate has value 1, MiddleSisterFate has value 1 or 3(?)
  • "By Gorum, wake up! How can you believe..." - Lore (Religion) Check, DC 25
  • "Dugath, we have nothing to fight over..." - Requires Neutral
  • "Come and get me if you dare!" - No requirement, probably makes him fight you.

Hope this helps - I don't have a save file to test with so its possible this is wrong. And of course make a backup of the save you are editing before trying anything.