{"id":49880115,"url":"https://github.com/pardnio/c2hat-relay","last_synced_at":"2026-05-15T13:40:49.776Z","repository":{"id":270198580,"uuid":"909608878","full_name":"pardnio/c2hat-relay","owner":"pardnio","description":"C²hat - End to End Encryption Chat on Chrome","archived":false,"fork":false,"pushed_at":"2025-07-24T15:21:23.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T17:35:28.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/pardnio.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":"2024-12-29T08:33:52.000Z","updated_at":"2026-04-05T17:49:07.000Z","dependencies_parsed_at":"2025-07-29T04:03:21.663Z","dependency_job_id":null,"html_url":"https://github.com/pardnio/c2hat-relay","commit_stats":null,"previous_names":["pardnchiu/demo-e2ee-chat","pardnchiu/demo-node-e2ee-chat","pardnchiu/c2hat-relay","pardnio/c2hat-relay"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pardnio/c2hat-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fc2hat-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fc2hat-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fc2hat-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fc2hat-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pardnio","download_url":"https://codeload.github.com/pardnio/c2hat-relay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnio%2Fc2hat-relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"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":[],"created_at":"2026-05-15T13:40:49.595Z","updated_at":"2026-05-15T13:40:49.769Z","avatar_url":"https://github.com/pardnio.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# C²hat - Cross-Domain Chat\n\n[\u003cimg src=https://raw.githubusercontent.com/pardnchiu/pardnchiu/refs/heads/main/image/available-chrome-web-store-seeklogo.png height=40\u003e](https://chromewebstore.google.com/detail/c2hat-cross-domain-chat/chngimmfgmkpninihhljpidnieocmhdn)\n\n## End-to-End Encryption Main Flow\n\n```mermaid\ngraph TD\n  A[Open Extension] --\u003e B[Check Domain\u003cbr\u003eEstablish WebSocket Connection\u003cbr\u003eJoin Chatroom\u003cbr\u003eGenerate SHA-256 Hash]\n  B --\u003e C{Check for Stored Key Pair}\n  C --\u003e|Not Found| C0[Generate New RSA-2048 Key Pair\u003cbr\u003eExport Keys as Base64\u003cbr\u003eGenerate Encryption Password Using PBKDF2\u003cbr\u003eEncrypt Private Key with AES-GCM\u003cbr\u003eSave to Chrome Storage]\n    C0 --\u003e D1\n  C --\u003e|Found| C1[Load Existing Key Pair\u003cbr\u003eGenerate Password Using Display Name\u003cbr\u003eDecrypt Private Key with PBKDF2]\n    C1 --\u003e D{Decryption Successful?}\n    D --\u003e|Failed| C0\n    D --\u003e|Successful| D1[Share Public Key to Server]\n      D1 --\u003e E[Show Chat Interface\u003cbr\u003eFetch Online Users] \n      E --\u003e F{Chat Mode}\n        F --\u003e|Group Chat| G[Plaintext Message]\n        F --\u003e|Private Chat| H[Request Recipient's Public Key]\n          H --\u003e I{Public Key Retrieved?}\n            I --\u003e|Failed| I0[Cannot Establish Encrypted Connection]\n            I --\u003e|Successful| J[Cache Recipient's Public Key\u003cbr\u003eStart Encrypted Conversation\u003cbr\u003eEncrypt Message with RSA-OAEP]\n              J --\u003e K[Send Encrypted Message to Server]\n      E --\u003e L[Leave Chatroom]\n      L --\u003e M[Clear Server-Side Data]\n      M --\u003e N[Retain Local Encrypted Data]\n```\n\n## End-to-End Encryption Decryption Flow\n```mermaid\ngraph TD\n  A[Receive Encrypted Message] --\u003e B{Message Type}\n  B --\u003e|Group Message| C[Display Plaintext Directly]\n    C --\u003e D[Save Locally by Domain]\n    D --\u003e F[Update Chat History]\n  B --\u003e|Private Message| G[Decrypt Using Private Key]\n    G --\u003e H{Decryption Successful?}\n      H --\u003e|Successful| I[Display Decrypted Message]\n        I --\u003e D\n      H --\u003e|Failed| J[Show Decryption Failed]\n        J --\u003e D\n```\n\n## Key Management Flow\n- Key Pair Generation: Use `RSA-2048` for asymmetric keys\n- Local Private Key Encryption: Use `AES-GCM 256` for secure storage\n- Password Derivation: Strengthen password with `PBKDF2`\n- Key Persistence: Store keys using `Chrome Storage API`\n\n## Message Encryption Flow\n- Sender Encryption: Use recipient's public key for `RSA-OAEP`\n- Receiver Decryption: Use private key to decrypt message content\n- Group/Private Mode: Automatically determine message type, enforce encryption for private messages\n\n## Privacy Protection Mechanisms\n- Zero Server Storage: Server does not store any message content, Cloudflare Worker acts as a relay\n- Local Encrypted Storage: Use `Chrome Storage API` for encrypted chat history\n- Instant Cleanup: Clear server-side cache after connection termination\n\n## Performance Optimization Features\n- Key Caching: Cache recipient's public key after successful connection to reduce redundant requests\n- Auto Reconnect: Automatically attempt reconnection if WebSocket disconnects\n- Message Queue: Temporarily store messages during network instability\n\n## Special Design\n- Domain Isolation: Ensure complete separation of messages across different websites\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardnio%2Fc2hat-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpardnio%2Fc2hat-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardnio%2Fc2hat-relay/lists"}