Documentation ¶
Overview ¶
Package crypto used to encrypt communication channel.
After establishing a connection to a CM server, the server and client go through a handshake process that establishes an encrypted connection. Client messages are encrypted using AES with a session key that is generated by the client during the handshake. There exists evidence that a connection can be unencrypted, because of the export restriction of strong cryptography from the US, but it has not been observed.
Steps: 1. Server requests the client to encrypt traffic within the specified universe (normally Public) 2. Client generates a 256bit session key. 3. This key is encrypted by a 1024bit public RSA key for the specific universe. 4. The encrypted key is sent to the server, along with a 32bit crc of the encrypted key. 5. The server replies with an unencrypted success/failure message. 6. All traffic from here is AES encrypted with the session key.
Symmetric crypto * All messages after the handshake are AES encrypted. * A random 16 byte IV is generated for every message. * This IV is AES encrypted in ECB mode using the session key generated during the handshake. * Message data is encrypted with AES using the generated (not encrypted) IV and session key in CBC mode. * The encrypted IV and encrypted message data are concatenated together and sent off.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aes ¶
type Aes struct {
// contains filtered or unexported fields
}
Aes is data encryptor
type ChannelReadyEvent ¶
type ChannelReadyEvent struct{}
ChannelReadyEvent is fired when successful EncryptResult is received, and channel is encrypted.
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module used to encrypt communication channel.
func NewModule ¶
func NewModule(cl *steamprotocol.Client, eventManager *steamprotocol.EventManager) *Module
NewModule initialize new instance of crypto Module.