<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.iquebrew.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jbop</id>
	<title>iQueBrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.iquebrew.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jbop"/>
	<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Special:Contributions/Jbop"/>
	<updated>2026-11-12T12:10:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=1377</id>
		<title>IQueCrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=1377"/>
		<updated>2020-03-16T18:08:31Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=iQueCrypt&lt;br /&gt;
|HB_Author=[[User:Jbop|Jbop]]&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=GPL (v3 or later)&lt;br /&gt;
|HB_Version=1.3.0&lt;br /&gt;
|HB_Released=August 13, 2018&lt;br /&gt;
|HB_Website=[https://github.com/jbop1626/iquecrypt GitHub]&lt;br /&gt;
|HB_Download=[https://github.com/jbop1626/iquecrypt/releases/latest GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;iQueCrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting information from a [[CMD]] file, from a console&amp;#039;s [[ticket.sys]] file, or from a [[Virage2]] dump;&lt;br /&gt;
as well as for encrypting and decrypting apps and title keys. To obtain these files, a user will need a [[NAND]] dump of their iQue or already-extracted files. Some operations also &amp;#039;&amp;#039;require&amp;#039;&amp;#039; a Virage2 dump.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
iQueCrypt has four modes: encrypt, decrypt, extract, and ecdh. See the [https://github.com/jbop1626/iquecrypt/blob/master/USAGE.md usage manual] for more in-depth instructions.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The main use for the encrypt mode is to create an &amp;quot;injection&amp;quot;, where an app is encrypted with the recrypt key of another (legitimately-obtained) app on an iQue. When this encrypted app is run, the iQue treats it as the legitimate app, and decrypts and executes it normally. This can be used to run other, normal iQue games as well as [[:Category:Homebrew|hacks or homebrew]].&lt;br /&gt;
&lt;br /&gt;
To create an injection, follow these steps:&lt;br /&gt;
&lt;br /&gt;
# Obtain the plaintext ROM of the game you want to inject&lt;br /&gt;
# Dump the console&amp;#039;s [[NAND]] or otherwise obtain its [[recrypt.sys]] file.&lt;br /&gt;
# Dump the console&amp;#039;s [[Virage2]].&lt;br /&gt;
# Pick a game on your console to serve as the &amp;quot;host&amp;quot; for the injection and take note of its [[Content ID|content ID]] (in hex). This must be a game that has already been launched and exists as a .rec on NAND. Some games are not as compatible with others. Try to have matching save types and matching or greater hardware access and [[SKC]] access.&lt;br /&gt;
# Extract the content iv of the host game from its [[CMD]] or [[ticket]].&lt;br /&gt;
# Use the encrypt mode on the plaintext ROM, with the recrypt.sys file, Virage2 dump, content ID, and content iv obtained in the preceding steps.&lt;br /&gt;
# The output should be a .rec which is the plaintext ROM encrypted with the host&amp;#039;s recrypt key and content iv.&lt;br /&gt;
# Rename the file to (hex content ID of host game).rec&lt;br /&gt;
# Backup the original .rec of the same name on your console, and then wrie the newly generated .rec back to the NAND.&lt;br /&gt;
&lt;br /&gt;
=== Decryption ===&lt;br /&gt;
This allows the user to obtain plaintext versions of title keys and apps (if given the appropriate keys and ivs).&lt;br /&gt;
&lt;br /&gt;
=== Extraction ===&lt;br /&gt;
Extract mode can extract keys, initialization vectors, and other information from CMDs, ticket.sys files, and V2 dumps. This makes it easy to obtain the files or information a user needs to encrypt or decrypt files.&lt;br /&gt;
&lt;br /&gt;
=== ECDH ===&lt;br /&gt;
iQueCrypt can compute the ECDH of a console&amp;#039;s ECC private key and a ticket&amp;#039;s ECC public key, in order to create the AES key used to re-encrypt the title key in a game&amp;#039;s [[CMD]]. This allows the owner of an iQue to obtain the title key for each game that they own by following these steps:&lt;br /&gt;
&lt;br /&gt;
# Dump the console&amp;#039;s [[NAND]] or otherwise obtain its [[ticket.sys]] file.&lt;br /&gt;
# Dump the console&amp;#039;s [[Virage2]].&lt;br /&gt;
# Extract the iQue common key and ECC private key from the V2 dump.&lt;br /&gt;
# Extract the ticket of the desired game to obtain its (twice-encrypted) title key, title key iv, title key iv 2, and ECC public key&lt;br /&gt;
# Use the ecdh mode with the V2 ECC private key and the ticket&amp;#039;s ECC public key to generate the file ecdh_key.bin.&lt;br /&gt;
# Decrypt the title key using ecdh_key.bin and title key iv 2.&lt;br /&gt;
# Decrypt the result of the previous step with the common key and title key iv.&lt;br /&gt;
# The result of the above step will be the plaintext title key of the game or app.&lt;br /&gt;
&lt;br /&gt;
[[Category:PC utilities]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=NAND&amp;diff=1001</id>
		<title>NAND</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=NAND&amp;diff=1001"/>
		<updated>2019-08-05T21:25:59Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Fix block map range offsets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The iQue uses a 64MiB &amp;#039;&amp;#039;&amp;#039;NAND&amp;#039;&amp;#039;&amp;#039; flash, which consists of 4096 logical blocks of 16384 bytes each (made up of 32 512-byte pages). Each page also has its own &amp;quot;spare&amp;quot; area, which is detailed below.&lt;br /&gt;
&lt;br /&gt;
== Block Map ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0x0 - 0x3F&amp;#039;&amp;#039;&amp;#039; - SKSA area, marked in the BBFS FAT as reserved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0x40 - 0xFEF&amp;#039;&amp;#039;&amp;#039; - data area, used for files in the BBFS&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0xFF0 - 0xFFF&amp;#039;&amp;#039;&amp;#039; - BBFS area, each block holds a copy of the BBFS along with a &amp;#039;sequence number&amp;#039;, highest sequence number is the latest BBFS.&lt;br /&gt;
&lt;br /&gt;
== BBFS ==&lt;br /&gt;
BBFS is the filesystem used on the iQue NAND, a very simple file-system used to store games and config data. The Wii NAND&amp;#039;s SFFS is actually very similar to BBFS, though with many more features.&lt;br /&gt;
&lt;br /&gt;
The BBFS is made up of three parts: a FAT (file-allocation table), an entry table and a footer:&lt;br /&gt;
&lt;br /&gt;
=== FAT ===&lt;br /&gt;
The FAT is located at 0x0 in the BBFS block, made up of 4096 16-bit signed integers, one for each block in the NAND. This is used to specify if a block may be reserved, bad, available, or it might point to another block in the &amp;#039;chain&amp;#039; (ie. file 0 points to block 0, block 0 points to block 2, block 2 points to block 15...), or signify the end of the chain.&lt;br /&gt;
&lt;br /&gt;
Files make use of the FAT by simply pointing to a block in the FAT as its start block. Extracting the file is then just a matter of following the chain of pointers in the FAT, reading in each block until you reach an end-of-chain marker.&lt;br /&gt;
&lt;br /&gt;
Possible FAT entries:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:30%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Free/unused block&lt;br /&gt;
|-&lt;br /&gt;
| -1&lt;br /&gt;
| End-of-chain marker&lt;br /&gt;
|-&lt;br /&gt;
| -2&lt;br /&gt;
| Bad block&lt;br /&gt;
|-&lt;br /&gt;
| -3&lt;br /&gt;
| Reserved block (used for SKSA area)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entry Table ===&lt;br /&gt;
File entries are stored from 0x2000 - 0x3FF4 in the BBFS block, allowing for 409 entries per BBFS.&lt;br /&gt;
&lt;br /&gt;
Each entry has the format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| char&lt;br /&gt;
| File name&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x3&lt;br /&gt;
| char&lt;br /&gt;
| File extension&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x1&lt;br /&gt;
| byte&lt;br /&gt;
| Valid indicator (1 if file is valid)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x2&lt;br /&gt;
| int16&lt;br /&gt;
| Start block #&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| 0x2&lt;br /&gt;
| bytes&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x4&lt;br /&gt;
| int32&lt;br /&gt;
| File size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Files may be deleted by simply having the Valid indicator set to 0, or having a block number of -1, so when reading the entry table you should make sure to read all 409 entries first and then filter out any invalid ones.&lt;br /&gt;
&lt;br /&gt;
=== Footer ===&lt;br /&gt;
From 0x3FF4 to 0x4000 is the BBFS footer, which simply contains a BBFS signature to identify it as a BBFS block, a sequence number used for finding the latest BBFS, and a checksum for verifying the BBFS contents.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| char&lt;br /&gt;
| Magic (BBFS or BBFL)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| int32&lt;br /&gt;
| Sequence number&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x2&lt;br /&gt;
| int16&lt;br /&gt;
| Link block #&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x2&lt;br /&gt;
| int16&lt;br /&gt;
| Checksum&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Link block #&amp;quot; field seems to be used for linking two BBFS blocks together, though this hasn&amp;#039;t been seen in any NAND dumps so far (maybe meant for NANDs larger than 4096 blocks, or containing more than 409 entries?). &lt;br /&gt;
&lt;br /&gt;
Checksum is a basic adder, the fields value is made by adding each uint16 from 0x0 - 0x3FFE, and taking the result away from 0xCAD7. For verifying, 0x0 - 0x4000 is added together, and if the result is 0xCAD7 the checksum is valid.&lt;br /&gt;
&lt;br /&gt;
== Spare data ==&lt;br /&gt;
Each 512 page page in the NAND has a 16 byte &amp;quot;spare&amp;quot; area associated with it, which is used for bad-block markers, error-correction codes and block-pointers for the [[SKSA|SA]] area.&lt;br /&gt;
&lt;br /&gt;
Unfortunately the I@H USB commands for reading/writing NAND can only access the last page-spare of each block, though hardware NAND writers can access all of them. It seems that writing a &amp;quot;block-spare&amp;quot; over USB will actually copy the spare data to all the page-spares in the block (besides the ECC section), and can also recalculate ECC itself if given ECC data of all 0xFF.&lt;br /&gt;
&lt;br /&gt;
Blocks in the SA area (containing SA1/SA2 tickets or data) also have 3 bytes in the spare used for pointing toward the next SA block, ie. SA1 ticket block -&amp;gt; SA1 data block 1 -&amp;gt; SA1 data block n -&amp;gt; SA2 ticket block, it&amp;#039;s guessed this is for working around any bad-blocks in the SA area.&lt;br /&gt;
&lt;br /&gt;
ECC is calculated using a Hamming code, as documented in [https://www.kernel.org/doc/Documentation/mtd/nand_ecc.txt the Linux kernel nand_ecc documentation], a working iQue implementation is available inside [https://github.com/emoose/iQueTool/blob/master/iQueTool/Structs/iQueBlockSpare.cs#L56 the iQueTool source code].&lt;br /&gt;
&lt;br /&gt;
So far the known spare format is:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x3&lt;br /&gt;
| bytes&lt;br /&gt;
| SA block data (1 byte, copied to all 3 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x2&lt;br /&gt;
| bytes&lt;br /&gt;
| Unknown (always 0xFF?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x1&lt;br /&gt;
| byte&lt;br /&gt;
| Bad block indicator (0 if block is bad)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x2&lt;br /&gt;
| bytes&lt;br /&gt;
| Unknown (always 0xFF?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x3&lt;br /&gt;
| bytes&lt;br /&gt;
| ECC data for 0x100-0x200 in the page&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x2&lt;br /&gt;
| bytes&lt;br /&gt;
| Unknown (always 0xFF?)&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x3&lt;br /&gt;
| bytes&lt;br /&gt;
| ECC data for 0x0-0x100 in the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=SKSA&amp;diff=965</id>
		<title>SKSA</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=SKSA&amp;diff=965"/>
		<updated>2019-02-06T19:49:44Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Some corrections; this page should really be cleaned up, and ideally a page for each of SK, SA1, and SA2 should be created.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SKSA&amp;#039;&amp;#039;&amp;#039; (Secure Kernel / System App) is the &amp;quot;Upgradeable Operating System&amp;quot; of the iQue Player, the main software that runs on the device.&lt;br /&gt;
&lt;br /&gt;
== Parts ==&lt;br /&gt;
As the name implies it consists of two parts: a [[secure kernel]], and a [[system app]]. In later SKSAs the system-app area may also be divided into two sections: SA1 and SA2.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Secure Kernel&amp;#039;&amp;#039;&amp;#039;: the &amp;#039;boot1&amp;#039; of the iQue. Doesn&amp;#039;t ever seem to change between SKSA versions, so might be similar to the Wii boot1; the hash of it is checked against a stored hash in [[Virage2]].&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;System App 1&amp;#039;&amp;#039;&amp;#039;: Consists of a [[CMD|contentDesc-less CMD]], followed by the actual SA1 data. Most SA1s are just the [[iQue Menu]], though some seem to be [[Factory Tests|factory/graphics tests]]. SA1 is responsible for handling USB communications in the two most recent SKSA versions.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;System App 2&amp;#039;&amp;#039;&amp;#039;: Also has a CMD, followed by SA2 data. Unknown purpose, in SKSAs that have an SA2 the SA1 size is greatly reduced compared to single-SA SKSAs, presumably they moved some data from SA1 into this, but it seems like dual-SA SA1s can run without needing the corresponding SA2. SA2 contains the iQue Menu in the two most recent SKSA versions.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
The format of the SKSA is simple: a 64KiB SK, followed by SA1 (CMD + data), optionally followed by SA2 (CMD + data):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x10000&lt;br /&gt;
| encrypted bytes&lt;br /&gt;
| Secure Kernel&lt;br /&gt;
|-&lt;br /&gt;
| 0x10000&lt;br /&gt;
| 0x4000&lt;br /&gt;
| CMD&lt;br /&gt;
| SA1 CMD&lt;br /&gt;
|-&lt;br /&gt;
| 0x14000&lt;br /&gt;
| sa1CMD.ContentSize&lt;br /&gt;
| encrypted bytes&lt;br /&gt;
| SA1 data&lt;br /&gt;
|-&lt;br /&gt;
| 0x14000 + sa1CMD.ContentSize&lt;br /&gt;
| 0x4000&lt;br /&gt;
| CMD&lt;br /&gt;
| SA2 CMD&lt;br /&gt;
|-&lt;br /&gt;
| 0x18000 + sa1CMD.ContentSize&lt;br /&gt;
| sa2CMD.ContentSize&lt;br /&gt;
| encrypted bytes&lt;br /&gt;
| SA2 data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NAND format ==&lt;br /&gt;
On NAND the format is slightly changed however: instead of storing the SA1 &amp;amp; SA2 data exactly as stored in the cached SKSA, the data is instead reversed in 0x4000 byte blocks (though tickets are unaffected). The NAND spare data is used to store pointers for these blocks, to allow for skipping any bad blocks in the SKSA area.&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/emoose/iQueTool/blob/master/iQueTool/Files/iQueNand.cs#L207 SetSKSAData in iQueTool] for an example on how the blocks are transformed, or see [https://github.com/emoose/iQueTool/blob/master/iQueTool/Files/iQueNand.cs#L506 GenerateSpareData] for how the SAData in the spare is set.&lt;br /&gt;
&lt;br /&gt;
The [[NAND#BBFS|BBFS]] FAT table also sets the SKSA blocks to 0xfffd (reserved), to ensure that no files will overwrite them.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
A spreadsheet of the different SKSAs that have been tested (whether it boots, what happens when it boots, etc) is available [https://docs.google.com/spreadsheets/d/13wb-jwPEJ9HV2-XUbaLr3VVkGXTrX2LEf6cGce7WdU8/edit?usp=sharing here].&lt;br /&gt;
&lt;br /&gt;
== [http://www.ique.com/products/Player_upgrade.htm Official update log] ==&lt;br /&gt;
===Jan 2004 update===&lt;br /&gt;
&lt;br /&gt;
Added Settings(管理) menu and &amp;quot;i-Timer&amp;quot; Smart Clock, allowing parents to set time limit on gaming and allowing games to use real-world time.&lt;br /&gt;
&lt;br /&gt;
===Sept 2004 update===&lt;br /&gt;
&lt;br /&gt;
Added [[iQue@Home]] support to the console.&lt;br /&gt;
&lt;br /&gt;
This update is most likely corresponds to the SKSA version 1095 as it is the first version to have [[iQue@Home]] USB support.&lt;br /&gt;
&lt;br /&gt;
[[Category:File_formats]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=905</id>
		<title>IQueCrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=905"/>
		<updated>2018-08-13T20:25:45Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Update version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=iQueCrypt&lt;br /&gt;
|HB_Author=[[User:Jbop|Jbop]]&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=GPL&lt;br /&gt;
|HB_Version=1.2.1&lt;br /&gt;
|HB_Released=August 13, 2018&lt;br /&gt;
|HB_Website=[https://github.com/jbop1626/iquecrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;iQueCrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting information from a [[CMD]] file, from a console&amp;#039;s [[ticket.sys]] file, or from a [[Virage2]] dump;&lt;br /&gt;
as well as for encrypting and decrypting apps and title keys. To obtain these files, a user will need a [[NAND]] dump of their iQue or already-extracted files. Some operations also &amp;#039;&amp;#039;require&amp;#039;&amp;#039; a Virage2 dump.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
iQueCrypt has four modes: encrypt, decrypt, extract, and ecdh. See the [https://github.com/jbop1626/iquecrypt/blob/master/USAGE.md usage manual] for more in-depth instructions.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The main use for the encrypt mode is to create an &amp;quot;injection&amp;quot;, where an app is encrypted with the recrypt key of another (legitimately-obtained) app on an iQue. When this encrypted app is run, the iQue treats it as the legitimate app, and decrypts and executes it normally. This can be used to run other, normal iQue games as well as [[:Category:Homebrew|hacks or homebrew]].&lt;br /&gt;
&lt;br /&gt;
To create an injection, follow these steps:&lt;br /&gt;
&lt;br /&gt;
# Obtain the plaintext ROM of the game you want to inject&lt;br /&gt;
# Dump the console&amp;#039;s [[NAND]] or otherwise obtain its [[recrypt.sys]] file.&lt;br /&gt;
# Dump the console&amp;#039;s [[Virage2]].&lt;br /&gt;
# Pick a game on your console to serve as the &amp;quot;host&amp;quot; for the injection and take note of its [[Content ID|content ID]] (in hex). This must be a game that has already been launched and exists as a .rec on NAND. Some games are not as compatible with others. Try to have matching save types and matching or greater hardware access and [[SKC]] access.&lt;br /&gt;
# Extract the content iv of the host game from its [[CMD]] or [[ticket]].&lt;br /&gt;
# Use the encrypt mode on the plaintext ROM, with the recrypt.sys file, Virage2 dump, content ID, and content iv obtained in the preceding steps.&lt;br /&gt;
# The output should be a .rec which is the plaintext ROM encrypted with the host&amp;#039;s recrypt key and content iv.&lt;br /&gt;
# Rename the file to (hex content ID of host game).rec&lt;br /&gt;
# Backup the original .rec of the same name on your console, and then wrie the newly generated .rec back to the NAND.&lt;br /&gt;
&lt;br /&gt;
=== Decryption ===&lt;br /&gt;
This allows the user to obtain plaintext versions of title keys and apps (if given the appropriate keys and ivs).&lt;br /&gt;
&lt;br /&gt;
=== Extraction ===&lt;br /&gt;
Extract mode can extract keys, initialization vectors, and other information from CMDs, ticket.sys files, and V2 dumps. This makes it easy to obtain the files or information a user needs to encrypt or decrypt files.&lt;br /&gt;
&lt;br /&gt;
=== ECDH ===&lt;br /&gt;
iQueCrypt can compute the ECDH of a console&amp;#039;s ECC private key and a ticket&amp;#039;s ECC public key, in order to create the AES key used to re-encrypt the title key in a game&amp;#039;s [[CMD]]. This allows the owner of an iQue to obtain the title key for each game that they own by following these steps:&lt;br /&gt;
&lt;br /&gt;
# Dump the console&amp;#039;s [[NAND]] or otherwise obtain its [[ticket.sys]] file.&lt;br /&gt;
# Dump the console&amp;#039;s [[Virage2]].&lt;br /&gt;
# Extract the iQue common key and ECC private key from the V2 dump.&lt;br /&gt;
# Extract the ticket of the desired game to obtain its (twice-encrypted) title key, title key iv, title key iv 2, and ECC public key&lt;br /&gt;
# Use the ecdh mode with the V2 ECC private key and the ticket&amp;#039;s ECC public key to generate the file ecdh_key.bin.&lt;br /&gt;
# Decrypt the title key using ecdh_key.bin and title key iv 2.&lt;br /&gt;
# Decrypt the result of the previous step with the common key and title key iv.&lt;br /&gt;
# The result of the above step will be the plaintext title key of the game or app.&lt;br /&gt;
&lt;br /&gt;
[[Category:PC utilities]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=897</id>
		<title>IQueCrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=897"/>
		<updated>2018-07-04T19:26:04Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Add injection instructions and more links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=iQueCrypt&lt;br /&gt;
|HB_Author=[[User:Jbop|Jbop]]&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=GPL&lt;br /&gt;
|HB_Version=1.2.0&lt;br /&gt;
|HB_Released=June 22, 2018&lt;br /&gt;
|HB_Website=[https://github.com/jbop1626/iquecrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;iQueCrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting information from a [[CMD]] file, from a console&amp;#039;s [[ticket.sys]] file, or from a [[Virage2]] dump;&lt;br /&gt;
as well as for encrypting and decrypting apps and title keys. To obtain these files, a user will need a [[NAND]] dump of their iQue or already-extracted files. Some operations also &amp;#039;&amp;#039;require&amp;#039;&amp;#039; a Virage2 dump.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
iQueCrypt has four modes: encrypt, decrypt, extract, and ecdh. See the [https://github.com/jbop1626/iquecrypt/blob/master/USAGE.md usage manual] for more in-depth instructions.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The main use for the encrypt mode is to create an &amp;quot;injection&amp;quot;, where an app is encrypted with the recrypt key of another (legitimately-obtained) app on an iQue. When this encrypted app is run, the iQue treats it as the legitimate app, and decrypts and executes it normally. This can be used to run other, normal iQue games as well as [[:Category:Homebrew|hacks or homebrew]].&lt;br /&gt;
&lt;br /&gt;
To create an injection, follow these steps:&lt;br /&gt;
&lt;br /&gt;
# Obtain the plaintext ROM of the game you want to inject&lt;br /&gt;
# Dump the console&amp;#039;s [[NAND]] or otherwise obtain its [[recrypt.sys]] file.&lt;br /&gt;
# Dump the console&amp;#039;s [[Virage2]].&lt;br /&gt;
# Pick a game on your console to serve as the &amp;quot;host&amp;quot; for the injection and take note of its [[Content ID|content ID]] (in hex). This must be a game that has already been launched and exists as a .rec on NAND. Some games are not as compatible with others. Try to have matching save types and matching or greater hardware access and [[SKC]] access.&lt;br /&gt;
# Extract the content iv of the host game from its [[CMD]] or [[ticket]].&lt;br /&gt;
# Use the encrypt mode on the plaintext ROM, with the recrypt.sys file, Virage2 dump, content ID, and content iv obtained in the preceding steps.&lt;br /&gt;
# The output should be a .rec which is the plaintext ROM encrypted with the host&amp;#039;s recrypt key and content iv.&lt;br /&gt;
# Rename the file to (hex content ID of host game).rec&lt;br /&gt;
# Backup the original .rec of the same name on your console, and then wrie the newly generated .rec back to the NAND.&lt;br /&gt;
&lt;br /&gt;
=== Decryption ===&lt;br /&gt;
This allows the user to obtain plaintext versions of title keys and apps (if given the appropriate keys and ivs).&lt;br /&gt;
&lt;br /&gt;
=== Extraction ===&lt;br /&gt;
Extract mode can extract keys, initialization vectors, and other information from CMDs, ticket.sys files, and V2 dumps. This makes it easy to obtain the files or information a user needs to encrypt or decrypt files.&lt;br /&gt;
&lt;br /&gt;
=== ECDH ===&lt;br /&gt;
iQueCrypt can compute the ECDH of a console&amp;#039;s ECC private key and a ticket&amp;#039;s ECC public key, in order to create the AES key used to re-encrypt the title key in a game&amp;#039;s [[CMD]]. This allows the owner of an iQue to obtain the title key for each game that they own by following these steps:&lt;br /&gt;
&lt;br /&gt;
# Dump the console&amp;#039;s [[NAND]] or otherwise obtain its [[ticket.sys]] file.&lt;br /&gt;
# Dump the console&amp;#039;s [[Virage2]].&lt;br /&gt;
# Extract the iQue common key and ECC private key from the V2 dump.&lt;br /&gt;
# Extract the ticket of the desired game to obtain its (twice-encrypted) title key, title key iv, title key iv 2, and ECC public key&lt;br /&gt;
# Use the ecdh mode with the V2 ECC private key and the ticket&amp;#039;s ECC public key to generate the file ecdh_key.bin.&lt;br /&gt;
# Decrypt the title key using ecdh_key.bin and title key iv 2.&lt;br /&gt;
# Decrypt the result of the previous step with the common key and title key iv.&lt;br /&gt;
# The result of the above step will be the plaintext title key of the game or app.&lt;br /&gt;
&lt;br /&gt;
[[Category:PC utilities]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQue_Player_Security&amp;diff=896</id>
		<title>IQue Player Security</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQue_Player_Security&amp;diff=896"/>
		<updated>2018-07-04T15:57:44Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Create security/encryption page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
&lt;br /&gt;
Unlike its predecessor the Nintendo 64, the [[iQue Player]] makes extensive use of encryption for security. This is probably due to the console&amp;#039;s USB connectivity, as well as its ability to [[IQue@Home|download games]] from the iQue server over the internet -- which would make pirating games extremely easy if they were transmitted and stored unencrypted. The security scheme is similar to that of the Wii, though more rudimentary.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The iQue makes use of several encryption algorithms:&lt;br /&gt;
&lt;br /&gt;
All symmetric encryption is done using [https://en.wikipedia.org/wiki/Advanced_Encryption_Standard AES-128-CBC]&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Elliptic-curve_cryptography ECC] (using the curve NIST B-233 / sect233r1) is used to cryptographically sign certain files, and also to generate AES keys through [https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman ECDH].&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/RSA_(cryptosystem) RSA-2048] is used to sign files.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== AES ===&lt;br /&gt;
&lt;br /&gt;
==== Secure Kernel ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key / IV&lt;br /&gt;
! Location&lt;br /&gt;
|-&lt;br /&gt;
| SK key&lt;br /&gt;
| Offset 0x1460 in the [[bootrom]]&lt;br /&gt;
|-&lt;br /&gt;
| SK IV&lt;br /&gt;
| Offset 0x1470 in the bootrom&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Title Keys ====&lt;br /&gt;
Encrypted once with the common key, and then again if the app is a game.&lt;br /&gt;
&lt;br /&gt;
(The title keys for SA&amp;#039;s are only encrypted once).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key / IV #1&lt;br /&gt;
! Location&lt;br /&gt;
|-&lt;br /&gt;
| iQue Player common key&lt;br /&gt;
| Offset 0xB8 in [[Virage2]]&lt;br /&gt;
|-&lt;br /&gt;
| Title key IV&lt;br /&gt;
| Offset 0x2814 in [[CMD]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key / IV #2&lt;br /&gt;
! Location&lt;br /&gt;
|-&lt;br /&gt;
| Derived using ECDH with console&amp;#039;s private&amp;lt;br&amp;gt;key and a public key in the game&amp;#039;s ticket&lt;br /&gt;
| See ECC section for more info&lt;br /&gt;
|-&lt;br /&gt;
| Title key IV 2&lt;br /&gt;
| Offset 0x29BC in [[ticket]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== .apps ====&lt;br /&gt;
An application/game downloaded from the iQue server, or on the console before first launch, will have the .app extension.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key / IV&lt;br /&gt;
! Location&lt;br /&gt;
|-&lt;br /&gt;
| Title key&lt;br /&gt;
| Offset 0x289C in [[CMD]]&amp;lt;br&amp;gt;This is encrypted once or twice; see above for details.&lt;br /&gt;
|-&lt;br /&gt;
| Content IV&lt;br /&gt;
| Offset 0x2838 in CMD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== .recs ====&lt;br /&gt;
If the recrypt flag is set in its CMD, a .app file will be re-encrypted and made into a .rec file on first launch.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key / IV&lt;br /&gt;
! Location&lt;br /&gt;
|-&lt;br /&gt;
| Recrypt key&amp;lt;br&amp;gt;(unique to both game and console)&lt;br /&gt;
| Encrypted 32-byte entry in [[recrypt.sys]].&amp;lt;br&amp;gt;Starts at offset 0x04 in decrypted entry.&lt;br /&gt;
|-&lt;br /&gt;
| Content IV&lt;br /&gt;
| Offset 0x2838 in [[CMD]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== recrypt.sys ====&lt;br /&gt;
Each individual 32-byte entry in the recrypt list is encrypted.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key / IV&lt;br /&gt;
! Location&lt;br /&gt;
|-&lt;br /&gt;
| Recrypt list key&lt;br /&gt;
| Offset 0xC8 in [[Virage2]]&lt;br /&gt;
|-&lt;br /&gt;
| [[recrypt.sys|Derived from BBID]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ECC ===&lt;br /&gt;
Each console contains a unique key pair located in [[Virage2]].&lt;br /&gt;
The private key is located at offset 0x98, and the public key is located at offset 0x54.&lt;br /&gt;
&lt;br /&gt;
This key pair is used to sign [[recrypt.sys]] with ECDSA to prevent tampering.&lt;br /&gt;
Game saves are also signed when being copied to NAND, and their signatures are stored in (the aptly-named) [[sig.db]].&lt;br /&gt;
&lt;br /&gt;
Each game&amp;#039;s ticket includes an ECC public key. This is used with the console&amp;#039;s private key to create a unique AES key with which to re-encrypt&lt;br /&gt;
the title key in the CMD. This derived key is created by taking the 16 bytes starting at offset 0x04 in the x-coordinate of the ECDH result.&lt;br /&gt;
&lt;br /&gt;
=== RSA ===&lt;br /&gt;
The public key is located in [[SKSA|SK]].&lt;br /&gt;
&lt;br /&gt;
Every CMD and ticket is covered by an RSA-2048 signature to prevent alterations, such as granting more hardware and secure kernel call access or changing what console the ticket is for. Unlike the Wii, the iQue Player does not suffer from the [http://wiibrew.org/wiki/Signing_bug Trucha bug], so currently there is no way to use unsigned tickets other than patching SK, or possibly taking advantage of the [[IQue Player System Flaws|&amp;quot;psychic paper&amp;quot; bug]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Recrypt.sys&amp;diff=894</id>
		<title>Recrypt.sys</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Recrypt.sys&amp;diff=894"/>
		<updated>2018-07-04T00:11:51Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Add file format category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;recrypt.sys&amp;#039;&amp;#039;&amp;#039; is a file that contains a list of the recrypt keys for each .rec that has been created by the console. The list is itself both encrypted and signed to prevent tampering.&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
&lt;br /&gt;
Most iQue apps have the &amp;quot;recrypt flag&amp;quot; set in their [[CMD]]. When a console launches these apps for the first time, a new key is generated and the plaintext app is re-encrypted using this key and the content iv from the app&amp;#039;s CMD. This ensures that each iQue has uniquely encrypted .rec files, rather than all iQues using the same encrypted files from the server or factory.&lt;br /&gt;
&lt;br /&gt;
After generating this new &amp;quot;recrypt key&amp;quot;, the console stores it in recrypt.sys, and encrypts it using the recrypt list key from the console&amp;#039;s [[Virage2]] and an initialization vector generated from the console&amp;#039;s BBID like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
uint32_t recrypt_list_iv[4] = { BBID, BBID + 1, BBID + 2, BBID + 3 } // BBID is big-endian&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
recrypt.sys is cryptographically signed, but like [[sig.db]] it is signed with an elliptic curve signature (using the console&amp;#039;s ECC private key) rather than RSA-2048. This is most likely because it must be altered and re-signed even when the console is not connected to the iQue server, and the iQue itself does not contain the RSA private key needed to sign files.&lt;br /&gt;
&lt;br /&gt;
After the signature is a 4-byte unsigned int containing the number of entries in the recrypt key list.&lt;br /&gt;
&lt;br /&gt;
Each 32-byte entry is encrypted with the above-mentioned recrypt list key and BBID-derived initialization vector. The plaintext of each entry contains the content ID of the associated .rec, the recrypt key, and an unknown 12-byte field that seems to be the same for each entry.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x40&lt;br /&gt;
| ECC signature&lt;br /&gt;
| Signed with console private key&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x04&lt;br /&gt;
| numEntries&lt;br /&gt;
| Number of entries in the recrypt list&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| (variable)&lt;br /&gt;
| Recrypt list&lt;br /&gt;
| Array of 32-byte, encrypted recrypt list entries&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Sig.db&amp;diff=893</id>
		<title>Sig.db</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Sig.db&amp;diff=893"/>
		<updated>2018-07-04T00:11:35Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;sig.db&amp;#039;&amp;#039;&amp;#039; is a file that contains a list of game save filenames and the ECC signatures of those save files. Every time a game is exited, its save file is copied back to NAND, signed with ECDSA, and the signature stored in sig.db. This is presumably to prevent altering save files externally.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;However&amp;#039;&amp;#039;, it seems that saves can actually be altered freely and the signing of saves is pointless:&lt;br /&gt;
&lt;br /&gt;
If a save&amp;#039;s signature is found to be invalid, the only effect is SA simply does not re-sign the save when it is next copied back to NAND. This means the validation of a save&amp;#039;s signature has no bearing on whether or not the save can be used.&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Sig.db&amp;diff=892</id>
		<title>Sig.db</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Sig.db&amp;diff=892"/>
		<updated>2018-07-04T00:10:31Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Create sig.db&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;sig.db&amp;#039;&amp;#039;&amp;#039; is a file that contains a list of game save filenames and the ECC signatures of those save files. Every time a game is exited, its save file is copied back to NAND, signed with ECDSA, and the signature stored in sig.db. This is presumably to prevent altering save files externally.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;However&amp;#039;&amp;#039;, it seems that saves can actually be altered freely and the signing of saves is pointless:&lt;br /&gt;
&lt;br /&gt;
If a save&amp;#039;s signature is found to be invalid, the only effect is SA simply does not re-sign the save when it is next copied back to NAND. This means the validation of a save&amp;#039;s signature has no bearing on whether or not the save can be used.&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=890</id>
		<title>IQueCrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=890"/>
		<updated>2018-06-22T21:34:02Z</updated>

		<summary type="html">&lt;p&gt;Jbop: ver/date&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=iQueCrypt&lt;br /&gt;
|HB_Author=[[User:Jbop|Jbop]]&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=GPL&lt;br /&gt;
|HB_Version=1.2.0&lt;br /&gt;
|HB_Released=June 22, 2018&lt;br /&gt;
|HB_Website=[https://github.com/jbop1626/iquecrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;iQueCrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting information from a [[CMD]] file, from a console&amp;#039;s [[ticket.sys]] file, or from a [[Virage2]] dump;&lt;br /&gt;
as well as for encrypting and decrypting apps and title keys. To obtain these files, a user will need a NAND dump of their iQue or already-extracted files. Some operations also &amp;#039;&amp;#039;require&amp;#039;&amp;#039; a Virage2 dump.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
iQueCrypt has four modes: encrypt, decrypt, extract, and ecdh. See the [https://github.com/jbop1626/iquecrypt/blob/master/USAGE.md usage manual] for more in-depth instructions.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The main use for the encrypt mode is to create an &amp;quot;injection&amp;quot;, where an app is encrypted with the recrypt key of another (legitimately-obtained) app on an iQue. When this encrypted app is run, the iQue treats it as the legitimate app, and decrypts and executes it normally. This can be used to run other, normal iQue games as well as hacks or homebrew.&lt;br /&gt;
&lt;br /&gt;
=== Decryption ===&lt;br /&gt;
This allows the user to obtain plaintext versions of title keys and apps (if given the appropriate keys and ivs).&lt;br /&gt;
&lt;br /&gt;
=== Extraction ===&lt;br /&gt;
Extract mode can extract keys, initialization vectors, and other information from CMDs, ticket.sys files, and V2 dumps. This makes it easy to obtain the files or information a user needs to encrypt or decrypt files.&lt;br /&gt;
&lt;br /&gt;
=== ECDH ===&lt;br /&gt;
iQueCrypt can compute the ECDH of a console&amp;#039;s ECC private key and a ticket&amp;#039;s ECC public key, in order to create the AES key used to re-encrypt the title key in a game&amp;#039;s CMD. This allows the owner of an iQue to obtain the title key for each game that they own by following these steps:&lt;br /&gt;
&lt;br /&gt;
# Dump the console&amp;#039;s NAND or otherwise obtain its ticket.sys file.&lt;br /&gt;
# Dump the console&amp;#039;s Virage2.&lt;br /&gt;
# Extract the iQue common key and ECC private key from the V2 dump.&lt;br /&gt;
# Extract the ticket of the desired game to obtain its (twice-encrypted) title key, title key iv, title key iv 2, and ECC public key&lt;br /&gt;
# Use the ecdh mode with the V2 ECC private key and the ticket&amp;#039;s ECC public key to generate the file ecdh_key.bin.&lt;br /&gt;
# Decrypt the title key using ecdh_key.bin and title key iv 2.&lt;br /&gt;
# Decrypt the result of the previous step with the common key and title key iv.&lt;br /&gt;
# The result of the above step will be the plaintext title key of the game or app.&lt;br /&gt;
&lt;br /&gt;
[[Category:PC utilities]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Recrypt.sys&amp;diff=887</id>
		<title>Recrypt.sys</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Recrypt.sys&amp;diff=887"/>
		<updated>2018-06-16T21:02:17Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;recrypt.sys&amp;#039;&amp;#039;&amp;#039; is a file that contains a list of the recrypt keys for each .rec that has been created by the console. The list is itself both encrypted and signed to prevent tampering.&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
&lt;br /&gt;
Most iQue apps have the &amp;quot;recrypt flag&amp;quot; set in their [[CMD]]. When a console launches these apps for the first time, a new key is generated and the plaintext app is re-encrypted using this key and the content iv from the app&amp;#039;s CMD. This ensures that each iQue has uniquely encrypted .rec files, rather than all iQues using the same encrypted files from the server or factory.&lt;br /&gt;
&lt;br /&gt;
After generating this new &amp;quot;recrypt key&amp;quot;, the console stores it in recrypt.sys, and encrypts it using the recrypt list key from the console&amp;#039;s [[Virage2]] and an initialization vector generated from the console&amp;#039;s BBID like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
uint32_t recrypt_list_iv[4] = { BBID, BBID + 1, BBID + 2, BBID + 3 } // BBID is big-endian&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
recrypt.sys is cryptographically signed, but like [[sig.db]] it is signed with an elliptic curve signature (using the console&amp;#039;s ECC private key) rather than RSA-2048. This is most likely because it must be altered and re-signed even when the console is not connected to the iQue server, and the iQue itself does not contain the RSA private key needed to sign files.&lt;br /&gt;
&lt;br /&gt;
After the signature is a 4-byte unsigned int containing the number of entries in the recrypt key list.&lt;br /&gt;
&lt;br /&gt;
Each 32-byte entry is encrypted with the above-mentioned recrypt list key and BBID-derived initialization vector. The plaintext of each entry contains the content ID of the associated .rec, the recrypt key, and an unknown 12-byte field that seems to be the same for each entry.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x40&lt;br /&gt;
| ECC signature&lt;br /&gt;
| Signed with console private key&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x04&lt;br /&gt;
| numEntries&lt;br /&gt;
| Number of entries in the recrypt list&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| (variable)&lt;br /&gt;
| Recrypt list&lt;br /&gt;
| Array of 32-byte, encrypted recrypt list entries&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=886</id>
		<title>IQueCrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=886"/>
		<updated>2018-06-16T20:50:07Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Add category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=iQueCrypt&lt;br /&gt;
|HB_Author=[[User:Jbop|Jbop]]&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=GPL&lt;br /&gt;
|HB_Version=1.1.0&lt;br /&gt;
|HB_Released=June 13, 2018&lt;br /&gt;
|HB_Website=[https://github.com/jbop1626/iquecrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;iQueCrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting information from a [[CMD]] file, from a console&amp;#039;s [[ticket.sys]] file, or from a [[Virage2]] dump;&lt;br /&gt;
as well as for encrypting and decrypting apps and title keys. To obtain these files, a user will need a NAND dump of their iQue or already-extracted files. Some operations also &amp;#039;&amp;#039;require&amp;#039;&amp;#039; a Virage2 dump.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
iQueCrypt has four modes: encrypt, decrypt, extract, and ecdh. See the [https://github.com/jbop1626/iquecrypt/blob/master/USAGE.md usage manual] for more in-depth instructions.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The main use for the encrypt mode is to create an &amp;quot;injection&amp;quot;, where an app is encrypted with the recrypt key of another (legitimately-obtained) app on an iQue. When this encrypted app is run, the iQue treats it as the legitimate app, and decrypts and executes it normally. This can be used to run other, normal iQue games as well as hacks or homebrew.&lt;br /&gt;
&lt;br /&gt;
=== Decryption ===&lt;br /&gt;
This allows the user to obtain plaintext versions of title keys and apps (if given the appropriate keys and ivs).&lt;br /&gt;
&lt;br /&gt;
=== Extraction ===&lt;br /&gt;
Extract mode can extract keys, initialization vectors, and other information from CMDs, ticket.sys files, and V2 dumps. This makes it easy to obtain the files or information a user needs to encrypt or decrypt files.&lt;br /&gt;
&lt;br /&gt;
=== ECDH ===&lt;br /&gt;
iQueCrypt can compute the ECDH of a console&amp;#039;s ECC private key and a ticket&amp;#039;s ECC public key, in order to create the AES key used to re-encrypt the title key in a game&amp;#039;s CMD. This allows the owner of an iQue to obtain the title key for each game that they own by following these steps:&lt;br /&gt;
&lt;br /&gt;
# Dump the console&amp;#039;s NAND or otherwise obtain its ticket.sys file.&lt;br /&gt;
# Dump the console&amp;#039;s Virage2.&lt;br /&gt;
# Extract the iQue common key and ECC private key from the V2 dump.&lt;br /&gt;
# Extract the ticket of the desired game to obtain its (twice-encrypted) title key, title key iv, title key iv 2, and ECC public key&lt;br /&gt;
# Use the ecdh mode with the V2 ECC private key and the ticket&amp;#039;s ECC public key to generate the file ecdh_key.bin.&lt;br /&gt;
# Decrypt the title key using ecdh_key.bin and title key iv 2.&lt;br /&gt;
# Decrypt the result of the previous step with the common key and title key iv.&lt;br /&gt;
# The result of the above step will be the plaintext title key of the game or app.&lt;br /&gt;
&lt;br /&gt;
[[Category:PC utilities]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ique-sksa-decrypt&amp;diff=885</id>
		<title>Ique-sksa-decrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ique-sksa-decrypt&amp;diff=885"/>
		<updated>2018-06-16T20:49:27Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Add category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=ique_sksa_decrypt&lt;br /&gt;
|HB_Author=marshallh&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=_&lt;br /&gt;
|HB_Version=0.2&lt;br /&gt;
|HB_Released=_&lt;br /&gt;
|HB_Website=[https://github.com/marshallh/ique_sksa_decrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ique_sksa_decrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting and decrypting the SK, SA1, or SA1+SA2 from a [[SKSA]] file dumped or extracted using (for example) [[iQueTool]]. Since SK/SA perform many of the central operations of the iQue, it is important to be able to examine them unencrypted.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
A [https://github.com/marshallh/ique_sksa_decrypt/blob/master/extract_all.bat handy batch file] is included for Windows users. Extracting and decrypting the SK requires the SK key and iv, and extracting SA1 and/or SA2 requires the iQue common key.&lt;br /&gt;
&lt;br /&gt;
[[Category:PC utilities]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=884</id>
		<title>IQueCrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=IQueCrypt&amp;diff=884"/>
		<updated>2018-06-16T20:45:58Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Created page with &amp;quot;{{Lowercase title}} {{infobox_homebrew |HB_title=iQueCrypt |HB_Author=Jbop |HB_Type=PC utility |HB_License=GPL |HB_Version=1.1.0 |HB_Released=June 13, 2018 |HB_W...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=iQueCrypt&lt;br /&gt;
|HB_Author=[[User:Jbop|Jbop]]&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=GPL&lt;br /&gt;
|HB_Version=1.1.0&lt;br /&gt;
|HB_Released=June 13, 2018&lt;br /&gt;
|HB_Website=[https://github.com/jbop1626/iquecrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;iQueCrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting information from a [[CMD]] file, from a console&amp;#039;s [[ticket.sys]] file, or from a [[Virage2]] dump;&lt;br /&gt;
as well as for encrypting and decrypting apps and title keys. To obtain these files, a user will need a NAND dump of their iQue or already-extracted files. Some operations also &amp;#039;&amp;#039;require&amp;#039;&amp;#039; a Virage2 dump.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
iQueCrypt has four modes: encrypt, decrypt, extract, and ecdh. See the [https://github.com/jbop1626/iquecrypt/blob/master/USAGE.md usage manual] for more in-depth instructions.&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The main use for the encrypt mode is to create an &amp;quot;injection&amp;quot;, where an app is encrypted with the recrypt key of another (legitimately-obtained) app on an iQue. When this encrypted app is run, the iQue treats it as the legitimate app, and decrypts and executes it normally. This can be used to run other, normal iQue games as well as hacks or homebrew.&lt;br /&gt;
&lt;br /&gt;
=== Decryption ===&lt;br /&gt;
This allows the user to obtain plaintext versions of title keys and apps (if given the appropriate keys and ivs).&lt;br /&gt;
&lt;br /&gt;
=== Extraction ===&lt;br /&gt;
Extract mode can extract keys, initialization vectors, and other information from CMDs, ticket.sys files, and V2 dumps. This makes it easy to obtain the files or information a user needs to encrypt or decrypt files.&lt;br /&gt;
&lt;br /&gt;
=== ECDH ===&lt;br /&gt;
iQueCrypt can compute the ECDH of a console&amp;#039;s ECC private key and a ticket&amp;#039;s ECC public key, in order to create the AES key used to re-encrypt the title key in a game&amp;#039;s CMD. This allows the owner of an iQue to obtain the title key for each game that they own by following these steps:&lt;br /&gt;
&lt;br /&gt;
# Dump the console&amp;#039;s NAND or otherwise obtain its ticket.sys file.&lt;br /&gt;
# Dump the console&amp;#039;s Virage2.&lt;br /&gt;
# Extract the iQue common key and ECC private key from the V2 dump.&lt;br /&gt;
# Extract the ticket of the desired game to obtain its (twice-encrypted) title key, title key iv, title key iv 2, and ECC public key&lt;br /&gt;
# Use the ecdh mode with the V2 ECC private key and the ticket&amp;#039;s ECC public key to generate the file ecdh_key.bin.&lt;br /&gt;
# Decrypt the title key using ecdh_key.bin and title key iv 2.&lt;br /&gt;
# Decrypt the result of the previous step with the common key and title key iv.&lt;br /&gt;
# The result of the above step will be the plaintext title key of the game or app.&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ique-sksa-decrypt&amp;diff=883</id>
		<title>Ique-sksa-decrypt</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ique-sksa-decrypt&amp;diff=883"/>
		<updated>2018-06-16T20:44:12Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Created page with &amp;quot;{{Lowercase title}} {{infobox_homebrew |HB_title=ique_sksa_decrypt |HB_Author=marshallh |HB_Type=PC utility |HB_License=_ |HB_Version=0.2 |HB_Released=_ |HB_Website=[https://g...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Lowercase title}}&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=ique_sksa_decrypt&lt;br /&gt;
|HB_Author=marshallh&lt;br /&gt;
|HB_Type=PC utility&lt;br /&gt;
|HB_License=_&lt;br /&gt;
|HB_Version=0.2&lt;br /&gt;
|HB_Released=_&lt;br /&gt;
|HB_Website=[https://github.com/marshallh/ique_sksa_decrypt GitHub]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ique_sksa_decrypt&amp;#039;&amp;#039;&amp;#039; is a tool for extracting and decrypting the SK, SA1, or SA1+SA2 from a [[SKSA]] file dumped or extracted using (for example) [[iQueTool]]. Since SK/SA perform many of the central operations of the iQue, it is important to be able to examine them unencrypted.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
A [https://github.com/marshallh/ique_sksa_decrypt/blob/master/extract_all.bat handy batch file] is included for Windows users. Extracting and decrypting the SK requires the SK key and iv, and extracting SA1 and/or SA2 requires the iQue common key.&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Template:Lowercase_title&amp;diff=882</id>
		<title>Template:Lowercase title</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Template:Lowercase_title&amp;diff=882"/>
		<updated>2018-06-16T20:29:21Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Lowercase title template from wiibrew&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span&amp;gt;{{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:|}}{{lcfirst:{{PAGENAME}}}}}}&amp;lt;/span&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
This is a template for lowercase titles.&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Template:Infobox_homebrew&amp;diff=881</id>
		<title>Template:Infobox homebrew</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Template:Infobox_homebrew&amp;diff=881"/>
		<updated>2018-06-16T20:07:18Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;infobox&amp;quot; cellpadding=2 cellspacing=2 width=265 style=&amp;quot;float:right;padding:4px;margin:0 0 1em 1em;font-size:11px;background-color:#f0f7ff;border:1px solid #85bff9&amp;quot;&lt;br /&gt;
|align=center colspan=2 bgcolor=#a8d1fa style=font-size:13px{{!}}&amp;#039;&amp;#039;&amp;#039;{{{HB_Title|{{PAGENAME}}}}}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Author(s)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Author|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Type|}}}&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;License&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_License|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Version&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Version|}}}&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Release date&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Released|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Website&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Website|}}}&lt;br /&gt;
|}&amp;lt;noinclude&amp;gt;{{br}}&lt;br /&gt;
==Usage==&lt;br /&gt;
{|border=1 style=border-collapse:collapse;width:70%;float:right;margin-left:1em; cellpadding=3&lt;br /&gt;
!colspan=2|Syntax&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Title=&lt;br /&gt;
|Name of the homebrew program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Author=&lt;br /&gt;
|Who wrote the program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Type=&lt;br /&gt;
|What type of program? (e.g. loader, PC utility)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_License=&lt;br /&gt;
|Released under what license (e.g. MIT, GPL, Freeware, Proprietary)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Version=&lt;br /&gt;
|Latest version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Released=&lt;br /&gt;
|Latest release date&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Website=&lt;br /&gt;
|Website for the program (e.g. where to download)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=&lt;br /&gt;
|HB_Author=&lt;br /&gt;
|HB_Type=&lt;br /&gt;
|HB_License=&lt;br /&gt;
|HB_Version=&lt;br /&gt;
|HB_Released=&lt;br /&gt;
|HB_Website=&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Infobox templates|{{PAGENAME}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Template:Infobox_homebrew&amp;diff=880</id>
		<title>Template:Infobox homebrew</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Template:Infobox_homebrew&amp;diff=880"/>
		<updated>2018-06-16T18:07:43Z</updated>

		<summary type="html">&lt;p&gt;Jbop: woops&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;infobox&amp;quot; cellpadding=2 cellspacing=2 width=265 style=&amp;quot;float:right;padding:4px;margin:0 0 1em 1em;font-size:11px;background-color:#f0f7ff;border:1px solid #85bff9&amp;quot;&lt;br /&gt;
|align=center colspan=2 bgcolor=#a8d1fa style=font-size:13px{{!}}&amp;#039;&amp;#039;&amp;#039;{{{HB_Title|{{PAGENAME}}}}}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Author(s)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Author|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Type|}}}&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;License&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_License|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Version&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Version|}}}&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Latest release date&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Released|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Website&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Website|}}}&lt;br /&gt;
|}&amp;lt;noinclude&amp;gt;{{br}}&lt;br /&gt;
==Usage==&lt;br /&gt;
{|border=1 style=border-collapse:collapse;width:70%;float:right;margin-left:1em; cellpadding=3&lt;br /&gt;
!colspan=2|Syntax&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Title=&lt;br /&gt;
|Name of the homebrew program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Author=&lt;br /&gt;
|Who wrote the program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Type=&lt;br /&gt;
|What type of program? (e.g. loader, PC utility)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_License=&lt;br /&gt;
|Released under what license (e.g. MIT, GPL, Freeware, Proprietary)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Version=&lt;br /&gt;
|Latest version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Released=&lt;br /&gt;
|Latest release date&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Website=&lt;br /&gt;
|Website for the program (e.g. where to download)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=&lt;br /&gt;
|HB_Author=&lt;br /&gt;
|HB_Type=&lt;br /&gt;
|HB_License=&lt;br /&gt;
|HB_Version=&lt;br /&gt;
|HB_Released=&lt;br /&gt;
|HB_Website=&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Infobox templates|{{PAGENAME}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Template:Infobox_homebrew&amp;diff=879</id>
		<title>Template:Infobox homebrew</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Template:Infobox_homebrew&amp;diff=879"/>
		<updated>2018-06-16T18:06:11Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Basic for now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;infobox&amp;quot; cellpadding=2 cellspacing=2 width=265 style=&amp;quot;float:right;padding:4px;margin:0 0 1em 1em;font-size:11px;background-color:#f0f7ff;border:1px solid #85bff9&amp;quot;&lt;br /&gt;
|align=center colspan=2 bgcolor=#a8d1fa style=font-size:13px{{!}}&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;{{{HB_Title|{{PAGENAME}}}}}&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Author(s)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Author|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Type|}}}&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;License&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_License|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Version&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Version|}}}&lt;br /&gt;
|-style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Latest release date&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Released|}}}&lt;br /&gt;
|-bgcolor=#cce6ff style=vertical-align:top align=left&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Website&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|{{{HB_Website|}}}&lt;br /&gt;
|}&amp;lt;noinclude&amp;gt;{{br}}&lt;br /&gt;
==Usage==&lt;br /&gt;
{|border=1 style=border-collapse:collapse;width:70%;float:right;margin-left:1em; cellpadding=3&lt;br /&gt;
!colspan=2|Syntax&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Title=&lt;br /&gt;
|Name of the homebrew program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Author=&lt;br /&gt;
|Who wrote the program&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Type=&lt;br /&gt;
|What type of program? (e.g. loader, PC utility)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_License=&lt;br /&gt;
|Released under what license (e.g. MIT, GPL, Freeware, Proprietary)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Version=&lt;br /&gt;
|Latest version&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Released=&lt;br /&gt;
|Latest release date&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;HB_Website=&lt;br /&gt;
|Website for the program (e.g. where to download)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{infobox_homebrew&lt;br /&gt;
|HB_title=&lt;br /&gt;
|HB_Author=&lt;br /&gt;
|HB_Type=&lt;br /&gt;
|HB_License=&lt;br /&gt;
|HB_Version=&lt;br /&gt;
|HB_Released=&lt;br /&gt;
|HB_Website=&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Infobox templates|{{PAGENAME}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ticket&amp;diff=878</id>
		<title>Ticket</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ticket&amp;diff=878"/>
		<updated>2018-06-15T20:25:53Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;ticket&amp;#039;&amp;#039;&amp;#039; is used to store data about an associated app and per-console information, such as encryption keys and whether or not the app is time-limited.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
A ticket (BbTicket) consists of two parts: the [[CMD|content metadata]] for the app, and a ticket head (BbTicketHead).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| -&lt;br /&gt;
| [[CMD]]&lt;br /&gt;
| Content metadata for the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| bbId&lt;br /&gt;
| ID of the console this ticket is for&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B0&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| tid&lt;br /&gt;
| ticket ID; if bit 15 is set, then it is a trial ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B2&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| code&lt;br /&gt;
| What type of trial limitation: 0 or 2 = time, 1 = number of launches&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B4&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| limit&lt;br /&gt;
| number of minutes, or number of launches, before limit is reached&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B6&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| reserved&lt;br /&gt;
| padding                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x29B8&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| tsCrlVersion&lt;br /&gt;
| ticket_crl_version&lt;br /&gt;
|-&lt;br /&gt;
| 0x29BC&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| cmdIv&lt;br /&gt;
| titlekey_iv; IV used to re-encrypt title key (with ECDH key)&lt;br /&gt;
|-&lt;br /&gt;
| 0x29CC&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| serverKey&lt;br /&gt;
| ECC public key used with console&amp;#039;s ECC private key to derive unique title key encryption key via ECDH     &lt;br /&gt;
|-&lt;br /&gt;
| 0x2A0C&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| issuer&lt;br /&gt;
| Certificate used to sign the ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A4C&lt;br /&gt;
| 0x100&lt;br /&gt;
| uint8[256]&lt;br /&gt;
| ticketSign&lt;br /&gt;
| RSA-2048 signature over all of the above &amp;#039;&amp;#039;and&amp;#039;&amp;#039; the CMD&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ticket&amp;diff=877</id>
		<title>Ticket</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ticket&amp;diff=877"/>
		<updated>2018-06-15T19:25:57Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;ticket&amp;#039;&amp;#039;&amp;#039; is used to store data about an associated app and per-console information, such as encryption keys and whether or not the app is time-limited.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
A ticket (BbTicket) consists of two parts: the [[CMD|content metadata]] for the app, and a ticket head (BbTicketHead).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| -&lt;br /&gt;
| [[CMD]]&lt;br /&gt;
| Content metadata for the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| bbId&lt;br /&gt;
| ID of the console this ticket is for&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B0&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| tid&lt;br /&gt;
| ticket ID; if bit 15 is set, then it is a trial ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B2&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| code&lt;br /&gt;
| What type of trial limitation: 0 or 2 = time, 1 = number of launches&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B4&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| limit&lt;br /&gt;
| number of minutes, or number of launches, before limit is reached&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B6&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| reserved&lt;br /&gt;
| padding                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x29B8&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| tsCrlVersion&lt;br /&gt;
| ticket_crl_version&lt;br /&gt;
|-&lt;br /&gt;
| 0x29BC&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| cmdIv&lt;br /&gt;
| titlekey_iv; IV used to re-encrypt title key (with ECDH key)&lt;br /&gt;
|-&lt;br /&gt;
| 0x29CC&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| serverKey&lt;br /&gt;
| ECC public key used with console&amp;#039;s ECC private key to derive unique title key encryption key via ECDH     &lt;br /&gt;
|-&lt;br /&gt;
| 0x2A0C&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| issuer&lt;br /&gt;
| Certificate used to sign the ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A4C&lt;br /&gt;
| 0x100&lt;br /&gt;
| uint8[256]&lt;br /&gt;
| ticketSign&lt;br /&gt;
| RSA-2048 signature over all of the above &amp;#039;&amp;#039;and&amp;#039;&amp;#039; the CMD&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ticket&amp;diff=876</id>
		<title>Ticket</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ticket&amp;diff=876"/>
		<updated>2018-06-15T19:24:48Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Add names just because&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;ticket&amp;#039;&amp;#039;&amp;#039; is used to store data about an associated app and per-console information, such as encryption keys and whether or not the app is time-limited.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
A ticket (BbTicket) consists of two parts: the [[CMD|content metadata]] for the app, and a ticket head (BbTicketHead).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| -&lt;br /&gt;
| [[CMD]]&lt;br /&gt;
| Content metadata for the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| bbId&lt;br /&gt;
| ID of the console this ticket is for&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B0&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| tid&lt;br /&gt;
| ticket ID; if bit 15 is set, then it is a trial ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B2&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| code&lt;br /&gt;
| What type of trial limitation: 0 or 2 = time, 1 = number of launches&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B4&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| limit&lt;br /&gt;
| number of minutes, or number of launches, before limit is reached&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B6&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| reserved&lt;br /&gt;
| padding                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x29B8&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| tsCrlVersion&lt;br /&gt;
| ticket_crl_version&lt;br /&gt;
|-&lt;br /&gt;
| 0x29BC&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| cmdIv&lt;br /&gt;
| titlekey_iv; IV used to re-encrypt title key (with ECDH key)&lt;br /&gt;
|-&lt;br /&gt;
| 0x29CC&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| serverKey&lt;br /&gt;
| ecc_pubkey; used with console&amp;#039;s ECC private key to derive unique title key encryption key via ECDH     &lt;br /&gt;
|-&lt;br /&gt;
| 0x2A0C&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| issuer&lt;br /&gt;
| signer; certificate used to sign the ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A4C&lt;br /&gt;
| 0x100&lt;br /&gt;
| uint8[256]&lt;br /&gt;
| ticketSign&lt;br /&gt;
| RSA-2048 signature over all of the above &amp;#039;&amp;#039;and&amp;#039;&amp;#039; the CMD&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=CMD&amp;diff=875</id>
		<title>CMD</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=CMD&amp;diff=875"/>
		<updated>2018-06-15T19:18:33Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Complete rewrite to fix basically everything, took stuff from Title Data as well (that should now be deleted)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;content metadata&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;CMD&amp;#039;&amp;#039;&amp;#039; is a file or structure used to store data about an iQue app, such as encryption keys, its access to secure kernel calls, and its access to various hardware. It is used on its own in [[SKSA]] (where SA1 and SA2 both have their own attached CMD) and also contained as part of every [[ticket]]. &lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
A CMD consists of two parts: &amp;#039;&amp;#039;&amp;#039;contentDesc&amp;#039;&amp;#039;&amp;#039;, an optional 0x2800-byte long structure containing information about a game such as its save type, title, and thumbnail image; and &amp;#039;&amp;#039;&amp;#039;BbContentMetaDataHead&amp;#039;&amp;#039;&amp;#039;. The former is not used in the content metadata for SAs.&lt;br /&gt;
&lt;br /&gt;
=== contentDesc ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| EEPROM RDRAM location (typically 0x807C0000, 0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| EEPROM size (either 0x200 or 0x800)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Flash RDRAM location (typically 0x807C0000, 0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Flash size (0x20000 if used)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| SRAM RDRAM location (typically 0x807C0000, 0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| SRAM size (0x8000 if used)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Controller Pak 0 RDRAM location (could be 0x807C0000 or 0x807C0000, 0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Controller Pak 1 RDRAM location (0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Controller Pak 2 RDRAM location (0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Controller Pak 3 RDRAM location (0 if unused)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Controller Pak size (0x8000 when used)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Probably osRomBase (always 0xB0000000?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Probably osTvType (always 1? which is for NTSC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Probably osMemSize (always 0x400000? for no expansion pak)&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Unknown, possibly another libultra boot param&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| Unknown, possibly another libultra boot param&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x03&lt;br /&gt;
| chars&lt;br /&gt;
| &amp;quot;CAM&amp;quot;, unknown purpose&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| 0x01&lt;br /&gt;
| byte&lt;br /&gt;
| Number of &amp;quot;.u0x&amp;quot; files for this game?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| Thumb image length (can&amp;#039;t be more than 0x4000, decompressed size must be exactly 0x1880)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| Title image length (can&amp;#039;t be more than 0x10000, how exactly would that even fit?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| &amp;#039;&amp;#039;Thumb image length&amp;#039;&amp;#039;&lt;br /&gt;
| bytes&lt;br /&gt;
| Gzipped thumb image RGBA5551 (56px * 56px)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48 + &amp;#039;&amp;#039;Thumb image length&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Title image length&amp;#039;&amp;#039;&lt;br /&gt;
| bytes&lt;br /&gt;
| Gzipped title image RGBA5551 (184px * 24px)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48 + &amp;#039;&amp;#039;Thumb image length&amp;#039;&amp;#039; + &amp;#039;&amp;#039;Title image length&amp;#039;&amp;#039;&lt;br /&gt;
| 0x27B8 - image lengths&lt;br /&gt;
| chars&lt;br /&gt;
| Title name + ISBN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BbContentMetaDataHead ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x2800&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| unusedPadding&lt;br /&gt;
| padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x2804&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| caCrlVersion&lt;br /&gt;
| Certificate Authority(?) CRL version&lt;br /&gt;
|-&lt;br /&gt;
| 0x2808&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| cpCrlVersion&lt;br /&gt;
| Content Protection(?) CRL version&lt;br /&gt;
|-&lt;br /&gt;
| 0x280C&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| size&lt;br /&gt;
| Size (in bytes) of the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x2810&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| descFlags&lt;br /&gt;
| Seemingly unused/unchecked; bit 0 set if the associated app is SA  &lt;br /&gt;
|-&lt;br /&gt;
| 0x2814&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| commonCmdIv&lt;br /&gt;
| titlekey_iv; IV used to encrypt title key (with common key)                &lt;br /&gt;
|-&lt;br /&gt;
| 0x2824&lt;br /&gt;
| 0x14&lt;br /&gt;
| uint8[20]&lt;br /&gt;
| hash&lt;br /&gt;
| SHA-1 hash of the plaintext of the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x2838&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| iv&lt;br /&gt;
| content_iv; IV used to encrypt content&lt;br /&gt;
|-&lt;br /&gt;
| 0x2848&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| execFlags&lt;br /&gt;
| Despite the name, only one use/flag is known: if bit 1 is set (the &amp;quot;recrypt flag&amp;quot;), the associated app will be re-encrypted on first launch&lt;br /&gt;
|-&lt;br /&gt;
| 0x284C&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| hwAccessRights&lt;br /&gt;
| bitfield, each bit enables access to some MMIO regs new to iQue Player:&lt;br /&gt;
* bits 0-7: new PI stuff              &lt;br /&gt;
* bit 0: PI buffer used for aes/NAND read output and PI DMA (1KB at PI_BASE+0x10000)    &lt;br /&gt;
* bit 1: NAND flash regs in PI        &lt;br /&gt;
* bit 2: memory mapper for old PI dma &lt;br /&gt;
* bit 3: hardware AES-engine in PI&lt;br /&gt;
* bit 4: new PI dma engine, DMAs  from/to PI buffer&lt;br /&gt;
* bit 5: new GPIO; power + LED&lt;br /&gt;
* bit 6: external IO bus stuff (debug?)&lt;br /&gt;
* bit 7: new PI error stuff&lt;br /&gt;
* bit 8: enables access to USB regs&lt;br /&gt;
* bit 9: enables access to internal ram used for SK stack  &lt;br /&gt;
(0x0000 for games except for Animal Forest which is 0x0033, 0x0013 for iQue Club, 0x01F7/0x01B3 for SA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2850&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| secureKernelRights&lt;br /&gt;
| Which [[SKC|secure kernel calls]] the associated app can use, one bit per syscall: bit 0 allows SKC 0, etc.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2854&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| bbid&lt;br /&gt;
| If not zero, can only be run on the specified console (used for SAs, not games) &lt;br /&gt;
|-&lt;br /&gt;
| 0x2858&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| issuer&lt;br /&gt;
| Certificate used to sign the cmd&lt;br /&gt;
|-&lt;br /&gt;
| 0x2898&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| id&lt;br /&gt;
| Content ID of the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x289C&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| key&lt;br /&gt;
| The associated app&amp;#039;s title key. It is encrypted once with the common key. If the associated app is not an SA, then it is encrypted &amp;#039;&amp;#039;again&amp;#039;&amp;#039; with a key derived using the result of ECDH with the console&amp;#039;s private key in the Virage2 and the public key in the app&amp;#039;s ticket.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28AC&lt;br /&gt;
| 0x100&lt;br /&gt;
| uint8[256]&lt;br /&gt;
| contentMetaDataSign&lt;br /&gt;
| RSA-2048 signature over all of the above, but before the title key is encrypted a second time.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ticket&amp;diff=874</id>
		<title>Ticket</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ticket&amp;diff=874"/>
		<updated>2018-06-15T17:53:31Z</updated>

		<summary type="html">&lt;p&gt;Jbop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;ticket&amp;#039;&amp;#039;&amp;#039; is used to store data about an associated app and per-console information, such as encryption keys and whether or not the app is time-limited.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
A ticket consists of two parts: the [[CMD|content metadata]] for the app, and a ticket head.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| -&lt;br /&gt;
| [[CMD]]&lt;br /&gt;
| Content metadata for the associated app&lt;br /&gt;
|-&lt;br /&gt;
| 0x29AC&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| bbId&lt;br /&gt;
| ID of the console this ticket is for&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B0&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| tid&lt;br /&gt;
| ticket ID; if bit 15 is set, then it is a trial ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B2&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| code&lt;br /&gt;
| What type of trial limitation: 0 or 2 = time, 1 = number of launches&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B4&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| limit&lt;br /&gt;
| number of minutes, or number of launches, before limit is reached&lt;br /&gt;
|-&lt;br /&gt;
| 0x29B6&lt;br /&gt;
| 0x02&lt;br /&gt;
| uint16&lt;br /&gt;
| reserved&lt;br /&gt;
| padding                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x29B8&lt;br /&gt;
| 0x04&lt;br /&gt;
| uint32&lt;br /&gt;
| tsCrlVersion&lt;br /&gt;
| ticket_crl_version&lt;br /&gt;
|-&lt;br /&gt;
| 0x29BC&lt;br /&gt;
| 0x10&lt;br /&gt;
| uint8[16]&lt;br /&gt;
| cmdIv&lt;br /&gt;
| titlekey_iv; IV used to re-encrypt title key (with ECDH key)&lt;br /&gt;
|-&lt;br /&gt;
| 0x29CC&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| serverKey&lt;br /&gt;
| ecc_pubkey; used with console&amp;#039;s ECC private key to derive unique title key encryption key via ECDH     &lt;br /&gt;
|-&lt;br /&gt;
| 0x2A0C&lt;br /&gt;
| 0x40&lt;br /&gt;
| uint8[64]&lt;br /&gt;
| issuer&lt;br /&gt;
| signer; certificate used to sign the ticket&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A4C&lt;br /&gt;
| 0x100&lt;br /&gt;
| uint8[256]&lt;br /&gt;
| ticketSign&lt;br /&gt;
| RSA-2048 signature over all of the above &amp;#039;&amp;#039;and&amp;#039;&amp;#039; the CMD&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Ticket.sys&amp;diff=873</id>
		<title>Ticket.sys</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Ticket.sys&amp;diff=873"/>
		<updated>2018-06-15T17:25:44Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Fix/rewrite page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;ticket.sys&amp;#039;&amp;#039;&amp;#039; is a file that contains the [[ticket]] for each app installed on the console. &lt;br /&gt;
&lt;br /&gt;
In the code there appears to be a hard limit of 48 tickets in ticket.sys. There may be further practical limits on the number of tickets in ticket.sys (and therefore also on the number of titles installed on a console).&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x04&lt;br /&gt;
| numTickets&lt;br /&gt;
| Number of tickets contained in the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| (variable)&lt;br /&gt;
| Tickets&lt;br /&gt;
| Array of [[ticket|tickets]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Recrypt.sys&amp;diff=872</id>
		<title>Recrypt.sys</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Recrypt.sys&amp;diff=872"/>
		<updated>2018-06-15T15:49:53Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Create recrypt.sys&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;recrypt.sys&amp;#039;&amp;#039;&amp;#039; is a file that contains a list of the recrypt keys for each .rec that has been created by the console. The list is itself both encrypted and signed to prevent tampering.&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
&lt;br /&gt;
Most iQue apps have the &amp;quot;recrypt flag&amp;quot; set in their [[CMD]]. When a console launches these apps for the first time, a new key is generated and the plaintext app is re-encrypted using this key and the content iv from the app&amp;#039;s CMD. This ensures that each iQue has uniquely encrypted .rec files, rather than all iQues using the same encrypted files from the server or factory.&lt;br /&gt;
&lt;br /&gt;
After generating this new &amp;quot;recrypt key&amp;quot;, the console stores it in recrypt.sys, and encrypts it using the recrypt list key from the console&amp;#039;s [[Virage2]] and an initialization vector generated from the console&amp;#039;s BBID like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
uint32_t recrypt_list_iv[4] = { BBID, BBID + 1, BBID + 2, BBID + 3 } // BBID is big-endian&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
recrypt.sys is cryptographically signed, but like [[sigs.db]] it is signed with an elliptic curve signature (using the console&amp;#039;s ECC private key) rather than RSA-2048. This is most likely because it must be altered and re-signed even when the console is not connected to the iQue server, and the iQue itself does not contain the RSA private key needed to sign files.&lt;br /&gt;
&lt;br /&gt;
After the signature is a 4-byte unsigned int containing the number of entries in the recrypt key list.&lt;br /&gt;
&lt;br /&gt;
Each 32-byte entry is encrypted with the above-mentioned recrypt list key and BBID-derived initialization vector. The plaintext of each entry contains the content ID of the associated .rec, the recrypt key, and an unknown 12-byte field that seems to be the same for each entry.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
! Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x40&lt;br /&gt;
| ECC signature&lt;br /&gt;
| Signed with console private key&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x04&lt;br /&gt;
| numEntries&lt;br /&gt;
| Number of entries in the recrypt list&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| (variable)&lt;br /&gt;
| Recrypt list&lt;br /&gt;
| Array of 32-byte, encrypted recrypt list entries&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
	<entry>
		<id>http://www.iquebrew.org/index.php?title=Virage2&amp;diff=866</id>
		<title>Virage2</title>
		<link rel="alternate" type="text/html" href="http://www.iquebrew.org/index.php?title=Virage2&amp;diff=866"/>
		<updated>2018-06-02T21:01:33Z</updated>

		<summary type="html">&lt;p&gt;Jbop: Fixed ECC public/private key lengths and offsets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Virage2 is a 16K EEPROM bank located inside the SoC that can only be read in secure mode (mapped at &amp;lt;tt&amp;gt;0xBFCA0000&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
! Note&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 0x14 || skHash || Secure Kernel hash&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x40 || romPatch || ROM patch bitmap (4 x 0x10)&lt;br /&gt;
|-&lt;br /&gt;
| 0x54 || 0x40 || publicKey || Per-console ECC public key&lt;br /&gt;
|-&lt;br /&gt;
| 0x94 || 0x04 || bbId || Per-console ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x98 || 0x20 || privateKey || Per-console ECC private key&lt;br /&gt;
|-&lt;br /&gt;
| 0xB8 || 0x10 || bootAppKey || Common key&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8 || 0x10 || recryptListKey || Per-console key&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8 || 0x10 || appStateKey || Per-console key&lt;br /&gt;
|-&lt;br /&gt;
| 0xE8 || 0x10 || selfMsgKey || Per-console key&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8 || 0x04 || csumAdjust || Per-console checksum adjustment&lt;br /&gt;
|-&lt;br /&gt;
| 0xFC || 0x04 || jtagEnable || JTAG status field&lt;/div&gt;</summary>
		<author><name>Jbop</name></author>
	</entry>
</feed>