
Enhancing SSH Security with Post-Quantum Cryptography
GitHub has taken a proactive step to bolster the security of SSH Git connections by integrating post-quantum cryptography (PQC). This move is designed to safeguard developer workflows and sensitive data against the emerging threat posed by future quantum computers, which could potentially break current cryptographic standards.
The Quantum Threat and “Store Now, Decrypt Later”
The development of powerful quantum computers presents a long-term risk to modern cryptography. A particular concern is the “store now, decrypt later” attack, where adversaries could collect encrypted data today, store it, and then decrypt it in the future once sufficiently powerful quantum computers become available. To mitigate this, a transition to quantum-resistant algorithms is essential.
Introducing CRYSTALS-Dilithium (dilithium3)
GitHub has specifically enabled the `dilithium3` algorithm, which is part of the CRYSTALS-Dilithium family. This algorithm was selected by the National Institute of Standards and Technology (NIST) for standardization due to its robust security properties and efficiency. It is designed to resist attacks from quantum computers.
A Hybrid Approach for Enhanced Protection
To ensure continuous security, GitHub employs a hybrid approach. The `dilithium3` algorithm is used in conjunction with existing classical SSH key types, such as `ecdsa-sk` or `ed25519-sk`. This means that even if a vulnerability were discovered in the `dilithium3` algorithm, the connection would still be protected by the established classical cryptography. This layered defense provides a strong security posture during the transition to PQC.
Client Requirements and Implementation
To benefit from GitHub’s post-quantum SSH security, users need to update their SSH clients to OpenSSH 9.0 or later. This version of OpenSSH includes support for the necessary PQC algorithms. GitHub’s implementation leverages libssh, a robust SSH library, to handle these advanced cryptographic operations.
Users can verify if their client is using the new algorithms by checking their SSH client’s debug output. The `KEX` (Key Exchange) algorithm should show `[email protected]` or similar hybrid algorithms, indicating that both classical and quantum-resistant key exchange methods are being used.
GitHub’s Leadership in PQC Adoption
By enabling PQC for SSH Git connections, GitHub has become the first major code hosting platform to offer this level of advanced security. This initiative is part of a broader commitment to transitioning to post-quantum cryptography across its services, including ongoing work for web authentication using WebAuthn.
How to Enable and Verify PQC SSH
Users with OpenSSH 9.0 or newer clients will automatically attempt to use the new hybrid key exchange algorithms when connecting to GitHub. To explicitly configure a client to prioritize these algorithms, users can modify their `~/.ssh/config` file:
- Add `KexAlgorithms [email protected],curve25519-sha256` to ensure the hybrid algorithm is preferred.
- Ensure SSH keys are generated using `ecdsa-sk` or `ed25519-sk` for optimal compatibility with the hybrid approach.
Verifying the connection can be done by running `ssh -vT [email protected]` and looking for the `KEX` line in the output, which should confirm the use of the `[email protected]` algorithm.
Looking Ahead
This deployment represents a crucial step in preparing for the quantum era. GitHub’s commitment to integrating advanced cryptographic solutions helps ensure the long-term security and integrity of the software development ecosystem.

