The One Flügel Tiara cannot be crafted due to inconsistent hashing
Alwinfy opened this issue · 2 comments
Here's the code I used to make this discovery, which is more or less StringObfuscator.java off master, plus a main method.
When invoked as:
ayi@dnabook /tmp $ printf 'test\ntest\ntest\ntest\n' |java StringObfuscator
This produces the following output on my machine:
test 55EB2306D99A03743FCBBF98C8ACF3DA689411C787B3F3D7897180E1A62398C7
test 43A188A9743834A7A773037B8C261F5B8ACA99D6188DAEAFEEE07F2F7383C273
test 3AE459CAAF3D93289A326C98DCBFE5DFD8926BA49F20418C3D3FDB94566371F6
test F85EFF358507FF1443265CE30885EAB40656F4481F6EB1F7D1076E43658DAB09
I believe that SecureRandom not returning the same pRNG for the same seed is causing the problem, but this means that the hash produced by any anvil renaming is more or less completely random, regardless of the name the Tiara is given, and has nearly zero chance of matching the hash in the source.
note to self: probably this https://stackoverflow.com/questions/50107982/rhe-7-not-respecting-java-secure-random-seed/50116951#50116951