Reply 220 of 378, by mattw
Alex-aut wrote on 2020-12-12, 09:08:@mattw: I wonder, how did you do that great!!! job .... If such "job" will come once again, you should export your permutation-calculations to CUDA 😀
actually, in case of SC-88 there was no need of nVidia hundred-billion-transistors chip. just a cup or two of Pepsi to wake me up and couple of Sudoku-solving hours of fun - after all I did it manually and it took me just few hours. in fact almost everything necessary to be figured out in order to do it, I already posted previously here, but let me make a summary of the whole story and few additional notes.
So, in my opinion, most fatal mistake in such kind of protection is that they put the year and the date and and not only that, but it's one of the first thing they put in the data:
Re: About Roland Virtual Sound Canvas 3
that not only means first 6 bits (address lines 0 to 5) of the address line shuffling is easy to figure out ("11 11 11" bits gives 0x3F or first 64 bytes), even manually, but brute-force attack is possible, because you know there is year "199x" in those bytes (EDIT: also the algo below could be used). In fact that allows even in case data value bit-shuffling is not known (as in the above case), to figure it out with brute-force attack - after all it's only 8-bits.
After that you, basically do the algorithm I posted here (from here on I will use "algo" to refer to this algorithm):
Re: About Roland Virtual Sound Canvas 3
let me elaborate a little further:
the shuffling of the next 4 bits or address lines 6,7, 8, 9 ("11 11 11 11 11" or that's 0x3ff or block of 1024 bytes) using the above algo is ultra simple, because the data block consists mostly of "ff" and "00". So, it's even faster, because doing the algo for address line 6, actually gives idea for 7,8 and 9, even it doesn't give their exact order. In other words on this step in worst case you have (20 - 6)=14 tries to find out bit 7 and which are the possible options for bit 8, 9 and 10 and then to order those last 3 bits, only 6 additional tries are necessary in total at best. I would say in worst case up to this point you're at 25 tries at most, that' why at that point I made the comments here:
Re: About Roland Virtual Sound Canvas 3
Re: About Roland Virtual Sound Canvas 3
What I didn't realize until yesterday is that at this point it's practically cracked, because while on each next step of the algo the block to verify becomes 2 times larger (which at first glance makes it very hard to do manually), in reality you don't need to verify the whole block, but only if the "stitching" between the old block and the new block looks correct based on the structure of the data. Even I made note about that here:
Re: About Roland Virtual Sound Canvas 3
I didn't really realize at that point only the "stitching" between the old block and the new block is important to be verified and not the whole block. That means on StepX of the algo (X >=10, as previous is already done, see above), you need to just see if let's say last 16 bytes of data before address 2^X and first 16 bytes after that fit together. Let me give, example, with X=11, first 11 address lines define the block of first 2^11 -1 = 0x7ff bytes and then to make sure address line 12 is guessed it's enough to examine the "stitching" around address 0x7ff if the previously good block fits together to the next block based on the structure of the data.
It's really incredible, when get experience with doing manually the above algo how efficient it is. Honestly, I doubt I did more than 70 tries in total, which you can do without any effort, e.g. 10 tries per day, that takes like 10-15 minutes for 7 days. I also do not see a reason, why it won't work with any other ROM scrambled in such way - as far as the structure is the same, i.e. that they put the year and the date, then there is blocks mostly of "00" and "ff"that form the "header" and then they have block of those "exponents" up to address 0x7fff and then the "mantissa " data follows or even not exactly the same, but just any structured data with a known structure.
In conclusion, such protection is really weak, if the data are not random, but structured and that structure is known - In such case it allows even manual attack in very small number of steps, i.e. involving almost no time and effort.