Feature: Implement Digital Signatures (Public/Private Key Cryptography) for Transactions
Los mantenedores suelen responder en 2 días
@sohanjadyal ya está trabajando en esto.
Desde el 9/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- blockchain, security
Línea de trabajo
Start by reading Transaction.java, Blockchain.java, and BlockchainTest.java to understand transaction creation, validation, and existing test patterns. Then check how chain.dat is serialized and how its compatibility is handled. Done means wallets can generate key pairs, transactions can be signed and verified, invalid or unsigned transactions are rejected, and tests cover valid and forged transactions.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description:
Currently, our mini-chain relies entirely on a trust-based system where users manually type in the sender's name when creating a transaction. This means there is no concept of ownership or authentication, and anyone can easily spend someone else's coins by simply typing in their name.
To make this project behave like a real-world blockchain, I believe we should introduce cryptographic authentication to verify the sender of every transaction.
Proposed Solution:
Implement Public/Private key cryptography (e.g., using Java's built-in java.security.KeyPairGenerator with RSA or ECDSA).
- Wallets: Create a
Walletconcept where every user generates aPrivateKey(used for signing) and aPublicKey(which acts as their network address). - Transaction Signing: When sending coins, the
Transactionclass should include a new method to generate a digital signature using the sender'sPrivateKey. - Transaction Verification: The
Transactionclass should include a method to verify the signature using the sender'sPublicKey. - Validation Logic: Update
Blockchain.javaso thataddTransaction()andisValid()refuse any transactions that do not contain a valid cryptographic signature. - (Optional) Update
Main.javato simulate creating a wallet on startup if one doesn't exist.
Acceptance Criteria:
- A
Walletclass (or similar logic) exists to generate KeyPairs. -
Transactionclass stores a digital signature and the sender's Public Key. -
TransactionhassignTransaction(PrivateKey)andverifySignature()methods. -
Blockchain.javarejects unsigned or improperly signed transactions. -
BlockchainTest.javaincludes tests verifying that forged transactions are rejected and valid signatures are accepted.
Additional Context:
This will require a minor change to the Transaction model, which will likely break backward compatibility with older chain.dat files. We should increment the serialVersionUID or warn users to delete their existing .dat files when this is merged.
- Lenguaje dominante
- Java
- Estrellas
- 0
- Forks
- 3
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de techcsispit/mini-chain
-
Blockchain.isValid() does not verify sender balance, allowing blocks with negative balances to pass validationPosiblemente ocupada @aadiitya2007 la tomó hace 5 días. Abiertobug good first issue
Dificultad 4/5 1-2 días Aptitud para principiantes 20/100
techcsispit/mini-chain#37 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
README says changing Block or Transaction makes chain.dat stop loading, but adding a field or method still loads itPosiblemente ocupada @tanujb03 la tomó hace 24 días. Abiertodocumentation good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 25/100
techcsispit/mini-chain#21 ·
Los mantenedores suelen responder en 2 días
Todos los issues de techcsispit/mini-chain
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
objectionary/lints#1640 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openhab/openhab-addons#22168 ·
Los mantenedores suelen responder en 1 día