Documentation ¶
Overview ¶
Package auth implements functions to deal with x.509 & RSA crypto.
Many, many thanks to #mcdevs from Freenode and it's great documentation: http://wiki.vg/Protocol_Encryption http://wiki.vg/Protocol_FAQ
Index ¶
Constants ¶
const BaseUrl = "http://session.minecraft.net/game/checkserver.jsp?user=%s&serverId=%s"
Variables ¶
This section is empty.
Functions ¶
func AuthDigest ¶
AuthDigest computes a special SHA-1 digest required for Minecraft web authentication on Premium servers (online-mode=true). Source: http://wiki.vg/Protocol_Encryption#Server
Also many, many thanks to SirCmpwn and his wonderful gist (C#): https://gist.github.com/SirCmpwn/404223052379e82f91e6
func CheckUser ¶
CheckUser send's a HTTP request to session.minecraft.net to check player's authenticity. Only used by the server when online-mode=true.
func EncryptionBytes ¶
func EncryptionBytes() []byte
EncryptionBytes returns 4 random bytes or nil. Useful for Protocol Encryption (packets 0xFC & 0xFD).
func GenerateKeyPair ¶
func GenerateKeyPair() *rsa.PrivateKey
GenerateKeyPair generates a 1024 bit RSA keypair.
func KeyExchange ¶
KeyExchange marshals a RSA Public Key in ASN.1 format as defined by x.509 (serialises a public key to DER-encoded PKIX format). See crypto/x509: x509.MarshalPKIXPublicKey.
Types ¶
This section is empty.