{"id":15370265,"url":"https://github.com/jedisct1/rust-cpace","last_synced_at":"2025-10-17T05:09:04.814Z","repository":{"id":46193350,"uuid":"260468493","full_name":"jedisct1/rust-cpace","owner":"jedisct1","description":"A Rust implementation of CPace, a balanced PAKE.","archived":false,"fork":false,"pushed_at":"2023-12-15T21:46:02.000Z","size":12,"stargazers_count":26,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T20:46:38.234Z","etag":null,"topics":["cpace","key-exchange","pake","rust"],"latest_commit_sha":null,"homepage":null,"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/jedisct1.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}},"created_at":"2020-05-01T13:41:50.000Z","updated_at":"2025-01-24T23:08:50.000Z","dependencies_parsed_at":"2022-08-28T00:02:04.306Z","dependency_job_id":null,"html_url":"https://github.com/jedisct1/rust-cpace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-cpace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-cpace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-cpace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-cpace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/rust-cpace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085474,"owners_count":21210267,"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":["cpace","key-exchange","pake","rust"],"created_at":"2024-10-01T13:40:38.674Z","updated_at":"2025-10-17T05:08:59.793Z","avatar_url":"https://github.com/jedisct1.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation](https://docs.rs/pake-cpace/badge.svg)](https://docs.rs/pake-cpace)\n\n# CPace-Ristretto255, a balanced PAKE\n\nA CPace implementation for Rust.\n\nThis is a port of the [CPace implementation for libsodium](https://github.com/jedisct1/cpace).\n\n## Blurb\n\n[CPace](https://tools.ietf.org/id/draft-haase-cpace-01.html) is a protocol for two parties that share a low-entropy secret (password) to derive a strong shared key without disclosing the secret to offline dictionary attacks.\n\nCPace is a balanced PAKE, meaning that both parties must know the low-entropy secret.\n\nApplications include pairing IoT and mobile applications using ephemeral pin codes, QR-codes, serial numbers, etc.\n\n## Usage\n\nThe CPace protocol requires a single round trip.\n\nIt returns a set of two 256-bit (`SHARED_KEY_BYTES` bytes) keys that can be used to communicate in both directions.\n\n```rust\nuse pake_cpace::CPace;\n\n// client-side\nlet client = CPace::step1(\"password\", \"client\", \"server\", Some(\"ad\")).unwrap();\n\n// server-side\nlet step2 = CPace::step2(\u0026client.packet(), \"password\", \"client\", \"server\", Some(\"ad\")).unwrap();\n\n// client-side\nlet shared_keys = client.step3(\u0026step2.packet()).unwrap();\n\n// both parties now have the same set of shared keys\nassert_eq!(shared_keys.k1, step2.shared_keys().k1);\nassert_eq!(shared_keys.k2, step2.shared_keys().k2);\n```\n\n## Notes\n\n- This implementation uses the Ristretto255 group and SHA-512 as the hash function, so it is compatible with the C implementation and can trivially be ported to [wasm-crypto](https://github.com/jedisct1/wasm-crypto).\n- Client and server identifiers have a maximum size of 255 bytes.\n- `no_std` compatible, WebAssembly compatible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Frust-cpace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Frust-cpace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Frust-cpace/lists"}