No, I am talking fully reverse engineered solutions to these hashes.Apparently in his lexicon, finding some shortcuts, not even order-of-magnitude shortcuts, equals "busted".
Anyway, PMed byuu with the relevant info.
Npbyuu wrote:I guess what I'm saying is ... thank you for crushing my hopes
Besides the functionality test, remember that people are only going to be targeting SNES files with an SNES database. The relevant pool of data is not trillions of combinations, it's whatever users are distributing and downloading under the SNES umbrella. CRC32 and filesize alone would probably be sufficient, your worries are unfounded.You make a good point about functioning in emulators... the longer the hash, the more that will need to be modified, hindering its ability to go unnoticed.
Still ... take every possible combination of 65-byte files, and I guarantee you there's a collision with one of them when using SHA-512.
We want to get the hash function right the first time, so we need to pick the best method that will stand up to time as possible. What if we went with a custom 4k-byte hashing function?
CRC is a transmission error detecting code (and a good and simple one for that), but was never intended to protect against malicious alteration of data.FitzRoy wrote:CRC32 and filesize alone would probably be sufficient, your worries are unfounded.
In fact, give me any arbitrary file, choose any contiguous block of 32 bits for me to alter, and I will produce you a file having any CRC32 checksum you want.FitzRoy wrote:Tell you what, take a common bad checksum, spoof it to match the good version's CRC32
Should be clear by now that this is trivial to achieve.FitzRoy wrote:and if it works in your emulator for 60 seconds
... which will probably be not any more secure than MD5 alone.FitzRoy wrote:we'll go to CRC+MD5.
Seriously, I suggest working with standard signed certificates. It is the chain of trust model that should be discussed.FitzRoy wrote:Then you'll have to do the same there and we'll use your proprietary one.
How would you know? Got any evidence?Simultaneously spoofing 2 different algorithms (plus the internal one) without affecting program functionality is no cakewalk.
That I have to agree with. CRC's are easily comprimised, so are hash algorithms like SHA1 and MD5. Which means CRC + MD5 is useless.... which will probably be not any more secure than MD5 alone.
How big can this db get?byuu wrote:More importantly, being able to index into each element in O(1) time would also be important to quickly find hashes without reading the entire database into memory and pre-parsing it.
Code: Select all
//called once every four clock cycles;
//as NMI steps by scanlines (divisible by 4) and IRQ by PPU 4-cycle dots.
//
//ppu.(vh)counter(n) returns the value of said counters n-clocks before current time;
//it is used to emulate hardware communication delay between opcode and interrupt units.
alwaysinline void sCPU::poll_interrupts() {
//NMI hold
if(status.nmi_hold) {
status.nmi_hold = false;
if(status.nmi_enabled) status.nmi_transition = true;
}
//NMI test
bool nmi_valid = (ppu.vcounter(2) >= (!ppu.overscan() ? 225 : 240));
if(!status.nmi_valid && nmi_valid) {
//0->1 edge sensitive transition
status.nmi_line = true;
status.nmi_hold = true; //hold /NMI for four cycles
} else if(status.nmi_valid && !nmi_valid) {
//1->0 edge sensitive transition
status.nmi_line = false;
}
status.nmi_valid = nmi_valid;
//IRQ hold
status.irq_hold = false;
if(status.irq_line) {
if(status.virq_enabled || status.hirq_enabled) status.irq_transition = true;
}
//IRQ test (unrolling the duplicate Nirq_enabled tests causes speed hit)
bool irq_valid = (status.virq_enabled || status.hirq_enabled);
if(irq_valid) {
if((status.virq_enabled && ppu.vcounter(10) != (status.virq_pos))
|| (status.hirq_enabled && ppu.hcounter(10) != (status.hirq_pos + 1) * 4)
|| (status.virq_pos && ppu.vcounter(6) == 0) //IRQs cannot trigger on last dot of field
) irq_valid = false;
}
if(!status.irq_valid && irq_valid) {
//0->1 edge sensitive transition
status.irq_line = true;
status.irq_hold = true; //hold /IRQ for four cycles
}
status.irq_valid = irq_valid;
}
It's not for me to prove, I'm the one saying I can do it.h4tred wrote:How would you know? Got any evidence?Simultaneously spoofing 2 different algorithms (plus the internal one) without affecting program functionality is no cakewalk.
First of all, I at least know that the whole is far greater than the sum of its parts. You're making conclusions on separate assessments of each. To spoof one method, you have to change/rearrange data. To spoof the second method, you have to change the data again, but that will screw up the other spoof. Spoofing both simultaneously is much more difficult than spoofing each individually.h4tred wrote:That I have to agree with. CRC's are easily comprimised, so are hash algorithms like SHA1 and MD5. Which means CRC + MD5 is useless.... which will probably be not any more secure than MD5 alone.
QFT.FitzRoy wrote:To spoof one method, you have to change/rearrange data. To spoof the second method, you have to change the data again, but that will screw up the other spoof. Spoofing both simultaneously is much more difficult than spoofing each individually.
Its not your call, is it not? I thought byuu wanted control.If one more person tries to get out of producing with talk, I'm calling the bout in my favor and we can finally move on with the format.
Code: Select all
time_t diff
= (current_time >= rtc_time)
? (current_time - rtc_time)
: (std::numeric_limits<time_t>::max() - rtc_time + current_time + 1); //compensate for overflow
if(diff > std::numeric_limits<time_t>::max() / 2) diff = 0; //compensate for underflow
Code: Select all
#define alwaysinline __attribute__((always_inline)) __attribute__((hot))
FitzRoy wrote:All you really need is two existing checksum methods. Fraud and collision is next to impossible with CRC+MD5 documentation. If by some miracle someone had the motivation and skill to brute force both, the file would be so butchered that it would never propagate in distribution channels. Because it wouldn't function in emulators.
Somehow, this statement made me feel challenged. I wrote a small note explaining my thoughts on the subject. I would appreciate someone checking it and reporting typos, mistakes, or obscurities.FitzRoy wrote:Simultaneously spoofing 2 different algorithms (plus the internal one) without affecting program functionality is no cakewalk. Show me the money.
Exactly.DataPath wrote: Well, usually when you combine hashing methods like this, shortcuts tend to open up.
Down to less than 1 minute actually. Shall I PM you my bank account details? Would not mind the PS3s, too.DataPath wrote: Well, you hire a cryptographer who spends a couple of months and $100,000 of your money (good cryptographers don't work for free, ya know), and he comes up with a 5-order-of-magnitude improvement in finding MD5-CRC collisions. Hallelujah! You've got it down to 45 minutes to produce an MD5-CRC collision, and it only took you $100,000 worth of cryptographer time and a cluster of 100 PS3s.
In this case, the only thing you can really be sure of is that the sum is at least as great as the greater of both parts.FitzRoy wrote:First of all, I at least know that the whole is far greater than the sum of its parts.
Have not noticed me suggesting that. Anyway, functionality is not a problem, see above. And I have no doubt that MD5 plus CRC32 plus internal checksum is just as secure (or insecure) as MD5. In fact, not thinking any further about it, applying standard chaining methods, there is a reduction needing only 128k of ROM space to be chosen as computed. Let me know if you wish to know the technical details.FitzRoy wrote:But it doesn't stop there as you and ecst erroneously keep suggesting. You'll then need to be able to do this while maintaining a good internal checksum and functionality of the game program.
YES. This is one of the things I hate most, multi-codes that take up multiple lines. This would really come in handy. Byuu, I like your idea. Go for it and see what happens, I'll be happy to give feedback on it.byuu wrote:Sometimes you'll have two or more cheat codes to cause one effect. I'd like to be able to group these codes so that you only have to toggle one of them for the effect.
Awesome. Exactly how it should be.byuu wrote:Quick VBA mock-up:
I made a mockup of it that's simple and clean looking (will edit the text for effect in a bit).tetsuo55 wrote:That project64 screenshot looks almost perfect as far as a cheat screen goes.
... yeah. The fact that it took me like two weeks to figure out listboxes in GTK+ ... no way in hell I'm trying tree-view node listboxes with checkboxes on each entry. No way.One of the only emulators I've seen that addresses that 'issue' (thus avoiding putting in multiple codes for values) is Project64.