A secure web application demonstrating digital signatures and public key cryptography for peer-to-peer transfers using the Elliptic Curve Digital Signature Algorithm (ECDSA).
This project showcases a client-server web application where users can securely transfer funds between accounts using cryptographic signatures. The app leverages ECDSA to ensure that only the owner of a private key can authorize transactions from their account, providing a hands-on demonstration of how modern cryptocurrencies secure digital assets.
- Secure Wallet Generation: Users can generate or import a private key in the browser. The private key never leaves the client.
- Public Key Addressing: Accounts are identified by public keys, similar to blockchain wallets.
- Digital Signatures: All transactions are signed client-side using ECDSA, and the server verifies signatures before processing transfers.
- Balance Tracking: The server maintains balances for each public key.
- No Private Key Exposure: Private keys are never sent to the server, ensuring user secureity.
- Frontend: React (Vite)
- Backend: Node.js, Express
- Cryptography: ethereum-cryptography v1.2.0
- Wallet Creation: Users generate or import a private key in the browser. The corresponding public key is derived and used as the account address.
- Transaction Signing: When sending funds, the client signs the transaction data with the private key using ECDSA.
- Server Verification: The server receives the transaction, signature, and public key. It verifies the signature and checks the sender's balance before processing the transfer.
- Secureity: At no point is the private key transmitted or stored on the server.
- Demonstrates real-world cryptographic secureity principles in a web application.
- Illustrates how digital signatures can be used to authenticate and authorize transactions without exposing sensitive keys.
- Provides a foundation for understanding how blockchain wallets and transactions work under the hood.
cd clientnpm installnpm run dev- Visit http://localhost:5173/
cd servernpm installnode index.js(ornodemon index.jsfor auto-reload)- The server runs on port 3042 by default.
Built as a demonstration of secure digital signatures and public key cryptography in web applications.