RolandHazoto wrote:RiiakShiNal wrote: Though we still do not know what the hashing algorithm is or if there is other outside constant information that is hashed in or not (such as the player's UID as reported by steam/crack or some secret salt that has been added).
^ That would be answered by loading someone else's files. That's what I was referring to.
Actually, it wouldn't, though I can definitively tell you that it is not hashing in the player UID.
The reason it won't tell you if other outside information is hashed in or not is that any "secret salt" that is stored in the executable is "constant outside information" that is not stored in either the profile or the hash, but moving a player's save from one person's machine to another won't be able to tell if that information is used or not because on both machines the "constant outside information" is still present inside the executable (this information does not change from installation to installation).
The reason I can definitively tell you that it does not hash in the player UID is because I created multiple new profiles (each has a different uid and different name), but the files created by the game are virtually identical (though some profiles have the byte at offset 478 equal to 0x06 while others have that same byte equal to 0x04) and profiles that are newly created with the byte at offset 478 equal to 0x06 have a hash of "A8 DA 8F 6F" while those created with that byte set to 0x04 have a hash of "2A DE 9E A3". The player name/UID never factored in so it is not included in the hashed information.
There still could be a "secret salt" which is hashed in by the executable which we have no way of knowing other than:
1 - Brute force - trying every possible combination of every possible salt value for every possible length.
2 - Disassemble the executable to find and examine the hashing algorithm.
Number of Possibilities based on Salt length (only counts possibilities for that particular length of salt):
- 1 byte = 768 possibilities
- 2 bytes = 262,144 possibilities
- 3 bytes = 83,886,080 possibilities
- 4 bytes = 25,769,803,776 possibilities
- 5 bytes = 7,696,581,394,432 possibilities
- 6 bytes = 2,251,799,813,685,248 possibilities
- 7 bytes = 648,518,346,341,351,424 possibilities
- 8 bytes = 184,467,440,737,095,516,160 possibilities
Bottom line: We can not reasonably figure out the hashing algorithm/salt within our lifetimes without disassembling the executable.
Side note: The Theta version creates the player UID based (at least partially) on player name. On my machine creating a profile with one name generates a specific uid then deleting the swarm directory and re-creating that profile generates that same specific uid. You can, however, force a specific uid by setting it in the "vuid" file which can allow you to play someone else's save game with your name.
Edit: I realized my math was wrong for the possibilities, my numbers for most of them needed to be larger due to the number of possibilities when splitting the salt between the beginning and the end of the data (they have now been corrected).
Edit 2: For those curious the equation used to calculate possibilities is this:
2^(#Bytes * 8 ) * (3 + (#Bytes - 1)) = Number of possibilities
- 2^(#Bytes * 8 ) = Number of possible values for salt
- 3 = 3 ways to use salt (beginning, end, transforming hash [I only considered xoring for sake of simplicity, including other transformations of the hash will further increase number of possibilities.])
- (#Bytes - 1) = Number of ways to split bytes of salt between beginning and end of data.
Edit 3: Of course there is also the possibility that only part of the profile is hashed, in which case that also adds more possibilities to test, though those possibilities are easier to test because we know the values in the profile and don't have to guess at them.