{"id":31443988,"url":"https://github.com/masaun/verified-anonymous-sns","last_synced_at":"2026-05-09T16:52:37.681Z","repository":{"id":306395148,"uuid":"1024845389","full_name":"masaun/verified-anonymous-sns","owner":"masaun","description":"ZK powered Verified Anonymous SNS","archived":false,"fork":false,"pushed_at":"2025-08-11T08:02:04.000Z","size":37924,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T09:25:59.922Z","etag":null,"topics":["noir","rust","solidity","zero-knowledge-proof","zk-mopro"],"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/masaun.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-07-23T10:32:21.000Z","updated_at":"2025-08-11T07:28:35.000Z","dependencies_parsed_at":"2025-08-11T09:20:01.792Z","dependency_job_id":null,"html_url":"https://github.com/masaun/verified-anonymous-sns","commit_stats":null,"previous_names":["masaun/verified-anonymous-sns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/masaun/verified-anonymous-sns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2Fverified-anonymous-sns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2Fverified-anonymous-sns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2Fverified-anonymous-sns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2Fverified-anonymous-sns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masaun","download_url":"https://codeload.github.com/masaun/verified-anonymous-sns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masaun%2Fverified-anonymous-sns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277754230,"owners_count":25871356,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["noir","rust","solidity","zero-knowledge-proof","zk-mopro"],"created_at":"2025-09-30T20:36:44.311Z","updated_at":"2025-09-30T20:36:46.177Z","avatar_url":"https://github.com/masaun.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Verified Anonymous SNS\n\n## 🎯 Features\n\n-   **Sign in with Google OAuth**: When a user signs in with Google on StealthNote, an ephemeral key is generated. The platform then requests a JWT from Google OAuth to prove ownership of the user's email address, using the hash of the ephemeral key as a nonce. A Noir proof is generated to attest to the validity of the JWT and the nonce, and this proof is submitted to the server. Upon verification, the server creates a membership record tied to the user's organizational email.\n\n-   **Create note**: After signing in with Google OAuth and storing the ephemeral key, users can use the key to post content on the platform.\n\n-   **Toggle likes**: Just like creating a note, users can use their ephemeral public key to toggle likes on the platform.\n\n-   **Verify proofs**: Each message box includes a \"Verify\" button, allowing any user to verify the corresponding Noir proof stored in the database and confirm its authenticity via Google OAuth.\n\n-   **Internal chat**: Internal chats are visible only to members of the same organization who choose to post internally. Stealthnote uses the user's ephemeral public key to authenticate message posting and retrieval.\n\n## 💻 How it is made?\n\n-   **Rust:** All cryptographic functions are implemented in Rust, as the ecosystem offers a richer set of libraries and better performance compared to Flutter. Below is an overview of our implementation.\n\n    -   `generate_ephemeral_key()`: Stealthnote uses an ephemeral key for performing actions and verifying membership. We implemented Ed25519 signature functionality and hashes in Rust to ensure secure and efficient cryptographic operations.\n    -   `prove_jwt()`: The `prove_jwt` function extracts the necessary data for the Noir circuit and invokes the [noir-rs](https://github.com/zkmopro/noir-rs) proof generation function to produce a valid Noir proof.\n    -   `verify_jwt_proof()`: The `verify_jwt_proof` function retrieves inputs from the database, formats them for the Noir circuit, and uses noir-rs to verify the corresponding proof.\n\n-   **Mopro:** Mopro generates native bindings for iOS and Android, allowing the Flutter app to call Rust-defined functions simply by replacing the generated bindings.\n-   **Flutter:** Flutter is used to build our cross-platform frontend. It handles the Google authentication flow to obtain a JWT, and communicates with the Stealthnote.xyz APIs to interact with the backend.\n\n## 🔧 Build the Bindings\n\nMopro simplifies generating native mobile bindings through the mopro CLI. The following example demonstrates how to update the bindings when changes are made to the underlying [Rust functions](./src/lib.rs). This allows developers to focus solely on maintaining the Rust functions, while automatically ensuring cross-platform support.\n\n### Install Mopro CLI\n\nFollow the [Getting Started](https://zkmopro.org/docs/getting-started) page to install `mopro` CLI.\n\n### iOS\n\nRun\n\n```sh\nmopro build\n```\n\nand select `aarch64-apple-ios`\n\n### Android\n\nActivate `android-compat` feature in [Cargo.toml](./Cargo.toml).\n\n```diff\n- noir = { git = \"https://github.com/zkmopro/noir-rs\", features = [\"barretenberg\"] }\n+ noir = { git = \"https://github.com/zkmopro/noir-rs\", features = [\"barretenberg\", \"android-compat\"] }\n```\n\nRun\n\n```sh\nmopro build\n```\n\nand select `aarch64-linux-android`\n\n## 🔄 Manually Update Bindings\n\n### Flutter\n\nCopy the generated files into your Flutter project:\n\n```sh\ncp -r MoproiOSBindings flutter/mopro_flutter_plugin/ios \u0026\u0026 \\\ncp -r MoproAndroidBindings/uniffi flutter/mopro_flutter_plugin/android/src/main/kotlin \u0026\u0026 \\\ncp -r MoproAndroidBindings/jniLibs flutter/mopro_flutter_plugin/android/src/main\n```\n\n## 📂 Open the project\n\nFollow the instructions to open the development tools\n\n### Flutter\n\n-   Go to `flutter` directory\n\n    ```sh\n    cd flutter\n    ```\n\n-   Check flutter environment\n\n    ```sh\n    flutter doctor\n    ```\n\n-   Install Flutter Dependencies\n\n    ```sh\n    flutter pub get\n    ```\n\n-   Run the app (Please turn on emulators before running the command)\n    ```sh\n    flutter run\n    ```\n\n\u003cbr\u003e\n\n## 📊 Benchmarks\n\nThe following benchmarks were conducted on iPhone and Android in release mode:\n\n| JWT Operation              | Prove    | Verify  |\n| -------------------------- | -------- | ------- |\n| Browser                    | 37.292 s | 0.286 s |\n| Desktop (Mac M1 Pro)       | 2.02 s   | 0.007 s |\n| Android emulator (Pixel 8) | 4.786 s  | 3.013 s |\n| iPhone 16 Pro              | 2.626 s  | 1.727 s |\n\n\u003cbr\u003e\n\n## NOTE\n\n- This project is inspired by the [stealthnote-mobile](https://github.com/vivianjeng/stealthnote-mobile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasaun%2Fverified-anonymous-sns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasaun%2Fverified-anonymous-sns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasaun%2Fverified-anonymous-sns/lists"}