What is Attestation?
Attestation is a hardware-backed authentication method that provides exceptional security for Minecraft servers. It’s a modern 2FA (two-factor authentication) approach that leverages cryptographic keys stored securely in the user’s device hardware.Attestation stands out as a primary 2FA option due to its user-friendliness when compared to TOTP (Time-based One-Time Password) apps. TOTP can be effectively utilized as a secondary 2FA method for devices that don’t support attestation.
How It Works
Attestation authentication uses public-key cryptography with hardware-backed key storage:Key Characteristics
Hardware-Backed
Private keys are generated and stored in secure hardware (TPM, Secure Enclave, etc.), never exposed to software.
Phishing-Resistant
Unlike passwords or TOTP codes, attestation signatures are unique per challenge and can’t be reused or intercepted.
User-Friendly
Users authenticate with a simple device confirmation (fingerprint, PIN, etc.) instead of typing codes.
Cryptographically Secure
Uses modern elliptic curve cryptography (EC) with SHA256 hashing for strong security guarantees.
Registration vs Signing Flow
Registration Flow
Registration is a one-time setup process where the player establishes their attestation key with your server.Client generates key pair
Ember Client requests the device hardware to generate a new cryptographic key pair. The private key remains securely stored in hardware.
Client sends public key
An
InAttestationRegister packet is sent back containing:- Status (SUCCESS, SIGNING_NOT_ALLOWED, USER_CANCELLED, etc.)
- Public key (if successful) in X.509 format
Possible Registration Results
Key pair generated successfully. The public key is available via
getPublicKey().The user’s device doesn’t support hardware attestation. Offer TOTP as an alternative.
The user cancelled the registration prompt on their device.
An unexpected error occurred during key generation.
Signing Flow
Signing is performed each time you need to authenticate a player (e.g., login, sensitive operations).Client signs challenge
Ember Client asks the device hardware to sign the challenge bytes using the stored private key.
Client sends signature
An
InAttestationSign packet is sent back containing:- Status (SUCCESS, KEY_DOES_NOT_EXIST, USER_CANCELLED, etc.)
- Signed data (if successful)
Possible Signing Results
Challenge signed successfully. The signature is available via
getSignedData().No attestation key has been registered. The user needs to register first.
The device doesn’t support attestation or permission was revoked.
The verification bytes sent by the server were invalid or corrupted.
The user cancelled the signing prompt on their device.
An unexpected error occurred during signing.
Security Benefits
Attestation provides several security advantages over traditional authentication methods:Protection against password theft
Protection against password theft
Even if an attacker steals a player’s password, they cannot authenticate without access to the player’s physical device and biometric/PIN authentication.
Phishing resistance
Phishing resistance
Unlike TOTP codes that can be phished and immediately reused, attestation signatures are:
- Unique to each challenge
- Bound to the specific verification data
- Impossible to replay
No shared secrets
No shared secrets
Hardware-bound authentication
Hardware-bound authentication
The private key is cryptographically bound to the device’s secure hardware:
- Cannot be extracted or copied
- Cannot be used on another device
- Requires physical access and user confirmation
Modern cryptography
Modern cryptography
Uses industry-standard algorithms:
- Elliptic Curve (EC) cryptography for key pairs
- SHA256 hashing for data integrity
- ECDSA (Elliptic Curve Digital Signature Algorithm) for signatures
How It Supplements Server Security
Attestation is designed to work alongside your existing security measures:Integration Patterns
- Login 2FA
- Sensitive Commands
- Session Verification
- Account Recovery
Require attestation verification during player login:
Layered Security Approach
Attestation works best as part of a comprehensive security strategy:Password/Account Protection
Your existing authentication system (passwords, AuthMe, etc.) as the first layer.
Technical Implementation Details
Cryptographic Specifications
Data Encoding
All binary data (keys, signatures, challenges) is Base64-encoded during transmission:- Public keys are sent as Base64-encoded X.509 key specs
- Signatures are sent as Base64-encoded byte arrays
- Challenges are sent as Base64-encoded byte arrays
ByteBufWrapper).
Limitations and Considerations
Device Compatibility
Attestation requires compatible hardware:
- Windows: TPM 2.0
- macOS: Secure Enclave (Mac with Apple Silicon or T2 chip)
- Linux: TPM 2.0 (varies by distribution)
- Mobile: Platform-specific secure elements
User Experience
Users must:
- Have biometrics or PIN configured on their device
- Approve each signing request
- Have physical access to their registered device
Key Management
Server operators must:
- Securely store public keys
- Implement key revocation mechanisms
- Handle key rotation if needed
- Back up key databases
Error Handling
Handle all possible failure states:
- Device not supported
- User cancellation
- Network timeouts
- Key verification failures
Next Steps
Implementation Guide
Follow our step-by-step guide to implement attestation in your plugin
Events Reference
Learn about the attestation events and how to handle them
Packet System
Understand the underlying packet communication system
API Reference
Explore the complete API documentation