Skip to content

Latest commit

 

History

History
81 lines (51 loc) · 2.35 KB

File metadata and controls

81 lines (51 loc) · 2.35 KB

ECDSA Node

This project demonstrates how to use Elliptic Curve Digital Signature Algorithm (ECDSA) to sign and verify transactions between Ethereum-style addresses using public key cryptography. The goal is to simulate how wallets like MetaMask authorize transactions without exposing the private key.

Although the server is centralized (no blockchain consensus layer), this repo focuses on cryptographic signing and basic address-based authentication — core concepts underlying Web3 applications.

🚀 Built with: Node.js, Express, React, Vite, ECDSA over secp256k1


✨ Features

  • ✍️ Digital signatures using elliptic curve cryptography (secp256k1)
  • 🧾 Transfer system where only valid signatures from private keys can initiate transactions
  • ⚛️ React frontend to simulate wallet interactions
  • 🔐 No private key ever leaves the client; signatures are generated client-side
  • 💡 Great intro to the mechanics of Web3 wallets and signature verification

🛠️ Getting Started

Prerequisites

  • Node.js (v16+ recommended)
  • npm

🔌 Server Setup

cd server
npm install
node index.js  # or use `nodemon` for hot reload

Server runs on `` by default.

💻 Client Setup

cd client
npm install
npm run dev

Client runs on ``


📂 Folder Structure

/client     --> React + Vite frontend
/server     --> Express server, ECDSA logic

🤔 Why This Project?

This project was originally inspired by cryptographic wallet systems in blockchain environments. I wanted to dig deeper into how Ethereum wallets like MetaMask generate and verify transactions using ECDSA signatures. The project helped me understand:

  • How transactions are signed client-side and verified server-side
  • Why replay attacks and nonce management matter
  • How digital identity can be proven using just a public key

🚧 Possible Future Improvements

  • ⛓️ Add a blockchain layer (e.g., using Hardhat or Ganache)
  • 🔀 Implement nonce-based replay protection
  • 📜 Add transaction history persistence
  • 🔄 Make it fully decentralized with peer-to-peer message passing

Acknowledgements

This project was inspired by the ecdsa-node repo from Alchemy University, but has been personalized with my own modifications, explanations, and design choices.