FiloSottile / FiloSottile/mkcert
Add ML-DSA certificate generation (--mldsa flag) using Go 1.27 crypto/mldsa
- Dominant language
- Go
- Stars
- 59.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
France's ANSSI will [stop certifying security products without post-quantum cryptography starting in 2027](https://gizmodo.com/the-quantum-threat-to-encryption-is-coming-france-just-set-a-2027-deadline-2000773650) - the first hard regulatory deadline of its kind globally. Additional mandates: US NSA CNSA 2.0 (2027), NIST IR 8547 (deprecation by 2030, disallowed by 2035), EU critical infrastructure (2030).
## Summary
mkcert currently supports RSA and ECDSA certificates. With Go 1.27 shipping `crypto/mldsa` (FIPS 204) with full `crypto/x509` ML-DSA support, mkcert could add a `--mldsa` flag (parallel to the existing `--ecdsa` flag) for generating locally-trusted ML-DSA development certificates.
This would make mkcert the easiest way for any developer to create PQC certificates for local testing.
## Proposed API
```bash
# Generate ML-DSA root CA + leaf certificate
mkcert --mldsa localhost 127.0.0.1 ::1
# Generate ML-DSA root CA only
mkcert --mldsa --install
```
## Context
- Go 1.27's `crypto/mldsa` proposal is [Accepted](https://github.com/golang/go/issues/77626) with `crypto/x509` ML-DSA signing support
- [age v1.3.0](https://github.com/FiloSottile/age/releases/tag/v1.3.0) already shipped PQC (hybrid ML-KEM-768)
- Microsoft AD CS shipped ML-DSA certificates (GA, May 2026)
- AWS Private CA shipped PQC certificates (GA, November 2025)
## Implementation Notes
The change would be modest — a new branch in `generateKey()` (`cert.go`) alongside the existing ECDSA and RSA paths. Go 1.27's `crypto/x509` handles ML-DSA certificate creation natively.
I'm aware of the maintenance discussion in #664 and am happy to contribute the implementation if this is something you'd accept.
## References
- [Go crypto/mldsa proposal (Accepted)](https://github.com/golang/go/issues/77626)
- [NIST FIPS 204 (ML-DSA)](https://csrc.nist.gov/pubs/fips/204/final)
Contributor guide
Research direction
Start in cert.go at generateKey(), comparing the existing ECDSA and RSA paths. Read Go 1.27's crypto/mldsa and crypto/x509 support, then trace how the --ecdsa flag is wired into certificate generation. Done means --mldsa supports the shown root and leaf certificate commands and produces locally trusted certificates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100