Changes

250 bytes added ,  14:42, 9 April 2011
no edit summary
Line 4: Line 4:  
DSではこのようなセーブデータはそのまま保存されていましたが、3DSにおいては暗号化して保存する仕組みが加わりました。
 
DSではこのようなセーブデータはそのまま保存されていましたが、3DSにおいては暗号化して保存する仕組みが加わりました。
 
これはとてもストリームの暗号化に似ています。排他的論理和を取ることによって、セーブデータの復号鍵が
 
これはとてもストリームの暗号化に似ています。排他的論理和を取ることによって、セーブデータの復号鍵が
得られます。 The reason this works is because the streamcipher used has a period of 512 bytes. That is to say, it will repeat the same keystream after 512 bytes. The way you encrypt with a streamcipher is you XOR your data with the keystream as it is produced. Unfortunately, if your streamcipher repeats and you are encrypting a known plaintext (in our case, zeroes) you are basically giving away your valuable keystream.
+
得られます。                                           このアルゴリズムを解読できるのは、たった512バイトのキーによって暗号化されているためです。言ってみれば、512バイトごとに同じように復号しているわけです。つまり、暗号化されても、その排他的論理和を取る事によってキーを作ることができます。残念ながら、 Unfortunately, if your streamcipher repeats and you are encrypting a known plaintext (in our case, zeroes) you are basically giving away your valuable keystream.
    
So how do you use this to decrypt a savegame on a 3DS? First off, you chunk up the savegame into 512 byte chunks. Then, you bin these chunks by their contents, discarding any that contain only FF. Now look for the most common chunk. This is your keystream. Now XOR the keystream with your original savegame and you should have a fully decrypted savegame. XOR with the keystream again to produce an encrypted savegame.
 
So how do you use this to decrypt a savegame on a 3DS? First off, you chunk up the savegame into 512 byte chunks. Then, you bin these chunks by their contents, discarding any that contain only FF. Now look for the most common chunk. This is your keystream. Now XOR the keystream with your original savegame and you should have a fully decrypted savegame. XOR with the keystream again to produce an encrypted savegame.
Line 34: Line 34:  
=== ファイルシステム ===
 
=== ファイルシステム ===
 
   
 
   
Savefiles stored on the FLASH are using a custom FS.
+
セーブデータstored on the FLASH are using a custom FS.
 
   
 
   
 
It seems the file entries are stored at a static offset of 0x3a00.  
 
It seems the file entries are stored at a static offset of 0x3a00.  
405

edits