0x01 S01PacketEncryptionRequest

Requests the client to enable encryption by sending the server's RSA public key, a verify token (random challenge), and server ID for Mojang session auth.

Clientbound (Server → Client) · LOGIN · net/minecraft/network//S01PacketEncryptionRequest.java
loginauthenticationencryptionsecurity

Fields

FieldTypeDescription
serverIdStringServer ID for Mojang session auth (empty string in 1.8.9)
publicKeybyte[] (DER-encoded)Server's RSA public key for encrypting the shared secret
verifyTokenbyte[] (4 random bytes)Random challenge bytes the client must encrypt and return

Wire Encoding

FieldTypeNotes
Server IDStringUsually empty for auth
Public Key LengthVarIntLength of DER-encoded RSA public key
Public Keybyte[]Server's RSA public key in DER format
Verify Token LengthVarIntLength of verify token
Verify Tokenbyte[]4 random bytes for challenge-response

MCP References

MCPNetHandlerLoginClient.handleEncryptionRequest()

Handler Interface

HNDINetHandlerLoginClient

Notes

After receiving this, the client generates a random AES shared secret, encrypts it + the verify token with the server's public key, and sends them back in C01PacketEncryptionResponse. Also authenticates with Mojang's session server using the serverId hash.

implementation Implementation Cases

CrackedBypass

Intercept encryption request, respond with fake authentication.

Vanilla hook: EventReceivePacket
AuthSpoof

Intercept encryption request, respond with fake authentication.

Vanilla hook: EventReceivePacket
← Back to all packets