Difference between revisions of "Extdata"

From 3dbrew
Jump to navigation Jump to search
m
Line 9: Line 9:
  
 
Most extdata uses the same FS as [[savegames]], except extdata uses [[Savegames|DIFF]] instead of DISA. However some extdata files are raw, without any FS.
 
Most extdata uses the same FS as [[savegames]], except extdata uses [[Savegames|DIFF]] instead of DISA. However some extdata files are raw, without any FS.
Quota.dat uses the same encryption as extdata, but it's unknown whether data is stored raw or with the FS extdata uses.
+
Quota.dat uses the same encryption as extdata, and seems to use the same FS as the actual extdata. Modifying various bytes in Quota.dat didn't cause any errors to be thrown, likewise for deleting Quota.dat on the latest system version. Titles that used to create Quota.dat on old sys versions, no longer create Quota.dat on the latest sys version. Therefore it's unknown whether Quota.dat is even used any-more on the latest system version at all.
  
 
'''QUOT'''
 
'''QUOT'''
  
* This seems to be stored in Quota.dat somewhere?
+
* This seems to be stored in Quota.dat FS somewhere?
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 27: Line 27:
 
| 0x4
 
| 0x4
 
| 4
 
| 4
| Magic Number? (0x30000)
+
| Magic Number (0x30000)
 
|-
 
|-
 
| 0x8
 
| 0x8

Revision as of 23:49, 14 February 2012

This page describes the format and crypto of extdata, "extra data" and StreetPass data stored on SD card. At /Nintendo 3DS/<SomeID>/<SomeID>/extdata/00000000 is directories for each title. Some titles have Quota.dat stored in these directories, not all titles use it. Then there's a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.

Encryption

These files are encrypted with AES-CTR. The key is unknown, this is console-unique. The CTR includes the titleID and filename. The base CTR is fixed: the CTR never changes after each write. Thus it is possible to obtain some cleartext by XORing one file(like newly created extdata) with a newer file, where the newer file overwrote zeros in the original file with non-zero data.

Filesystem

Most extdata uses the same FS as savegames, except extdata uses DIFF instead of DISA. However some extdata files are raw, without any FS. Quota.dat uses the same encryption as extdata, and seems to use the same FS as the actual extdata. Modifying various bytes in Quota.dat didn't cause any errors to be thrown, likewise for deleting Quota.dat on the latest system version. Titles that used to create Quota.dat on old sys versions, no longer create Quota.dat on the latest sys version. Therefore it's unknown whether Quota.dat is even used any-more on the latest system version at all.

QUOT

  • This seems to be stored in Quota.dat FS somewhere?
Start Length Description
0x0 4 Magic ("QUOT")
0x4 4 Magic Number (0x30000)
0x8 8 Unknown
0x10 0x38 Unknown

Directories

  • /icon Presumably contains the icon displayed in data management.
  • /user Presumably contains the title's actual files for "extra data".
  • /boss Presumably contains content downloaded/transferred via SpotPass and possibly StreetPass.(When extdata is created, this /boss directory is *always* created regardless of whether the title actually uses SpotPass/StreetPass.)