Table of Contents

Class AuthSizeLimits

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Size limits for authentication broadcast fields. Used by server-side validation to reject oversized payloads before any crypto work.

public static class AuthSizeLimits
Inheritance
AuthSizeLimits
Inherited Members

Fields

CreateAccountMaxFieldSize

Maximum allowed size in bytes for any single encrypted field in CreateAccountBroadcast.

public const int CreateAccountMaxFieldSize = 2048

Field Value

int

MaxConnectionTokenLength

Maximum allowed length for the ConnectionToken string in ClientHandshake.

public const int MaxConnectionTokenLength = 512

Field Value

int

MaxCookieSize

Maximum allowed size in bytes for the stateless cookie in ClientHandshake.

public const int MaxCookieSize = 128

Field Value

int

MaxGameVersionLength

Maximum allowed length for the GameVersion string in ClientHandshake.

public const int MaxGameVersionLength = 64

Field Value

int

MaxPublicKeySize

Maximum allowed size in bytes for the client's X25519 public key. X25519 keys are 32 bytes; limit is 64 to allow for future algorithm changes.

public const int MaxPublicKeySize = 64

Field Value

int

MaxSrpEphemeralSize

Maximum allowed size in bytes for the encrypted PublicEphemeral field (SRP client A or server B). SRP-6a 4096-bit ephemeral (512 bytes) + AES-GCM overhead (~28 bytes) = generous cap at 1024.

public const int MaxSrpEphemeralSize = 1024

Field Value

int

MaxSrpProofSize

Maximum allowed size in bytes for the encrypted Proof field (SrpProofBroadcast). SRP-6a client proof M1 = 64 bytes (SHA-512) + AES-GCM overhead (~28 bytes) = generous cap at 256.

public const int MaxSrpProofSize = 256

Field Value

int

MaxSrpSaltSize

Maximum allowed size in bytes for the encrypted Salt field (SrpVerifyResponseBroadcast). SRP-6a salt (max 64 bytes) + AES-GCM overhead (~28 bytes) = generous cap at 256.

public const int MaxSrpSaltSize = 256

Field Value

int

MaxSrpUsernameSize

Maximum allowed size in bytes for the encrypted Username field in SrpVerifyRequestBroadcast. AES-GCM overhead (~28 bytes) + encrypted username (max 128 bytes plaintext) = generous cap at 512.

public const int MaxSrpUsernameSize = 512

Field Value

int

MaxTokenAuthSize

Maximum allowed size in bytes for the encrypted Token field in TokenAuthBroadcast. AES-GCM encrypted signed auth token = generous cap at 1024.

public const int MaxTokenAuthSize = 1024

Field Value

int

MaxTotpCodeSize

Maximum allowed size in bytes for the encrypted Code field in TwoFactorVerifyBroadcast. Encrypted 6-digit TOTP code + AES-GCM overhead (~28 bytes) = generous cap at 128.

public const int MaxTotpCodeSize = 128

Field Value

int