{"id":19197444,"url":"https://github.com/jiep/generic-anon-ake","last_synced_at":"2025-05-09T00:43:36.010Z","repository":{"id":65246983,"uuid":"558868711","full_name":"jiep/generic-anon-ake","owner":"jiep","description":"Implementation of Generic Anonymous AKE","archived":false,"fork":false,"pushed_at":"2024-11-04T15:56:20.000Z","size":330,"stargazers_count":4,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T00:43:13.283Z","etag":null,"topics":["ake","cryptography","dilithium","kyber","liboqs","post-quantum","post-quantum-cryptography","post-quantum-kem","rust","signature"],"latest_commit_sha":null,"homepage":"https://github.com/jiep/generic-anon-ake","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-10-28T13:36:34.000Z","updated_at":"2024-11-08T09:13:08.000Z","dependencies_parsed_at":"2025-04-20T10:52:12.219Z","dependency_job_id":null,"html_url":"https://github.com/jiep/generic-anon-ake","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiep%2Fgeneric-anon-ake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiep%2Fgeneric-anon-ake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiep%2Fgeneric-anon-ake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiep%2Fgeneric-anon-ake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiep","download_url":"https://codeload.github.com/jiep/generic-anon-ake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171210,"owners_count":21865282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ake","cryptography","dilithium","kyber","liboqs","post-quantum","post-quantum-cryptography","post-quantum-kem","rust","signature"],"created_at":"2024-11-09T12:16:47.817Z","updated_at":"2025-05-09T00:43:35.983Z","avatar_url":"https://github.com/jiep.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003ch1\u003e\u003ccode\u003egeneric-anon-ake\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cstrong\u003eImplementation of `Generic Anonymous AKE`\u003c/strong\u003e\n\n  [![ci](https://github.com/jiep/generic-anon-ake/actions/workflows/rust.yml/badge.svg)](https://github.com/jiep/generic-anon-ake/actions/workflows/rust.yml)\n  [![dependency status](https://deps.rs/repo/github/jiep/generic-anon-ake/status.svg)](https://deps.rs/repo/github/jiep/generic-anon-ake)\n\n  \u003csub\u003eBuilt with 🦀\u003c/sub\u003e\n\u003c/div\u003e\n\n## Dependencies\n\n* [`liboqs`](https://github.com/open-quantum-safe/liboqs-rust): For Post-Quantum KEM and signatures\n* [`aes-gcm`](https://github.com/RustCrypto/AEADs/tree/master/aes-gcm): For AES-GCM \n\n## Protocol\n\n```mermaid\nsequenceDiagram\nparticipant Client i\nparticipant Server\nClient i --\u003e\u003e Server: Request for registration\nNote right of Server: Registration\u003cbr/\u003e(ek_i, vk_i) \u003c- VRF.Gen(λ)\nServer -\u003e\u003e Client i: ek_i\nNote left of Client i: Round 1\u003cbr /\u003en_i \u003c-$\u003cbr /\u003e(comm_i, open_i) \u003c- COMM.Comm(n_i)\nClient i --\u003e\u003e Server: m_1 := (comm_i)\nNote right of Server: Round 2\u003cbr /\u003e(pk*, sk*) \u003c- CCAPKE.Gen(λ)\u003cbr /\u003en_S, r \u003c-$ R\u003cbr /\u003eDo for all j ∈ C := {1,...,l}:\u003cbr /\u003er_j \u003c- PRF(j, r)\u003cbr /\u003ec_j \u003c- PKE.Enc(pk_j, n_S, r_j)\u003cbr /\u003eEnd Do\u003cbr /\u003em := (c_1, ..., c_l, r, pk*)\u003cbr /\u003eσ_2 \u003c- SIG.Sign(sk_S, m)\nServer -\u003e\u003e Client i: m_2 := (m, σ_2)\nNote left of Client i: Round 3\u003cbr /\u003en_S := SIG.Vry(vk_S, m_2, σ_2) == 1\u003cbr/\u003en_S := PKE.Dec(sk_i, c_i)\u003cbr/\u003e (comm_S, open_S) \u003c- COMM.Comm(n_S) \nClient i --\u003e\u003e Server: m_3 := comm_S\nNote right of Server: Round 4\u003cbr /\u003em' := r\u003cbr /\u003eσ_4 \u003c- SIG.Sign(sk_S, m')\nServer -\u003e\u003e Client i: m_4 := (m', σ_4)\nNote left of Client i: Round 5\u003cbr/\u003eDo for all j in C\u003cbr/\u003er_j \u003c- PRF(j, r)\u003cbr/\u003ePKE.Enc(pk_j, n_S, r_j) == 1\u003cbr/\u003eEnd Do\u003cbr/\u003e sk_i := H(n_S || n_i), sid_i := G(sk_i) \u003cbr/\u003ectx_i := CCAPKE.Enc(pk*, open_i)\nClient i --\u003e\u003e Server: m_5 := ctx_i\nNote right of Server: Round 6\u003cbr /\u003em'' \u003c- CCAPKE.Dec(sk*, ctxi_i)\u003cbr/\u003eAssert Comm.Vfy(comm_i, open_i) == 1\u003cbr/\u003eAssert Comm.Vfy(comm_S, open_S) == 1\u003cbr/\u003e sk_i := H(n_S || n_i), sid_i := G(sk_i)\n```\n\n## Supported algorithms\n  \n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand supported KEMs!\u003c/summary\u003e\n\n    * Kyber512\n    * Kyber768\n    * Kyber1024\n    * ClassicMcEliece348864f\n    * ClassicMcEliece460896f\n    * ClassicMcEliece6960119f\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand supported Signature schemes!\u003c/summary\u003e\n\n    * Dilithium2 \n    * Dilithium3\n    * Dilithium5 \n\n\u003c/details\u003e\n\n## Binaries\n\nDownload the latest version from [Releases](https://github.com/jiep/generic-anon-ake/releases).\n\n## Build from source\n\n1. Install [Rust](https://www.rust-lang.org/tools/install)\n2. Check source code\n\n```\ncargo check\n``` \n\n3. Compile binary\n\n```\ncargo build\n``` \n\n4. Run tests\n\n```\ncargo test\n```\n\n\u003e Note: for release target, add --release\n\n5. Run binary\n\n```\ncargo run\n# or\n./target/release/generic-anon-ake # for release version\n./target/debug/generic-anon-ake # for debug version\n```\n\n## 🚴 Usage\n\n```\n./target/debug/generic-anon-ake --help\nUsage: generic-anon-ake [OPTIONS] --kem \u003cKEM\u003e --sig \u003cSIG\u003e --clients \u003cCLIENTS\u003e\n\nOptions:\n  -k, --kem \u003cKEM\u003e\n  -s, --sig \u003cSIG\u003e          \n  -c, --clients \u003cCLIENTS\u003e  \n  -v, --verbose            \n  -h, --help               Print help information\n  -V, --version            Print version information\n```\n\n### Example\n\n#### Post-Quantum\n\n10 clients (the protocol is executed with just one!) with Kyber1024 as KEM and Dilithium5 as Signature scheme.\n\n```\n./target/release/generic-anon-ake --kem Kyber1024 --sig Dilithium5 --clients 10 --verbose\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand output\u003c/summary\u003e\n\n```\n[!] Setting Dilithium5 as signature scheme...\n[!] Setting Kyber1024 as KEM...\n\n[!] Creating 10 clients...\n[!] Creating server...\n\n[R] Creating (ek, vk) for 10 clients...\n\n[!] Time elapsed in registration of 10 clients is 802.613µs\n\n[!] Starting protocol with client and server...\n\n[C] Running Round 1...\n[!] Time elapsed in Round 1 is 1.051217ms\n[C -\u003e S] Sending m1 to server...\n\n[S] Running Round 2...\n[!] Time elapsed in Round 2 is 3.017849ms\n[C \u003c- S] Sending m2 to client...\n\n[C] Running Round 3...\n[C] Signature verification -\u003e OK\n[!] Time elapsed in Round 3 is 1.497624ms\n[C -\u003e S] Sending m3 to server...\n\n[S] Running Round 4...\n[!] Time elapsed in Round 4 is 268.804µs\n[C \u003c- S] Sending m4 to client...\n\n[C] Running Round 5...\n[C] Signature verification -\u003e OK\n[C] Ciphertext verification for j=0 -\u003e OK\n[C] Ciphertext verification for j=1 -\u003e OK\n[C] Ciphertext verification for j=2 -\u003e OK\n[C] Ciphertext verification for j=3 -\u003e OK\n[C] Ciphertext verification for j=4 -\u003e OK\n[C] Ciphertext verification for j=5 -\u003e OK\n[C] Ciphertext verification for j=6 -\u003e OK\n[C] Ciphertext verification for j=7 -\u003e OK\n[C] Ciphertext verification for j=8 -\u003e OK\n[C] Ciphertext verification for j=9 -\u003e OK\n[!] Time elapsed in Round 5 is 3.69616ms\n[C -\u003e S] Sending m5 to server...\n\n[S] Running Round 6...\n[S] Commitment verification -\u003e OK\n[!] Time elapsed in Round 6 is 312.805µs\n\n[!] Printing session keys...\n[C] 0x9dc4bbd831c6036603d8b146dcb9e0eaf2abf2df345062f285df15a7722edf37\n[S] 0x9dc4bbd831c6036603d8b146dcb9e0eaf2abf2df345062f285df15a7722edf37\n\n[!] Printing session identifiers...\n[C] 0x3d138ffce132d493f1c1c2ab9de6c2be85314d21f11bfaf99356372d79248fad\n[S] 0x3d138ffce132d493f1c1c2ab9de6c2be85314d21f11bfaf99356372d79248fad\n\n[!] Printing diagram...\n\n                 Client i                     Server\n                    |                            |\n                    |                            | \u003c---    Registration \n                    |                            |         for 10 clients\n                    |                            |         (000 ms)\nRound 1        ---\u003e |                            |\n(00001051 µs)       |                            |\n                    |                            |\n                    |-------------m1------------\u003e|\n                    |        (0000032 B)         |\n                    |                            | \u003c---    Round 2\n                    |                            |         (00000003 ms)\n                    |                            |\n                    |\u003c------------m2-------------|\n                    |        (0020307 B)         |\nRound 3        ---\u003e |                            |\n(00000001 ms)       |                            |\n                    |                            |\n                    |-------------m3------------\u003e|\n                    |        (0000032 B)         |   \n                    |                            | \u003c---    Round 4\n                    |                            |         (00000000 ms)\n                    |                            |\n                    |\u003c------------m4-------------|\n                    |        (0004627 B)         |\nRound 5        ---\u003e |                            |\n(00000003 ms)       |                            |\n                    |                            |\n                    |-------------m5------------\u003e|\n                    |        (0001724 B)         |   \n                    |                            | \u003c---    Round 6\n                    |                            |         (00000312 µs)\n                    |                            |\n```\n\n\u003c/details\u003e\n\n#### Classic\n\n```\n./target/release/generic-anon-ake-classic --clients 10 --verbose\n```\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand output\u003c/summary\u003e\n\n```\n[!] Creating 10 clients...\n[!] Creating server...\n\n[R] Creating (ek, vk) for 10 clients...\n\n[!] Time elapsed in registration of 10 clients is 15.871913ms\n\n[!] Starting protocol with client and server...\n\n[C] Running Round 1...\n[!] Time elapsed in Round 1 is 67.401µs\n[C -\u003e S] Sending m1 to server...\n\n[S] Running Round 2...\n[!] Time elapsed in Round 2 is 56.997567ms\n[C \u003c- S] Sending m2 to client...\n\n[C] Running Round 3...\n[C] Signature verification -\u003e OK\n[!] Time elapsed in Round 3 is 5.849579ms\n[C -\u003e S] Sending m3 to server...\n\n[S] Running Round 4...\n[!] Time elapsed in Round 4 is 3.173643ms\n[C \u003c- S] Sending m4 to client...\n\n[C] Running Round 5...\n[C] Signature verification -\u003e OK\n[C] Ciphertext verification for j=0 -\u003e OK\n[C] Ciphertext verification for j=1 -\u003e OK\n[C] Ciphertext verification for j=2 -\u003e OK\n[C] Ciphertext verification for j=3 -\u003e OK\n[C] Ciphertext verification for j=4 -\u003e OK\n[C] Ciphertext verification for j=5 -\u003e OK\n[C] Ciphertext verification for j=6 -\u003e OK\n[C] Ciphertext verification for j=7 -\u003e OK\n[C] Ciphertext verification for j=8 -\u003e OK\n[C] Ciphertext verification for j=9 -\u003e OK\n[!] Time elapsed in Round 5 is 40.780448ms\n[C -\u003e S] Sending m5 to server...\n\n[S] Running Round 6...\n[S] Commitment verification -\u003e OK\n[!] Time elapsed in Round 6 is 2.338331ms\n\n[!] Printing session keys...\n[C] 0xe8d5a506701fa82d2c07e9a4dd6bb725e0ef52a9ead1a13d585743c35d12bbdf\n[S] 0xe8d5a506701fa82d2c07e9a4dd6bb725e0ef52a9ead1a13d585743c35d12bbdf\n\n[!] Printing session identifiers...\n[C] 0x7f4a3a900818dbe8f7d26460313a4979bee916715fb5317ed5ae37677df7a2fe\n[S] 0x7f4a3a900818dbe8f7d26460313a4979bee916715fb5317ed5ae37677df7a2fe\n\n[!] Printing diagram...\n\n                 Client i                     Server\n                    |                            |\n                    |                            | \u003c---    Registration\n                    |                            |         for 10 clients\n                    |                            |         (015 ms)\nRound 1        ---\u003e |                            |\n(00000067 µs)       |                            |\n                    |                            |\n                    |-------------m1------------\u003e|\n                    |        (0000032 B)         |\n                    |                            | \u003c---    Round 2\n                    |                            |         (00000056 ms)\n                    |                            |\n                    |\u003c------------m2-------------|\n                    |        (0001451 B)         |\nRound 3        ---\u003e |                            |\n(00000005 ms)       |                            |\n                    |                            |\n                    |-------------m3------------\u003e|\n                    |        (0000032 B)         |\n                    |                            | \u003c---    Round 4\n                    |                            |         (00000003 ms)\n                    |                            |\n                    |\u003c------------m4-------------|\n                    |        (0000096 B)         |\nRound 5        ---\u003e |                            |\n(00000040 ms)       |                            |\n                    |                            |\n                    |-------------m5------------\u003e|\n                    |        (0000225 B)         |\n                    |                            | \u003c---    Round 6\n                    |                            |         (00002338 µs)\n                    |                            |\n```\n\n\u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiep%2Fgeneric-anon-ake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiep%2Fgeneric-anon-ake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiep%2Fgeneric-anon-ake/lists"}