Replies: 6 comments
-
|
re sharing comments from @jacque006
|
Beta Was this translation helpful? Give feedback.
-
Local storage to manage semaphore id private key: I would really prefer to avoid this approach… precisely because local storage gets wiped. What about:
#[derive(Serialize, Deserialize, Debug)]
struct Vote {
post_id: u64,
comment_id: u64,
vote: bool, // true for upvote, false for downvote
author: Option<String>, // Some(author) or None for anonymous
timestamp: DateTime<Utc>,
}
#[derive(Serialize, Deserialize, Debug)]
struct Post{
post_id: u64,
content: String,
author: Option<String>, // Some(author) or None for anonymous
timestamp: DateTime<Utc>,
}
#[derive(Serialize, Deserialize, Debug)]
struct Comment {
post_id: u64,
comment_id: u64,
content: String,
author: Option<String>, // Some(author) or None for anonymous
timestamp: DateTime<Utc>,
}these objects would be managed in different sled trees (which I think is compatible with the existing freedit db_utils) client side, these objects in serialized format (without author ofc) would be the semaphore signal used to generate the proofs backend side: we would deserialize them, storing them no matter what (author is something or none) |
Beta Was this translation helpful? Give feedback.
-
I agree. let’s ignore this for the moment |
Beta Was this translation helpful? Give feedback.
-
See https://discord.com/channels/943612659163602974/944173742219735080/1316038414688063509 From @cedoor
|
Beta Was this translation helpful? Give feedback.
-
👍 Ok let’s do it like this |
Beta Was this translation helpful? Give feedback.
-
I think this is the best solution. Not sure what you mean by "granular control".
Consider you need to use the nullifier in different ways depending on the action. Creating a post or comments anonymously requires a nullifier to prevent attackers from spamming essentially. The only reason why an attacker may want to re-use the same proof with the same message is to spam. And in this case, since you need a way to prove multiple comments have been sent by the same user anonymously, you can use the nullifier (hash of scope + priv key) to do that, and the actual nullifier would be hash of nullifier + message. Voting requires nullifiers to prevent double-voting.
Is this app supposed to be used by PSE folks only? If so, another option is to use Metamask to sign a message and use it as a secret to generate a priv key deterministically + SIWE. Also, if you're going to save the user identity commitments what's the point in using Bandada? Couldn't you use your db directly? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
originally on https://talk.zketh.io/post/1/4
Introduction
Freedit is a secure, lightweight forum application built with Rust, Axum, and sled. The platform currently supports features like user authentication, subgroup creation (inns), personal spaces (solos), and private encrypted messaging. To enhance user privacy and flexibility, there is a desire to integrate an anonymity feature that allows users to anonymize some of their actions within the platform. This document outlines a potential UX and product requirements for this feature, explores a potential architectural solutions, and provides a high-level step-by-step implementation plan.
Requirements
Anonymity Toggle
Feature: Introduce a toggle switch within the user interface that allows users to switch between anonymity modes:
Requirements:
Anonymous Actions
The following actions can be performed anonymously:
Security and Privacy
Possible Architecture Solution
Implement a single, global Semaphore group dedicated to handling all anonymous actions across the platform. Users who enable anonymous mode will send semaphore signal as member of this group. The freedit platform will generate and validate semaphore proofs accordingly.
Alternatives
Multiple semaphore groups: assign dedicated Semaphore groups for specific actions or contexts? (e.g., a separate group for voting). Users can toggle anonymity on a per-action basis, allowing for more granular control.
Comparison
High Level Implementation Plan
Enhance/Define DB Schema
There will be additional entities to manage, especially:
The previous yeap application used a relational DB (see schemas/migrations), while freedit uses sled which a key value embedded database.
We’ll need to decide whether we want to keep using sled or if we switch to a relational DB.
Integrate Semaphore Into Backend
Modify signup workflow (handler) to store a semaphore id commitment (generated client side)
It should not be necessary to implement this from scratch. We just need handlers to communicate with (forward requests to) bandada backend.
Frontend
Beta Was this translation helpful? Give feedback.
All reactions