{"id":27535550,"url":"https://github.com/dabevlohn/wasm-rc-sesskey","last_synced_at":"2026-04-25T21:33:59.774Z","repository":{"id":288036756,"uuid":"966621196","full_name":"dabevlohn/wasm-rc-sesskey","owner":"dabevlohn","description":"Generates random 16 bytes, transforms it to CryptoKey Object, encrypts it for RSA-key issuer","archived":false,"fork":false,"pushed_at":"2025-05-11T18:40:21.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T19:35:13.615Z","etag":null,"topics":["cryptography","e2ee","keygen","rocketchat","rsa","rust","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","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/dabevlohn.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":"2025-04-15T07:48:32.000Z","updated_at":"2025-05-11T18:40:25.000Z","dependencies_parsed_at":"2025-05-11T22:31:38.384Z","dependency_job_id":null,"html_url":"https://github.com/dabevlohn/wasm-rc-sesskey","commit_stats":null,"previous_names":["dabevlohn/wasm-rc-sesskey"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dabevlohn/wasm-rc-sesskey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabevlohn%2Fwasm-rc-sesskey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabevlohn%2Fwasm-rc-sesskey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabevlohn%2Fwasm-rc-sesskey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabevlohn%2Fwasm-rc-sesskey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dabevlohn","download_url":"https://codeload.github.com/dabevlohn/wasm-rc-sesskey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabevlohn%2Fwasm-rc-sesskey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"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","e2ee","keygen","rocketchat","rsa","rust","wasm","webassembly"],"created_at":"2025-04-18T19:07:12.092Z","updated_at":"2026-04-25T21:33:59.769Z","avatar_url":"https://github.com/dabevlohn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RocketChat Session Key Generator (WASM)\n\n## Быстрый старт\n\nНа стенде должны быть установлены NodeJS \u003e= 18 и Rust \u003e= 1.76\n\n```bash\nrustup update                                 # обновление Rust\nrustup target add wasm32-unknown-unknown      # установка целевой платформы\ncargo install wasm-pack                       # установка сборщика\ncargo install just                            # установка оболочки выполнения\ngit clone https://\u003cthis-repo-url\u003e             # клонирование репозитория\ncd \u003cthis-repo\u003e\njust g                                        # генерация ключей\n```\n\nПолученный публичный ключ (public_key.pem) необходимо вставить\nв код библиотеки src/lib.rs при помощи обычного текстового редактора\n(константа PUBLIC_KEY)\n\n```bash\njust b                                        # сборка WASM-модуля\n```\n\n## Тестирование\n\n```bash\ncd back-nodejs                                \nnpm install                                   # установка зависимостей\nnode server.js                                # запуск сервера\n```\n\nОткройте браузер и перейдите на http://localhost:3000/about.html\nВ терминале, где запущен сервер, должна появиться отладочная информация: JSON с\nзашифрованным и незашифрованным сессионным ключом.\n\n## Диаграмма последовательности\n\n![](./keygen_seq.png)\n\n```plantuml\n@startuml\ntitle RocketChat SessionKey Generator v.2 Sequence\n\nDIB -\u003e DIB: Generate RSA\\nkey pair\nDIB -\u003e DIB: Store RSA\\nprivate key\nDIB --\u003e RCTeam: Pass RSA public key\nRCTeam --\u003e Prod: Deploy WASM Crypto\\nModule with public RSA key\nProd --\u003e DIB: Export room keys encrypted with public RSA key\nProd --\u003e DIB: Export messages encrypted with room keys\nDIB -\u003e DIB: Decrypt room key\\nwith RSA private key\nDIB -\u003e DIB: Decrypt room messages\\nwith decrypted room key\n\n@enduml\n\n```\n\n## Состав компонентов\n\n![](./keygen_objects.png)\n\n```plantuml\n@startuml\n\ntitle RocketChat Session Key Generator v.2 Objects\npackage\t\"Rocket.Chat\" {\n\n\tframe RocketChat-Client {\n\t\tobject \"Frontend Functions for E2E rooms\" as FE {\n\t\t\t+generateAESKey()\n\t\t\t+importAESKey()\n\t\t}\n\t}\n\n\tframe RocketChat-Server {\n\n\t\tobject \"WASM Crypto Module\" as CM {\n\t\t\t+returnRoomKey()\n\t\t\t+saveRoomKey()\n\t\t}\n\n\t\tnote bottom of CM\n\t\t1. generates random 16 bytes\n\t\t2. return 16 bytes as CryptoKey Object\n\t\t3. encrypt 16 bytes for DIB public key\n\t\t4. put encrypted 16 bytes to store via Meteor's method\n\t\tendnote\n\n\n\t\tobject \"API Method\" as SK {\n\t\t\t+saveRoomKey()\n\t\t}\n\n\t\tobject ORM {\n\t\t\t+saveRoomKey()\n\t\t}\n\n\t\tSK .. ORM\n\t}\n\n\tFE --\u003e CM\n\tCM -\u003e SK: \u003croom_id, encrypted_key\u003e\n}\n\n@enduml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabevlohn%2Fwasm-rc-sesskey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdabevlohn%2Fwasm-rc-sesskey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabevlohn%2Fwasm-rc-sesskey/lists"}