<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/index.php?action=history&amp;feed=atom&amp;title=FRDU%3AGetMyApproachContext</id>
	<title>FRDU:GetMyApproachContext - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/index.php?action=history&amp;feed=atom&amp;title=FRDU%3AGetMyApproachContext"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FRDU:GetMyApproachContext&amp;action=history"/>
	<updated>2026-05-13T02:54:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FRDU:GetMyApproachContext&amp;diff=22930&amp;oldid=prev</id>
		<title>TimmSkiller: Created page with &quot;=Request= {{IPC/Request}} {{IPC/RequestHeader|0x0033|0|0}} {{IPC/RequestEnd}}  =Request Static Buffers= {{IPC/RequestStaticBuffers}} {{#vardefine:ipc_offset|0}} {{IPC/Translat...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FRDU:GetMyApproachContext&amp;diff=22930&amp;oldid=prev"/>
		<updated>2024-12-16T20:01:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Request= {{IPC/Request}} {{IPC/RequestHeader|0x0033|0|0}} {{IPC/RequestEnd}}  =Request Static Buffers= {{IPC/RequestStaticBuffers}} {{#vardefine:ipc_offset|0}} {{IPC/Translat...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Request=&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{IPC/RequestHeader|0x0033|0|0}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
=Request Static Buffers=&lt;br /&gt;
{{IPC/RequestStaticBuffers}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/TranslateStaticBuffer|Output [[Friend_Services#Encrypted_ApproachContext_Payload|encrypted ApproachContext payload]] buffer|0}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x0033|1|2}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/TranslateStaticBuffer|Output [[Friend_Services#Encrypted_ApproachContext_Payload|encrypted ApproachContext payload]] buffer|0}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
Creates an encrypted payload containing information that can be used to add this console as a friend locally. (See [[Friend_Services#Approach_Contexts|Approach Contexts]] for details)&lt;br /&gt;
&lt;br /&gt;
First, the 0x1E0-sized [[Friend_Services#ApproachContext|ApproachContext]] structure is created and user&amp;#039;s personal Mii is encrypted using [[APT:Wrap]]. If the user doesn&amp;#039;t have a personal Mii yet, the 0x70-sized field in the approach context is set to all zeros.&lt;br /&gt;
&lt;br /&gt;
The populated structure is then encrypted with AES-CCM using [[PS:EncryptSignDecryptVerifyAesCcm]] and keytype 8 ([[AES_Registers#Keyslots|Keyslot 0x36]]), the nonce being the concatenated little-endian Principal ID and Friend Code of the console (total nonce size 12). The nonce is returned in plaintext at offset 0x4-0x10. Note that the ApproachContext is located at 0x10 and that is where the actually encrypted section begins. In other words, the AES-CCM encrypted section is located at offset 0x10 thru 0x1F0.&lt;/div&gt;</summary>
		<author><name>TimmSkiller</name></author>
	</entry>
</feed>