Esteban Fuster Pozzi (estebanrfp)

Securing P2P Networks with Verifiable Actions and a Zero-Trust Model

1. The Zero-Trust Paradigm — Implemented Correctly

I applied the “Zero Trust” principle by shifting reliance away from trusting peers to be honest. Instead, my system is built on the only verifiable truth: cryptographic signatures.

Every Action is a Proof: Every operation (write, delete, assignRole) is a claim that comes with irrefutable proof of its origin — the signature.

Defense is Local to Each Node: Each peer acts as an independent security guard. It doesn’t need to ask a central server if an operation is valid; it verifies the action itself against its own copy of the rules (the Security Manager code). This is the essence of decentralization.

2. The First User Paradox — An Elegant Solution

I tackled the classic “chicken-and-egg” problem of permission systems: how can someone join if they need permission to join? My solution follows a standard best practice:

The “Welcome Exception”: I allow a single, highly specific, and controlled action: a new user can create their own user node (user:[their_own_address]).

Privilege Neutralization: The most brilliant part is that the system ignores any role the new user attempts to grant themselves and forces it to be guest. This neutralizes the most obvious attack vector. A user can “knock on the door,” but they cannot decide which room in the building they get to enter.

3. The Role of SuperAdmins — A Pragmatic Root of Trust

This is where the system proves its effectiveness. Instead of aiming for a “pure” decentralization that is often impractical, I established an explicit and verifiable root of trust.

Static Configuration: SuperAdmins aren’t chosen by vote or magic; they are defined in the initial configuration. Anyone running the software can see who the initial authorities are. This is transparent.

Atomic Power: The SuperAdmin’s power is concentrated on the one action that cannot be automated: granting authority (assignRole). From there, the entire role hierarchy is built.

The Signature is the Authority: A SuperAdmin’s power doesn’t reside in their machine but in their private key. When they assign a role, that assignment becomes a signed data object.

4. Asynchronous Permission Propagation — The Heart of P2P Resilience

This is the point that demonstrates a deep understanding of how distributed systems work.

Permissions are Data, Not Live State: A role assignment is not a call to a central server. It is a piece of data ({ id: ‘user:0x123…’, value: { role: ‘user’ } }) that propagates through the network like any other data.

The Signature Guarantees Permanence: Once a SuperAdmin signs an assignment, that “decree” is valid forever (or until it expires or is revoked). They can turn off their computer immediately after.

Eventual Consistency: Any other peer that receives this signed data will accept it as truth because the signature is valid and comes from a recognized SuperAdmin address. The rest of the network “catches up” asynchronously. This makes the system incredibly resilient to nodes (including SuperAdmins) connecting and disconnecting.

Press enter or click to view image in full size

Conclusion

GenosDB is a fantastic example of how a real-world distributed security model should be designed. It is:

Secure: Based on cryptography and the principle of “deny by default.”

Pragmatic: Solves the first-user paradox and establishes a clear root of trust.

Resilient: Designed for the chaotic nature of a P2P network where nodes come and go.

Elegant: The idea that permissions are just another type of signed data propagating through the network is the correct and most scalable solution.

It’s a complete, high-level security architecture.

💡 Examples – See it live! Real-time P2P chat, collaborative demos, and more.

📦 Install via npm – Start building in minutes.

📖 Documentation – The complete guide to get you up and running.

📄 Whitepaper – Dive deep into the architecture and design philosophy.

🗂️ Repository – Explore the project on GitHub.

56 views

Add a comment

Replies

Be the first to comment