{"id":34724608,"url":"https://github.com/luxfi/qzmq","last_synced_at":"2026-05-24T01:32:24.534Z","repository":{"id":310589545,"uuid":"1040399150","full_name":"luxfi/qzmq","owner":"luxfi","description":"Quantum-safe ZeroMQ transport with ML-KEM and ML-DSA","archived":false,"fork":false,"pushed_at":"2026-05-13T04:31:10.000Z","size":2831,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-13T06:34:40.789Z","etag":null,"topics":["cryptography","encryption","golang","ml-dsa","ml-kem","post-quantum","quantum-safe","zeromq"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luxfi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-18T23:24:02.000Z","updated_at":"2026-05-13T04:31:13.000Z","dependencies_parsed_at":"2025-08-19T04:19:24.668Z","dependency_job_id":"2b00f2bd-30ac-42e9-ae34-761c1befed78","html_url":"https://github.com/luxfi/qzmq","commit_stats":null,"previous_names":["luxfi/qzmq"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/luxfi/qzmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxfi%2Fqzmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxfi%2Fqzmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxfi%2Fqzmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxfi%2Fqzmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxfi","download_url":"https://codeload.github.com/luxfi/qzmq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxfi%2Fqzmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33418547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"ssl_error","status_checked_at":"2026-05-23T22:14:43.778Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","encryption","golang","ml-dsa","ml-kem","post-quantum","quantum-safe","zeromq"],"created_at":"2025-12-25T02:20:04.338Z","updated_at":"2026-05-24T01:32:24.513Z","avatar_url":"https://github.com/luxfi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QZMQ - Quantum-Safe ZeroMQ\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/luxfi/qzmq.svg)](https://pkg.go.dev/github.com/luxfi/qzmq)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\nQZMQ (QuantumZMQ) is a post-quantum secure transport layer for ZeroMQ that provides quantum-resistant encryption, authentication, and key exchange using NIST-standardized algorithms.\n\n## Features\n\n- **Post-Quantum Security**: ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms\n- **High Performance**: Hardware-accelerated AES-GCM, zero-copy operations\n- 🔑 **Hybrid Modes**: Combine classical (X25519) and post-quantum algorithms\n- **0-RTT Resumption**: Fast reconnection with session tickets\n- 🛡️ **DoS Protection**: Stateless cookies and rate limiting\n- 🔄 **Automatic Key Rotation**: Time and volume-based key updates\n\n## Installation\n\n```bash\ngo get github.com/luxfi/qzmq\n```\n\n## Quick Start\n\n### Basic Usage\n\n```go\npackage main\n\nimport (\n    \"log\"\n    \"github.com/luxfi/qzmq\"\n)\n\nfunc main() {\n    // Create QZMQ transport with default options\n    transport, err := qzmq.New(qzmq.DefaultOptions())\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer transport.Close()\n\n    // Server\n    server, err := transport.NewSocket(qzmq.REP)\n    if err != nil {\n        log.Fatal(err)\n    }\n    server.Bind(\"tcp://*:5555\")\n\n    // Client\n    client, err := transport.NewSocket(qzmq.REQ)\n    if err != nil {\n        log.Fatal(err)\n    }\n    client.Connect(\"tcp://localhost:5555\")\n\n    // Send quantum-safe encrypted message\n    client.Send([]byte(\"Hello Quantum World\"))\n    \n    // Receive and decrypt\n    msg, _ := server.Recv()\n    log.Printf(\"Received: %s\", msg)\n}\n```\n\n### Advanced Configuration\n\n```go\n// Configure for maximum quantum security\nopts := qzmq.Options{\n    Suite: qzmq.Suite{\n        KEM:  qzmq.MLKEM1024,    // Strongest post-quantum KEM\n        Sign: qzmq.MLDSA3,       // Strongest signatures\n        AEAD: qzmq.AES256GCM,    // Hardware-accelerated\n    },\n    Mode: qzmq.ModePQOnly,       // Reject non-PQ algorithms\n    KeyRotation: qzmq.KeyRotationPolicy{\n        MaxMessages: 1\u003c\u003c30,      // Rotate after 1B messages\n        MaxBytes:    1\u003c\u003c40,      // Rotate after 1TB\n        MaxAge:      5*time.Minute,\n    },\n}\n\ntransport, err := qzmq.New(opts)\n```\n\n## Cryptographic Suites\n\n| Suite | KEM | Signature | AEAD | Security Level |\n|-------|-----|-----------|------|----------------|\n| **Conservative** | ML-KEM-1024 | ML-DSA-3 | AES-256-GCM | 192-bit |\n| **Balanced** | ML-KEM-768 | ML-DSA-2 | AES-256-GCM | 128-bit |\n| **Hybrid** | X25519+ML-KEM-768 | ML-DSA-2 | AES-256-GCM | 128-bit |\n| **Performance** | X25519 | Ed25519 | ChaCha20-Poly1305 | 128-bit |\n\n## Performance\n\nBenchmark results on Apple M2:\n\n```\nBenchmarkHandshake/Classical-8         5000    235124 ns/op\nBenchmarkHandshake/Hybrid-8            2000    892341 ns/op\nBenchmarkHandshake/PQOnly-8            1000   1243567 ns/op\nBenchmarkEncrypt/AES256GCM-8        1000000      1053 ns/op\nBenchmarkEncrypt/ChaCha20-8          500000      2341 ns/op\n```\n\nThroughput:\n- Classical: 10 Gbps\n- Hybrid: 8 Gbps  \n- PQ-Only: 6 Gbps\n\n## Security Properties\n\n**Quantum Resistance**: Secure against attacks by quantum computers  \n**Perfect Forward Secrecy**: Past sessions remain secure if keys are compromised  \n**Authenticated Encryption**: All messages are encrypted and authenticated  \n**Replay Protection**: Sequence numbers prevent message replay  \n**Downgrade Protection**: Cryptographic binding prevents algorithm downgrade  \n\n## Architecture\n\n```\nQZMQ Transport Layer\n├── Backend Abstraction\n│   └── Go Backend (pebbe/zmq4)\n├── Cryptographic Core\n│   ├── KEM (ML-KEM, X25519, Hybrid)\n│   ├── Signatures (ML-DSA, Ed25519)\n│   ├── AEAD (AES-GCM, ChaCha20)\n│   └── KDF (HKDF-SHA256/384)\n├── Protocol Engine\n│   ├── Handshake (1-RTT)\n│   ├── Session Management\n│   ├── Key Rotation\n│   └── 0-RTT Resumption\n└── Security Features\n    ├── Anti-DoS Cookies\n    ├── Rate Limiting\n    └── Certificate Validation\n```\n\n## Examples\n\nSee the [examples/](examples/) directory for:\n- [Basic client/server](examples/basic/)\n- [Pub/sub with encryption](examples/pubsub/)\n- [Router/dealer patterns](examples/router/)\n- [Key rotation demo](examples/rotation/)\n- [Performance testing](examples/benchmark/)\n\n## Testing\n\n```bash\n# Run all tests\ngo test ./...\n\n# Run with race detector\ngo test -race ./...\n\n# Run benchmarks\ngo test -bench=. ./...\n```\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## Migration from CurveZMQ\n\nQZMQ is designed as a drop-in replacement for CurveZMQ with quantum security.\n\n## Roadmap\n\n- [x] Core implementation\n- [x] Pure Go backend\n- [x] C bindings support\n- [ ] Hardware acceleration (AES-NI, AVX2)\n- [ ] FIPS 140-3 certification\n- [ ] WebSocket transport\n- [ ] QUIC transport\n\n## License\n\nApache License 2.0 - see [LICENSE](LICENSE) for details.\n\n## References\n\n- [NIST Post-Quantum Cryptography](https://csrc.nist.gov/projects/post-quantum-cryptography)\n- [ML-KEM (FIPS 203)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.pdf)\n- [ML-DSA (FIPS 204)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf)\n- [ZeroMQ Security (ZMTP)](https://rfc.zeromq.org/spec/26/)\n\n## Support\n\n- 📧 Email: security@lux.network\n- 💬 Discord: [Lux Network](https://discord.gg/lux)\n- 🐛 Issues: [GitHub Issues](https://github.com/luxfi/qzmq/issues)\n\n---\n\nBuilt with ❤️ by [Lux Network](https://lux.network) for a quantum-safe future.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxfi%2Fqzmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxfi%2Fqzmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxfi%2Fqzmq/lists"}