Skip to main content

Key Authentication (1.19+)

Minecraft 1.19 introduced a new security feature: cryptographic key-based authentication for player messages and chat. Gate provides configuration to control this behavior through the forceKeyAuthentication setting.

What is Key Authentication?

Starting in Minecraft 1.19, Mojang introduced a system where:
  • Each player has a cryptographic public/private key pair
  • Chat messages are cryptographically signed by the player’s private key
  • Servers can verify message authenticity using the player’s public key
  • This prevents message tampering and impersonation
This feature is part of Mojang’s “Secure Chat” system designed to enable server-side moderation and ensure message authenticity.

Configuration

The key authentication setting is configured in your config.yml:
Gate defaults to forceKeyAuthentication: true for security and compatibility.

Behavior

When enabled:
  • ✅ Players must provide a valid cryptographic key during authentication
  • ✅ Chat messages can be cryptographically verified
  • ✅ Compatible with Mojang’s secure chat features
  • ✅ Supports chat reporting and moderation features
  • ✅ Follows Minecraft’s security standards
  • ⚠️ Some modded clients may have issues

Benefits

  1. Message Authenticity: Verify messages haven’t been tampered with
  2. Player Verification: Ensure messages are from the claimed player
  3. Moderation Support: Enable Mojang’s server-side moderation features
  4. Future Compatibility: Prepared for future Minecraft security features

Disabled

Disabling key authentication reduces security and disables some Minecraft 1.19+ features.

Behavior

When disabled:
  • ⚠️ Players can connect without providing cryptographic keys
  • ⚠️ Chat messages cannot be cryptographically verified
  • ⚠️ Secure chat features are disabled
  • ⚠️ Chat reporting may not function correctly
  • ✅ Compatible with modded clients that don’t support key authentication
  • ✅ No key verification overhead

When to Disable

Disable key authentication only when:
  1. Modded Clients: Your community uses heavily modded clients that don’t support key authentication
  2. Custom Clients: Using custom authentication systems
  3. Privacy Concerns: Avoiding Mojang’s chat reporting system
  4. Legacy Support: Supporting older client modifications
Most legitimate Minecraft clients (vanilla, Forge, Fabric) fully support key authentication. Only disable if you have specific compatibility requirements.

Technical Details

Authentication Flow (Enabled)

  1. Player Login: Player connects to Gate
  2. Key Request: Gate requests player’s public key
  3. Key Provision: Client sends public key signed by Mojang
  4. Key Verification: Gate verifies key signature with Mojang’s API
  5. Session Establishment: Player authenticated with verified key
  6. Message Signing: All chat messages are cryptographically signed

Authentication Flow (Disabled)

  1. Player Login: Player connects to Gate
  2. Skip Key Request: Gate does not request public key
  3. Session Establishment: Player authenticated without key verification
  4. Unsigned Messages: Chat messages are not cryptographically signed

Security Implications

With Key Authentication (Enabled)

Strengths:
  • 🔒 Messages are cryptographically signed
  • 🔒 Impersonation is cryptographically prevented
  • 🔒 Message tampering is detectable
  • 🔒 Supports Mojang’s moderation infrastructure
Limitations:
  • ⚠️ Depends on Mojang’s key infrastructure
  • ⚠️ May break some modded clients
  • ⚠️ Enables Mojang’s chat reporting system

Without Key Authentication (Disabled)

Risks:
  • ⚠️ Messages can be forged by proxy/plugins
  • ⚠️ No cryptographic verification of message origin
  • ⚠️ Chat impersonation possible
  • ⚠️ Incompatible with secure chat features
Benefits:
  • ✅ Compatible with all clients
  • ✅ No dependency on Mojang’s key servers
  • ✅ Greater privacy (no chat reporting)

Chat Signing and Validation

How It Works

When forceKeyAuthentication: true:

Signature Structure

Each message includes:
  • Message Content: The actual chat text
  • Timestamp: When the message was sent
  • Salt: Random value to prevent replay attacks
  • Signature: Cryptographic signature over the above
The signature ensures the message hasn’t been modified since the player sent it.

Compatibility

Client Compatibility

Some modified clients (especially those designed to bypass Mojang’s systems) may not support key authentication.

Server Compatibility

Backend servers must support key authentication:
  • Paper 1.19+: Full support ✅
  • Spigot 1.19+: Full support ✅
  • Vanilla 1.19+: Full support ✅
  • Fabric 1.19+: Full support with mods ✅
  • Modded servers: Depends on mods ⚠️

Chat Reporting

Key authentication enables Mojang’s controversial Player Chat Reporting feature:

What is Chat Reporting?

  • Players can report messages to Mojang
  • Mojang’s moderation team reviews reports
  • Violators can receive global bans
  • Cryptographic signatures prove message authenticity
This is a controversial feature in the Minecraft community, as it allows Mojang to enforce moderation on private servers.

Disabling Chat Reporting

If you want to disable Mojang’s chat reporting: Option 1: Disable key authentication (not recommended)
Option 2: Use backend server plugins (recommended) Install plugins on backend servers:
Using backend plugins allows you to keep forceKeyAuthentication: true for security while disabling chat reporting features.

Configuration Examples

Privacy-Focused Server

Modded/Custom Client Server

Backend Server Configuration

Paper Servers

Paper respects Gate’s key authentication settings. No additional configuration needed. Optional: Enforce chat signatures Edit config/paper-global.yml:
Setting enforce-secure-profile: true will kick players without valid keys, even if Gate allows them.

Spigot Servers

Spigot automatically handles key authentication based on Gate’s configuration.

Vanilla Servers

Vanilla servers support key authentication by default: server.properties:
Set enforce-secure-profile=false to allow Gate to control key authentication.

Troubleshooting

Players Can’t Connect (1.19+)

Symptoms: “Invalid signature for profile public key” or similar errors Causes:
  • Key authentication mismatch between Gate and backend
  • Backend server enforcing secure profiles
  • Client not providing valid keys
Solutions:
  1. Verify Gate configuration:
  2. Check backend server settings:
  3. Test with vanilla client to rule out modded client issues

Modded Clients Can’t Connect

Symptoms: Connection refused, authentication errors Cause: Modded client doesn’t support key authentication Solution: Disable key authentication
This reduces security. Ensure you trust your player base.

Chat Messages Not Signed

Symptoms: Backend plugins report unsigned messages Causes:
  • forceKeyAuthentication: false in Gate
  • Player using client < 1.19
  • Backend stripping signatures
Solutions:
  1. Enable key authentication:
  2. Check backend configuration isn’t stripping signatures
  3. Verify client version is 1.19+

Chat Reporting Not Working

Symptoms: Players can’t report messages Causes:
  • Key authentication disabled
  • Backend plugin blocking chat reports
  • Invalid key signatures
Solutions:
  1. Enable key authentication:
  2. Remove chat reporting blocking plugins (No Chat Reports, etc.)
  3. Verify player keys are valid

Best Practices

For Public Servers

Recommended: Enable key authentication
Benefits:
  • Maximum security
  • Full Minecraft feature support
  • Message authenticity verification

For Modded Servers

Consider disabling if modded clients have issues
Trade-offs:
  • Better mod compatibility
  • Reduced security
  • Manual moderation required

For Private Servers

Balance security and privacy needs
Option A: Enable with chat report blocking
Option B: Disable for privacy

Version History

Players on Minecraft versions before 1.19 can still connect; they simply won’t have their messages signed.