<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/index.php?action=history&amp;feed=atom&amp;title=DSi%E8%BD%AF%E4%BB%B6</id>
	<title>DSi软件 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/index.php?action=history&amp;feed=atom&amp;title=DSi%E8%BD%AF%E4%BB%B6"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=DSi%E8%BD%AF%E4%BB%B6&amp;action=history"/>
	<updated>2026-04-28T19:15:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=DSi%E8%BD%AF%E4%BB%B6&amp;diff=5897&amp;oldid=prev</id>
		<title>T: add item</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=DSi%E8%BD%AF%E4%BB%B6&amp;diff=5897&amp;oldid=prev"/>
		<updated>2013-05-05T06:03:32Z</updated>

		<summary type="html">&lt;p&gt;add item&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;第一次使用3DS时会在SD卡上生成一些管理数据的数据。3DS使用一个单独的目录，比如DSi: /Nintendo 3DS/&amp;lt;SomeID&amp;gt;/&amp;lt;SomeID&amp;gt;/Nintendo DSiWare。文件名的格式为&amp;lt;titleidlow&amp;gt;.bin。这些文件的keys/format域DSi是完全不同的。某个从3DS的SD卡导出的DSiWare ~0x3bc bytes ,这要比从 DSi 中导出的小。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3DS的DSiWare存储在&amp;quot;[[SD_Filesystem|sdmc]]:/Nintendo 3DS/&amp;lt;ID0&amp;gt;/&amp;lt;ID1&amp;gt;/Nintendo DSiWare&amp;quot;. 文件名的格式和[http://dsibrew.org/wiki/Tad DSi]: &amp;quot;&amp;lt;TitleID-Low&amp;gt;.bin&amp;quot;相同. The below sizes include the 0x20-byte block metadata.&lt;br /&gt;
&lt;br /&gt;
DSiWare exported from 3DS use console-unique [[Nand/private/movable.sed|keyslots]] initialized by movable.sed. Each section is encrypted with AES-CBC.&lt;br /&gt;
&lt;br /&gt;
The content sections are ordered the same way as DSi: TMD, SRL from content0, &amp;lt;content1-7 for format v2&amp;gt;, public.sav, and banner.sav when banner.sav exists. When the DSiWare export type is 7-11, the 12th content section is the private.sav, if it exists.(ContentX here is the .app data from TWL-NAND /title)&lt;br /&gt;
&lt;br /&gt;
=DSiWare Export Types=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Format version&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-6&lt;br /&gt;
| &lt;br /&gt;
| Same as value 14.&lt;br /&gt;
|-&lt;br /&gt;
| 7-11&lt;br /&gt;
| v2&lt;br /&gt;
| 12 content sections&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| v2&lt;br /&gt;
| 4 content sections&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| v1&lt;br /&gt;
| 4 content sections&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| v2&lt;br /&gt;
| 11 content sections&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For NATIVE_FIRM versions where this DSiWare export [[AM:ExportDSiWare|type]] field is unused, format version v1 is used with 4 content sections. Otherwise when this field is used, see the above table. [[System Settings]] uses type 1 for [[AM:ExportDSiWare|exporting]] DSiWare, regardless of the System Settings title-version.&lt;br /&gt;
&lt;br /&gt;
=Block Metadata=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x10&lt;br /&gt;
| AES MAC over a SHA-256 hash&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x10&lt;br /&gt;
| IV, generated by the [[PSPXI:GenerateRandomBytes|RNG]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each section begins with the payload encrypted data, followed by this block metadata. The SHA-256 hash used for the MAC is calculated over the cleartext payload. This hash used for generating the MAC is also stored in the footer.&lt;br /&gt;
&lt;br /&gt;
=Footer=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| X&lt;br /&gt;
| SHA-256 hashes over the banner, header, and content sections. When a content section doesn&amp;#039;t exist, the corresponding hash here is uninitialized.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 + X&lt;br /&gt;
| 0x3C&lt;br /&gt;
| ECDSA signature using SHA-256 over the previous hashes, signed by the APCert.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C + X&lt;br /&gt;
| 0x180&lt;br /&gt;
| ECDSA &amp;quot;APXXXXXXXXXXXXXXXX&amp;quot; cert signed by the below [[CTCert]], where X is [[PSPXI:GenerateRandomBytes|random]] lowercase ASCII hex data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1BC + X&lt;br /&gt;
| 0x180&lt;br /&gt;
| ECDSA [[CTCert]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x33C + X&lt;br /&gt;
| 0x4&lt;br /&gt;
| Uninitialized padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These hashes are the same hashes used for generating each section&amp;#039;s MAC stored in the metadata block. X = 0x40 + totalcontentsections*0x20.&lt;br /&gt;
&lt;br /&gt;
=File Structure v1=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4020&lt;br /&gt;
| Banner section&lt;br /&gt;
|-&lt;br /&gt;
| 0x4020&lt;br /&gt;
| 0xC0&lt;br /&gt;
| Header section&lt;br /&gt;
|-&lt;br /&gt;
| 0x40E0&lt;br /&gt;
| 0x340 + 0x20 + X, where X is the total size of the hashes stored in the footer.&lt;br /&gt;
| Footer section&lt;br /&gt;
|-&lt;br /&gt;
| 0x40E0 + footer_size&lt;br /&gt;
| &lt;br /&gt;
| Content sections&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Magic number 0x54444633, &amp;quot;3FDT&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x2&lt;br /&gt;
| Byte-swapped groupID from the TWL [[TMD]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x2&lt;br /&gt;
| Byte-swapped title version from the TWL [[TMD]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x20&lt;br /&gt;
| SHA-256 hash [[AMPXI:ValidateDSiWareMovableSedHash|calculated]] over the encrypted movable.sed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x10&lt;br /&gt;
| Encrypted AES block from [[AES|encrypting]] an all-zero 0x10-byte block with AES-CBC, where the IV is all-zero.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| Byte-swapped titleID from the TWL [[TMD]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x8&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x10&lt;br /&gt;
| u32 payload sizes for the 4 content sections.&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| 0x4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| 0x3E&lt;br /&gt;
| Data from the TWL [[TMD]] reserved section. Only the first 0x20-bytes from the TWL TMD is written here, the rest is uninitialized.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9A&lt;br /&gt;
| 0x6&lt;br /&gt;
| Padding?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=File Structure v2=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4020&lt;br /&gt;
| Banner section&lt;br /&gt;
|-&lt;br /&gt;
| 0x4020&lt;br /&gt;
| 0x110&lt;br /&gt;
| Header section&lt;br /&gt;
|-&lt;br /&gt;
| 0x4130&lt;br /&gt;
| 0x340 + 0x20 + X, where X is the total size of the hashes stored in the footer.&lt;br /&gt;
| Footer section&lt;br /&gt;
|-&lt;br /&gt;
| 0x4130 + footer_size&lt;br /&gt;
| &lt;br /&gt;
| Content sections&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Header==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Magic number 0x54444633, &amp;quot;3FDT&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x2&lt;br /&gt;
| Byte-swapped groupID from the TWL [[TMD]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x2&lt;br /&gt;
| Byte-swapped title version from the TWL [[TMD]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x20&lt;br /&gt;
| SHA-256 hash [[AMPXI:ValidateDSiWareMovableSedHash|calculated]] over the encrypted movable.sed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x10&lt;br /&gt;
| Encrypted AES block from [[AES|encrypting]] an all-zero 0x10-byte block with AES-CBC, where the IV is all-zero.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| Byte-swapped titleID from the TWL [[TMD]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x8&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x2C&lt;br /&gt;
| u32 payload sizes for the 11 content sections.&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| 0x30&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0xA4&lt;br /&gt;
| 0x3E&lt;br /&gt;
| Data from the TWL [[TMD]] reserved section. Only the first 0x20-bytes from the TWL TMD is written here, the rest is uninitialized.&lt;br /&gt;
|-&lt;br /&gt;
| 0xE2&lt;br /&gt;
| 0x0E&lt;br /&gt;
| Padding?&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>T</name></author>
	</entry>
</feed>