Crate skrillax_security

source ·
Expand description

This module underpins the security aspects of the network communication between a Silkroad Online client and server. It provides the building blocks to establish a common encryption secret (SilkroadEncryption) through a handshake (handshake::ActiveHandshake, handshake::PassiveHandshake), which als provide CRC and count security checks. This provided without any I/O, such that you could feasibly add it to whatever setup you have, or you can use the skrillax-stream crate that provides an async version on top of tokio (albeit with a bit more than just the handshake).

The main way you want to be interfacing with this crate is through the handshake structs of which there are two: handshake::ActiveHandshake & handshake::PassiveHandshake. As the name suggests, the handshake is composed of an active and a passive part, usually being the server and the client respectively. The server is considered the active part of the handshake, because it will start the handshake procedure by sending the passive part (i.e. the client) initialization data. After which a few more messages will be exchanged until both parties have both setup their security bytes (MessageCounter & Checksum) as well as the shared encryption (SilkroadEncryption). Please refer to the documentation of the individual handshake element for more information about the procedure of a handshake.

Each of the three elements (MessageCounter, Checksum, and SilkroadEncryption) can be used independently of each other if so desired.

Re-exports§

Modules§

  • The handshake module provides both sides of the handshake used to establish the security features of a connection between two Silkroad Online participants, usually a server and a client.

Structs§

  • Generates a CRC checksum according to the algorithm used in Silkroad Online.
  • A builder to update the digest of the checksum incrementally.
  • A cryptographic counter for verifying message order.
  • Handles the encryption/decryption of data in Silkroad Online.

Enums§