<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Luckwheelie</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Luckwheelie"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Luckwheelie"/>
	<updated>2026-04-15T12:46:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Extdata&amp;diff=5060</id>
		<title>Extdata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Extdata&amp;diff=5060"/>
		<updated>2013-03-03T00:43:57Z</updated>

		<summary type="html">&lt;p&gt;Luckwheelie: /* SD Extdata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the format and encryption of extdata, &amp;quot;extra data&amp;quot; stored on [[SD_Filesystem|SD card]] and [[Flash_Filesystem|NAND]].&lt;br /&gt;
At:&lt;br /&gt;
* nand/data/&amp;lt;ID&amp;gt;/extdata/&amp;lt;ExtdataID-High&amp;gt;&lt;br /&gt;
* sdmc/Nintendo 3DS/&amp;lt;ID0&amp;gt;/&amp;lt;ID1&amp;gt;/extdata/&amp;lt;ExtdataID-High&amp;gt; &lt;br /&gt;
&lt;br /&gt;
(ExtdataID-High is always 00000000 for SD, and always 00048000 for NAND) Some titles can have Quota.dat stored in these directories. The directory-name for these directories is the ExtdataID-Low. Then there&#039;s a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.&lt;br /&gt;
NAND stores the shared extdata and is structured exactly the same way, see [[Flash Filesystem]].&lt;br /&gt;
&lt;br /&gt;
Extdata image 00000001 contains a SAVE partition for the FST, the actual file data is stored in the following extdata images.&lt;br /&gt;
&lt;br /&gt;
Regular apps can only mount SD extdata using the same extdataID which is stored in the [[NCCH#CXI|CXI]] exheader. Therefore, regular apps which have the exheader extdataID set to zero can&#039;t use extdata. This restriction doesn&#039;t apply for shared extdata with extdataID high bitmask 0x48000 stored on NAND. System apps with a certain access right can mount arbitrary extdata.&lt;br /&gt;
All NAND extdata is shared extdata, while all SD extdata is normal extdata. Thus, normal extdata doesn&#039;t exist on NAND, and shared extdata doesn&#039;t exist on SD. The extdataID high excluding that bitmask is always zero for shared extdata.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
&lt;br /&gt;
These files are [[AES|encrypted]] with AES-CTR, the keyslot is initialized by [[nand/private/movable.sed|movable.sed]]. The same keyslot is used for the NAND/SD extdata MAC. The NAND extdata images are stored in cleartext. The WCHAR LowPath &amp;quot;/extdata/&amp;lt;ExtdataIDHigh&amp;gt;/&amp;lt;ExtdataIDLow&amp;gt;/&amp;lt;PathToImage&amp;gt;&amp;quot; text path is hashed with SHA-256, including the WCHAR null-terminator. A separate hash is used for Quota.dat. The base CTR seems to be then generated by XORing the calculated hash: CTRword[i] = Hashword[i] ^ Hashword[4+i].&lt;br /&gt;
&lt;br /&gt;
The base CTR is fixed therefore 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.&lt;br /&gt;
&lt;br /&gt;
=== Filesystem ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
Quota.dat is an extdata image, however it&#039;s unknown what this is used for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;QUOT&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* This is contained in the Quota.dat extdata image.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 4&lt;br /&gt;
| Magic (&amp;quot;QUOT&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 4&lt;br /&gt;
| Magic Number (0x30000)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x38&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Filesystem structure ====&lt;br /&gt;
&lt;br /&gt;
When extdata is created, these are *always* created regardless of whether the title actually uses them.&lt;br /&gt;
User extdata and SpotPass extdata use separate [[FS:OpenArchive|mount]] points at /user and /boss. Therefore one mount can&#039;t access the other directory, and also can&#039;t access /icon.(The title&#039;s SpotPass extdata can be mounted by the title itself, if it uses SpotPass)&lt;br /&gt;
&lt;br /&gt;
* /icon This file contains the extdata [[SMDH|icon]] displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. This file can&#039;t be read directly, instead it is read via [[FS:ReadExtSaveDataIcon]].&lt;br /&gt;
* /user/ Contains the title&#039;s actual extdata files.&lt;br /&gt;
* /boss/ Can contain [[SpotPass]] content. SpotPass content can only be downloaded to this /boss directory.&lt;br /&gt;
&lt;br /&gt;
* /user/ExBanner This directory can optionally store [[Extended_Banner| extended banners]]. When this is available, this banner is displayed instead of the [[CXI]] ExeFS banner. COMMON.bin stores the common exbanner, while &amp;lt;regionlang_code&amp;gt;.bin stores an optional separate region/language specific banner.(regionlang_code can be &amp;quot;JPN_JP&amp;quot;, &amp;quot;USA_EN&amp;quot;, etc)&lt;br /&gt;
&lt;br /&gt;
=== SD Extdata ===&lt;br /&gt;
Usually the ExtdataID low is in the format &#039;00&amp;lt;Unique ID&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! JPN ExtdataID&lt;br /&gt;
! USA ExtdataID&lt;br /&gt;
! EUR ExtdataID&lt;br /&gt;
! Description&lt;br /&gt;
! Extdata images&lt;br /&gt;
|-&lt;br /&gt;
| 00000082&lt;br /&gt;
| 0000008f&lt;br /&gt;
| 00000098&lt;br /&gt;
| Homemenu extdata&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| 000004aa&lt;br /&gt;
| 000004ab&lt;br /&gt;
| Nintendo Video Extra Data&lt;br /&gt;
This is where the video files are stored, and [[Nintendo_Video|includes]] the thumbnail, the description, and possibly some checksum info in each video file stored in the extdata images. There are always 9 files within the subdirectory &amp;quot;00000000&amp;quot; of this folder, even without any videos downloaded. The files are &amp;quot;00000001&amp;quot; - &amp;quot;00000009&amp;quot;, and &amp;quot;00000003&amp;quot; - &amp;quot;00000008&amp;quot; have the same filesize of 50.7 MB. It is possible to restore the older videos by overwriting all the files within this directory. Provided of course you have made a backup of the files before hand, by copying all the files within this directory to your computer. As far I&#039;m aware its not possible to mix and match the files in order to get certain videos in one grouping, ie. having all 3 Zelda orchestral recordings in one group of 4 Nintendo videos.&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000207&lt;br /&gt;
| 00000217&lt;br /&gt;
| 00000227&lt;br /&gt;
| Mii Maker, contains an ExBanner&lt;br /&gt;
| [https://dl.dropbox.com/u/20520664/extdata00000217.zip cleartext]&lt;br /&gt;
|-&lt;br /&gt;
| 0000020d&lt;br /&gt;
| 0000021d&lt;br /&gt;
| 0000022d&lt;br /&gt;
| Face Raiders, likely contains an ExBanner&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000200&lt;br /&gt;
| 00000210&lt;br /&gt;
| 00000220&lt;br /&gt;
| [[System_Settings|System Settings]] extdata added with [[2.0.0-2]].&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000209&lt;br /&gt;
| 00000219&lt;br /&gt;
| 00000229&lt;br /&gt;
| eShop&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|?&lt;br /&gt;
|00000308&lt;br /&gt;
|00000307&lt;br /&gt;
|Mario Kart 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0000030b&lt;br /&gt;
| 0000030d&lt;br /&gt;
| 0000030c&lt;br /&gt;
| Nintendogs + Cats&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| 00000326&lt;br /&gt;
| 00000326&lt;br /&gt;
| Pokédex 3D&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000305&lt;br /&gt;
| 0000032d&lt;br /&gt;
| 0000033c&lt;br /&gt;
| Super Street Fighter IV 3D&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000328&lt;br /&gt;
| 00000358&lt;br /&gt;
| 0000033b&lt;br /&gt;
| Ridge Racer 3D&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| 0000034d&lt;br /&gt;
| 00000402&lt;br /&gt;
| Samurai Warriors Chronicles&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| 0000034f&lt;br /&gt;
| 0000038a&lt;br /&gt;
| Dead or Alive Dimensions&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000481&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| Monster Hunter Tri G (Download-Quests)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| 00000a86&lt;br /&gt;
| Professor Layton and the Miracle Mask&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| 00000c24&lt;br /&gt;
| Denpa men&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NAND Shared Extdata ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ExtdataID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0xf0000001&lt;br /&gt;
|  NAND JPEG/MPO files from the camera application are stored here&lt;br /&gt;
|-&lt;br /&gt;
|  0xf0000002&lt;br /&gt;
|  NAND M4A files from the sound application are stored here&lt;br /&gt;
|-&lt;br /&gt;
|  0xf0000009&lt;br /&gt;
|  Contains Miis and some data relating (including cached ICN data) to Play/Usage Records.&lt;br /&gt;
|-&lt;br /&gt;
|  0xf000000b&lt;br /&gt;
|  Contains idb.dat, idbt.dat, and gamecoin.dat&lt;br /&gt;
|-&lt;br /&gt;
|  0xf000000c&lt;br /&gt;
|  Contains bashotorya.dat&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Luckwheelie</name></author>
	</entry>
</feed>