<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3AJava_Edition_protocol%2FEncryption</id>
	<title>Minecraft:Java Edition protocol/Encryption - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3AJava_Edition_protocol%2FEncryption"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/Encryption&amp;action=history"/>
	<updated>2026-10-24T18:19:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/Encryption&amp;diff=175844&amp;oldid=prev</id>
		<title>SyncBot: Sync: updated from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/Encryption&amp;diff=175844&amp;oldid=prev"/>
		<updated>2026-08-03T11:05:27Z</updated>

		<summary type="html">&lt;p&gt;Sync: updated from Minecraft&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:05, 3 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &#039;&#039;&#039;C&#039;&#039;&#039;→&#039;&#039;&#039;S&#039;&#039;&#039;: [[Minecraft:Java Edition protocol/Packets#Handshake|Handshake]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;State=2&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &#039;&#039;&#039;C&#039;&#039;&#039;→&#039;&#039;&#039;S&#039;&#039;&#039;: [[Minecraft:Java Edition protocol/Packets#Handshake|Handshake]] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Intent is either Login or Transfer&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Start|Login Start]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Start|Login Start]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/Encryption&amp;diff=160868&amp;oldid=prev</id>
		<title>SyncBot: Sync: new page from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Java_Edition_protocol/Encryption&amp;diff=160868&amp;oldid=prev"/>
		<updated>2026-07-06T11:11:46Z</updated>

		<summary type="html">&lt;p&gt;Sync: new page from Minecraft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Exclusive|Java}}&lt;br /&gt;
This article describes the &amp;#039;&amp;#039;&amp;#039;encryption&amp;#039;&amp;#039;&amp;#039; used by the [[Minecraft:Java Edition protocol|&amp;#039;&amp;#039;Java Edition&amp;#039;&amp;#039; protocol]].&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Handshake|Handshake]] State=2&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Start|Login Start]]&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]]&lt;br /&gt;
# &amp;#039;&amp;#039;Client authentication (if enabled)&amp;#039;&amp;#039;&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Encryption Response|Encryption Response]]&lt;br /&gt;
# &amp;#039;&amp;#039;Server authentication (if enabled)&amp;#039;&amp;#039;&lt;br /&gt;
# &amp;#039;&amp;#039;Both enable encryption&amp;#039;&amp;#039;&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: [[Minecraft:Java Edition protocol/Packets#Login Success|Login Success]]&lt;br /&gt;
&lt;br /&gt;
See [[Minecraft:Java Edition protocol/FAQ|Protocol FAQ]] for a full list of packets exchanged after encryption.&lt;br /&gt;
&lt;br /&gt;
== Server ID String ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Update (1.7.x):&amp;#039;&amp;#039;&amp;#039; The server ID is now sent as an empty string. Hashes also utilize the public key, so they will still be correct.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Pre-1.7.x:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The server ID string is a randomly-generated string of characters with a maximum length of 20 code points (the client disconnects with an exception if the length is longer than 20).&lt;br /&gt;
&lt;br /&gt;
The client appears to arrive at incorrect hashes if the server ID string contains certain unprintable characters, so for consistent results only characters with code points in the range U+0021-U+007E (inclusive) should be sent.  This range corresponds to all of ASCII with the exception of the space character (U+0020) and all control characters (U+0000-U+001F, U+007F).&lt;br /&gt;
&lt;br /&gt;
The client appears to arrive at incorrect hashes if the server ID string is too short.  15 to 20 (inclusive) length strings have been observed from the vanilla server and confirmed to work as of 1.5.2.&lt;br /&gt;
&lt;br /&gt;
== Key Exchange ==&lt;br /&gt;
&lt;br /&gt;
The server generates a 1024-bit RSA keypair on startup. The public key sent in the Encryption Request packet is encoded in {{wikipedia|ASN.1}} {{wikipedia|X.690#DER_encoding|DER}} format. This is a general-purpose binary format common in cryptography, conceptually similar to [[Minecraft:Minecraft Wiki:Projects/wiki.vg merge/NBT|NBT]]. The schema is the same as the &amp;lt;code&amp;gt;SubjectPublicKeyInfo&amp;lt;/code&amp;gt; structure defined by {{wikipedia|X.509}} (not a full-blown X.509 certificate!):&lt;br /&gt;
&lt;br /&gt;
 SubjectPublicKeyInfo ::= SEQUENCE {&lt;br /&gt;
   algorithm SEQUENCE {&lt;br /&gt;
     algorithm         OBJECT IDENTIFIER&lt;br /&gt;
     parameters        ANY OPTIONAL&lt;br /&gt;
   }&lt;br /&gt;
   subjectPublicKey  BIT STRING&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 SubjectPublicKey ::= SEQUENCE {&lt;br /&gt;
   modulus           INTEGER&lt;br /&gt;
   publicExponent    INTEGER&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(See the [[#External links]] section of this article for further information.)&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re struggling to import this using a crypto library, try to find a function that loads a DER encoded public key. If you can&amp;#039;t find one, you can convert it to the more common PEM encoding by base64-encoding the raw bytes and wrapping the base64 text in &amp;#039;-----BEGIN PUBLIC KEY-----&amp;#039; and &amp;#039;-----END PUBLIC KEY-----&amp;#039;. See this example of a PEM encoded key: https://git.io/v7Ol9&lt;br /&gt;
&lt;br /&gt;
It is also possible for a modified or custom server to use a longer RSA key, without breaking official clients.&lt;br /&gt;
&lt;br /&gt;
== Symmetric Encryption ==&lt;br /&gt;
&lt;br /&gt;
When it receives an Encryption Request from the server, the client will generate a random 16-byte (128-bit) shared secret, to be used with the AES/CFB8 stream ciphers. It then encrypts the shared secret and verify token with the server&amp;#039;s public key (PKCS#1 v1.5 padded), and sends both to the server in an Encryption Response packet. Both byte arrays in the Encryption Response packet will be 128 bytes long because of the padding. This is the only time the client uses the server&amp;#039;s public key.&lt;br /&gt;
&lt;br /&gt;
{{Warning|In your crypto library, ensure that you set up your &amp;quot;feedback/segment size&amp;quot; to 8 bits or 1 byte, as indicated in the name AES/CFB&amp;#039;&amp;#039;&amp;#039;8&amp;#039;&amp;#039;&amp;#039;. Any other feedback size will result in encryption mismatch.}}&lt;br /&gt;
&lt;br /&gt;
The server decrypts the shared secret and token using its private key, and checks if the token is the same. It then enables AES/CFB8 encryption and sends the Login Success packet encrypted. The server makes two ciphers, one for encryption and one for decryption, with the key and initial vector (IV) both set to the shared secret. The client does the same, setting up its own two ciphers identically. From this point forward, everything is encrypted, including the length field, packet ID, and data length (if compression is enabled).&lt;br /&gt;
&lt;br /&gt;
{{Warning|Note that the AES cipher is updated continuously, not finished and restarted every packet.}}&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
If enabled during [[Minecraft:Java Edition protocol/Packets#Encryption Request|Encryption Request]], both server and client need to make a request to sessionserver.mojang.com.&lt;br /&gt;
&lt;br /&gt;
=== Client ===&lt;br /&gt;
&lt;br /&gt;
After generating the shared secret, the client generates the following hash:&lt;br /&gt;
&lt;br /&gt;
 sha1 := Sha1()&lt;br /&gt;
 sha1.update(ASCII encoding of the server id string from Encryption Request) &lt;br /&gt;
 sha1.update(shared secret) &lt;br /&gt;
 sha1.update(server&amp;#039;s encoded public key from Encryption Request) &lt;br /&gt;
 hash := sha1.hexdigest()  # String of hex characters&lt;br /&gt;
{{Warning|Note that the Sha1.hexdigest() method used by Minecraft is non standard. It doesn&amp;#039;t match the digest method found in most programming languages and libraries. It works by treating the sha1 output bytes as one large integer in two&amp;#039;s complement and then printing the integer in base 16, placing a minus sign if the interpreted number is negative. Here are some examples of Minecraft&amp;#039;s hexdigest:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sha1(Notch) :  4ed1f46bbe04bc756bcb17c0c7ce3e4632f06a48&lt;br /&gt;
sha1(jeb_)  : -7c9d5b0044c130109a5d7b5fb5c317c02b4e28c1&lt;br /&gt;
sha1(simon) :  88e16a1019277b15d58faf0541e11910eb756f6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the [[#Sample Code]] section below for example implementations of this.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The resulting hash is then sent via an HTTP POST request to&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://sessionserver.mojang.com/session/minecraft/join&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
With the following sent as post data. You &amp;#039;&amp;#039;must&amp;#039;&amp;#039; have the Content-Type header set to application/json or you will get a 415 Unsupported Media Type or 403 Forbidden response.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;accessToken&amp;quot;: &amp;quot;&amp;lt;accessToken&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;selectedProfile&amp;quot;: &amp;quot;&amp;lt;player&amp;#039;s uuid without dashes&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;serverId&amp;quot;: &amp;quot;&amp;lt;serverHash&amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fields &amp;lt;accessToken&amp;gt; and the player&amp;#039;s uuid were received by the client during [[Minecraft:Microsoft authentication#Authenticate with Minecraft|authentication]].&lt;br /&gt;
&lt;br /&gt;
If everything goes well, the client will receive a &amp;quot;204 No Content&amp;quot; response.&lt;br /&gt;
&lt;br /&gt;
Note that only the last serverId/hash sent to this endpoint for a given player will cause the hasJoined endpoint below to respond with a 200 OK, otherwise it will be a 204 No Content.&lt;br /&gt;
&lt;br /&gt;
The server will respond with &amp;quot;403 Forbidden&amp;quot; if the player&amp;#039;s Xbox profile has multiplayer disabled, with the following response:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;error&amp;quot;: &amp;quot;InsufficientPrivilegesException&amp;quot;,&lt;br /&gt;
    &amp;quot;path&amp;quot;: &amp;quot;/session/minecraft/join&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, if the player was banned from Multiplayer then the server will respond with the following error:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;error&amp;quot;: &amp;quot;UserBannedException&amp;quot;,&lt;br /&gt;
    &amp;quot;path&amp;quot;: &amp;quot;/session/minecraft/join&amp;quot;,&lt;br /&gt;
    &amp;quot;errorMessage&amp;quot;: &amp;quot;Human readable error description.&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you forget to include a body with your request and just send an empty POST request, or if you use a malformed Content-Type header, you&amp;#039;ll get this non-descriptive error:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;error&amp;quot;: &amp;quot;Forbidden&amp;quot;,&lt;br /&gt;
    &amp;quot;path&amp;quot;: &amp;quot;/session/minecraft/join&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server ===&lt;br /&gt;
&lt;br /&gt;
After decrypting the shared secret in the second Encryption Response, the server generates the login hash as above and sends a HTTP GET to&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://sessionserver.mojang.com/session/minecraft/hasJoined?username=&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;username&amp;#039;&amp;#039;&amp;amp;serverId=&amp;#039;&amp;#039;hash&amp;#039;&amp;#039;&amp;amp;ip=&amp;#039;&amp;#039;ip&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The username is case insensitive and must match the client&amp;#039;s username (which was received in the Login Start packet). Note that this is the in-game nickname of the selected profile, not the Mojang account name (which is never sent to the server).&lt;br /&gt;
Servers should use the name sent in the &amp;quot;name&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
The ip field is optional and when present should be the IP address of the connecting player; it is the one that originally initiated the session request. The vanilla server includes this only when &amp;lt;code&amp;gt;prevent-proxy-connections&amp;lt;/code&amp;gt; is set to true in server.properties.&lt;br /&gt;
&lt;br /&gt;
The response is a JSON object containing the user&amp;#039;s UUID and skin blob&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;id&amp;quot;: &amp;quot;&amp;lt;profile identifier&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;&amp;lt;player name&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;properties&amp;quot;: [ &lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;textures&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;: &amp;quot;&amp;lt;base64 string&amp;gt;&amp;quot;,&lt;br /&gt;
            &amp;quot;signature&amp;quot;: &amp;quot;&amp;lt;base64 string; signed data using Yggdrasil&amp;#039;s private key&amp;gt;&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;id&amp;quot; and &amp;quot;name&amp;quot; fields are then sent back to the client using a Login Success packet. The profile id in the json response has format&lt;br /&gt;
&amp;quot;11111111222233334444555555555555&amp;quot; which needs to be changed into format &amp;quot;11111111-2222-3333-4444-555555555555&amp;quot; before sending it back to the client.&lt;br /&gt;
&lt;br /&gt;
=== Sample Code ===&lt;br /&gt;
&lt;br /&gt;
Examples of generating Minecraft-style hex digests:&lt;br /&gt;
&lt;br /&gt;
* C++: https://git.io/JfTkx&lt;br /&gt;
* C#: https://git.io/fhjp6&lt;br /&gt;
* Go: http://git.io/-5ORag&lt;br /&gt;
* Java: http://git.io/vzbmS&lt;br /&gt;
* node.js: http://git.io/v2ue_A&lt;br /&gt;
* PHP: https://git.io/fxcFY&lt;br /&gt;
* Python: https://git.io/vQFUL&lt;br /&gt;
* Rust: https://git.io/fj6P0&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{Missing information|section|type=old|talksection=Online mode was not always tied to encryption|when offline mode became unencrypted}}&lt;br /&gt;
{{HistoryTable&lt;br /&gt;
|{{HistoryLine|Java Edition}}&lt;br /&gt;
|{{HistoryLine||1.3.1|dev=12w17a|Encryption of the protocol is introduced.}}&lt;br /&gt;
|{{HistoryLine||?|Offline mode is now unencrypted.}}&lt;br /&gt;
|{{HistoryLine||1.20.5|dev=24w03a|Protocol encryption can now be used in offline mode again.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://msdn.microsoft.com/en-us/library/windows/desktop/bb648640(v=vs.85).aspx DER Encoding of ASN.1 Types]&lt;br /&gt;
* [http://luca.ntop.org/Teaching/Appunti/asn1.html A Layman&amp;#039;s Guide to a Subset of ASN.1, BER, and DER]&lt;br /&gt;
* [https://gist.github.com/Lazersmoke/9947ada8acdd74a8b2e37d77cf1e0fdc Serializing an RSA Key Manually]&lt;br /&gt;
* [https://gist.github.com/ZWORX52/91b244b313e5210ba07023be9caaef5a Encryption using OpenSSL v3.0 functions (no clientside functions for making Encryption Request)]&lt;br /&gt;
* [https://gist.github.com/3900517 Encrypt shared secret using OpenSSL (old)]&lt;br /&gt;
* [http://pastebin.com/8eYyKZn6 Generate RSA-Keys and building the ASN.1v8 structure of the x.509 certificate using Crypto++]&lt;br /&gt;
* [http://pastebin.com/7Jvaama1 Decrypt shared secret using Crypto++]&lt;br /&gt;
* [http://pastebin.com/MjvR0T98 De/Encrypt data via AES using Crypto++]&lt;br /&gt;
* [https://github.com/SirCmpwn/Craft.Net/blob/master/source/Craft.Net.Networking/AesStream.cs C# AES/CFB support with bouncy castle on Mono]&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox Java Edition technical|General}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Protocol Details]]&lt;br /&gt;
[[Category:Java Edition protocol]]&lt;br /&gt;
{{license wiki.vg}}&lt;/div&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
</feed>