{"id":43319059,"url":"https://github.com/quantumcoinproject/hybrid-pqc","last_synced_at":"2026-02-01T22:11:24.208Z","repository":{"id":285581127,"uuid":"880204818","full_name":"quantumcoinproject/hybrid-pqc","owner":"quantumcoinproject","description":"Hybrid Post Quantum Cryptography","archived":false,"fork":false,"pushed_at":"2025-07-20T00:18:33.000Z","size":865,"stargazers_count":0,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T01:53:06.306Z","etag":null,"topics":["cryptography","post-quantum-cryptography"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantumcoinproject.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}},"created_at":"2024-10-29T10:07:11.000Z","updated_at":"2025-07-20T00:18:38.000Z","dependencies_parsed_at":"2025-04-01T15:36:19.976Z","dependency_job_id":"7bc01c44-c042-4dee-ac89-8e54e2c21a33","html_url":"https://github.com/quantumcoinproject/hybrid-pqc","commit_stats":null,"previous_names":["quantumcoinproject/hybrid-pqc"],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/quantumcoinproject/hybrid-pqc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumcoinproject%2Fhybrid-pqc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumcoinproject%2Fhybrid-pqc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumcoinproject%2Fhybrid-pqc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumcoinproject%2Fhybrid-pqc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantumcoinproject","download_url":"https://codeload.github.com/quantumcoinproject/hybrid-pqc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumcoinproject%2Fhybrid-pqc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28992772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","post-quantum-cryptography"],"created_at":"2026-02-01T22:11:23.465Z","updated_at":"2026-02-01T22:11:24.203Z","avatar_url":"https://github.com/quantumcoinproject.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build and Test](https://github.com/quantumcoinproject/hybrid-pqc/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/quantumcoinproject/hybrid-pqc/actions/workflows/build-and-test.yml)\n\n# Hybrid Post Quantum Cryptography\nWhile lattice based post-quantum cryptography schemes such as SPHINCS+ and Dilithium have been standardized, they haven’t \nbeen battle-tested widely over the years like RSA and Elliptic Curve vased crypto-schemes. It's possible that newer category of attacks on Lattice based cryptography may come to light.\n\nBecause of these reasons, it's preferable to use a hybrid signature scheme that \nuses two crypto schemes behind the scenes: a PQC scheme and a classical scheme (EdDSA). This hybrid \nmodel is required to provide a hedge against Lattice based cryptography schemes such as Dilithium getting broken \non classical computers in the interim. In addition, SPHINCS+ which is hash based is also part of the signature scheme, to be used as a breakglass (details below).\n\nWhen quantum computers capable enough to break EdDSA become available, the hybrid model \nwill still provide protection against quantum computer attacks, since a post quantum crypto scheme is used in the hybrid model. \n\nThis hybrid model will be abstracted away so that users do not have to worry \nabout managing multiple sets of keys. To users, it will be just one composite key to manage and \nuse. Likewise, higher-level developers do not have to worry about the hybrid \nmodel, since it will be abstracted away.\n\nSome disadvantages of the hybrid model are increased complexity, increased risk of implementation bugs, increased compute time, increased \nstorage, and bandwidth requirements. However, the security benefits of the hybrid model outweigh these disadvantages.\n\n## Hybrid Scheme\nIn this hybrid scheme, Dilithium, SPHINCS+ and ed25519 are used in a combiner mode. More details on the comment at https://github.com/quantumcoinproject/hybrid-pqc/blob/main/hybrid-dilithium-sphincs/hybrid.c\n\nSince SPHINCS+ signatures are large, the do not fit requirements of many applications. Because of this reason, this hybrid scheme supports two modes of signing:\n\n1) A compact mode in which a message hashed from the original message, the SPHINCS+ public-key and a 40 byte random nonce is embedded into the signature. If both Dilithium and ed25519 are broken in the future, the SPHINCS+ full signing mode can be required by the verifying applications, like a breakglass.\n2) A full mode in which all the three signature schemes are used to create a signature (including the full SPHINCS+ signature). \n\n## Dilithium and SPHINCS+\nDilihitum and SPHINCS+ are Post Quantum Digital Signature Schemes that have been standardized by NIST.\nThis repository is based on the PQClean implementations at https://github.com/PQClean/PQClean \n\n## EdDSA\nThe classical digital signature algorithm used is EdDSA (ed25519). The implementation used is [TweetNaCl](https://tweetnacl.cr.yp.to/), a self-contained public-domain C library. (https://tweetnacl.cr.yp.to/)\n\n## Randombytes\nThe random implementation is based on (https://github.com/dsprenkels/randombytes), which itself is based on libsodium randombytes.\n\n## Building\n\n### Linux/macOS\n\n1. Install dependencies:\n\n\tOn Ubuntu:\n\n\t\t apt-get update\n\t\t sudo apt install astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml\n\n\tOn macOS, using a package manager of your choice (we've picked Homebrew):\n\n\t\tbrew install cmake ninja openssl@1.1 wget doxygen graphviz astyle\n\t\tpip3 install pytest pytest-xdist pyyaml\n\n2. Get the source:\n\n\t\tgit clone https://github.com/quantumcoinproject/hybrid-pqc.git\n\t\tcd hybrid-pqc\n\n\tand build:\n\n\t\tmkdir build \u0026\u0026 cd build\n\t\tcmake -G Ninja -DBUILD_SHARED_LIBS=ON ..\n\t\tninja\n\n### Windows\n\nBinaries can be generated using Visual Studio 2019 with the [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extension installed. The same options as explained above for Linux/macOS can be used and build artifacts are generated in the specified `build` folders.\n\nIf you want to create Visual Studio build files, e.g., if not using `ninja`, be sure to _not_ pass the parameter `-GNinja` to the `cmake` command as exemplified above. You can then build all components using `msbuild`, e.g. as follows: `msbuild ALL_BUILD.vcxproj` and install all artifacts e.g. using this command `msbuild INSTALL.vcxproj`.\n\n### Web Assembly WASM\n\n1. Install emsdk https://www.tutorialspoint.com/webassembly/webassembly_installation.htm\n2. Goto directory of emsdk and run: emsdk_env.bat\n3. Create build folder. For example: c:\\github\\hybrid-pqc\\wasm\\build\n4. Run the following command, replacing appropriate paths:\n\n\n\t\temcc -s WASM=1 -s EXPORTED_FUNCTIONS=\"['_free', '_malloc']\"  -s \"EXPORTED_RUNTIME_METHODS=['getValue']\" ${{ github.workspace }}/wasm/hybrid-pqc.c ${{ github.workspace }}/dilithium2/ntt.c ${{ github.workspace }}/dilithium2/packing.c ${{ github.workspace }}/dilithium2/poly.c ${{ github.workspace }}/dilithium2/polyvec.c ${{ github.workspace }}/dilithium2/reduce.c ${{ github.workspace }}/dilithium2/rounding.c ${{ github.workspace }}/dilithium2/sign.c ${{ github.workspace }}/dilithium2/symmetric-shake.c ${{ github.workspace }}/sphincs/address.c ${{ github.workspace }}/sphincs/context_shake.c ${{ github.workspace }}/sphincs/fors.c ${{ github.workspace }}/sphincs/hash_shake.c ${{ github.workspace }}/sphincs/merkle.c ${{ github.workspace }}/sphincs/sign.c ${{ github.workspace }}/sphincs/thash_shake_simple.c ${{ github.workspace }}/sphincs/utils.c ${{ github.workspace }}/sphincs/utilsx1.c ${{ github.workspace }}/sphincs/wots.c ${{ github.workspace }}/sphincs/wotsx1.c  ${{ github.workspace }}/random/randombytes.c ${{ github.workspace }}/common/fips202.c ${{ github.workspace }}/common/hybrid-common.c ${{ github.workspace }}/common/shake_prng.c ${{ github.workspace }}/tweetnacl/tweetnacl.c  ${{ github.workspace }}/hybrid-dilithium-sphincs/hybrid.c -o ${{ github.workspace }}/build/wasm/hybrid-pqc.html\n\n## Contributing\n\nThank you for considering to help out with the source code! \n\n* Please reach out in [our Discord Server](https://discord.gg/bbbMPyzJTM) for any questions. \n* Pull requests need to be based on and opened against the `main` branch.\n\n## License\nPQClean: https://github.com/PQClean/PQClean\n\nRandom bytes and Hybrid also have their own license files (MIT License).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantumcoinproject%2Fhybrid-pqc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantumcoinproject%2Fhybrid-pqc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantumcoinproject%2Fhybrid-pqc/lists"}