Skip to main content

Crate steel_crypto

Crate steel_crypto 

Source
Expand description

Cryptographic utilities for SteelMC, focused on RSA signing and verification for secure chat message validation.

This module implements the cryptographic primitives needed for Minecraft’s signed chat system, including RSA key pair generation, SHA256withRSA signing, and signature verification.

Re-exports§

pub use rsa_utils::CryptError;
pub use rsa_utils::generate_key_pair;
pub use rsa_utils::public_key_from_bytes;
pub use rsa_utils::public_key_to_bytes;
pub use signature::SignatureUpdater;
pub use signature::SignatureValidator;
pub use signature::Signer;

Modules§

key_store
This module contains the KeyStore struct, which is used to store the server’s encryption keys.
rsa_utils
RSA key pair generation and encoding utilities.
signature
RSA signature creation and verification utilities.

Constants§

RSA_KEY_BITS
Size of RSA keys in bits
SIGNATURE_BYTES
Size of RSA signatures in bytes (for 1024-bit RSA keys, signatures are 128 bytes) Note: Minecraft protocol specifies 256 bytes, but 1024-bit RSA produces 128-byte signatures
SIGNING_ALGORITHM
Signing algorithm used for chat messages (SHA256withRSA)