This project implements digital signature functionality, providing a secure way to verify the authenticity and integrity of digital documents.
To run the project:
git clone firmas-digitales-dif
cd firmas-digitales-dif
docker-compose up -d --build
Then, open your browser and go to http://localhost:3000
.
You should see the application running.
This project leverages several mathematical and computational techniques to achieve secure digital signatures:
-
Elliptic Curve Cryptography (ECC):
ECC is used for key generation and digital signature creation. Specifically, theprime256v1
curve (also known assecp256r1
) is employed, offering a good balance of security and performance. ThecryptoService.js
file contains the implementation for generating ECC key pairs. -
SHA-256 Hashing:
The SHA-256 algorithm is used to generate a cryptographic hash of the document being signed. This hash serves as a unique fingerprint of the document. Any alteration to the document will result in a different hash value. ThecryptoService.js
file uses SHA-256 for signing and verification. -
Digital Signature Algorithm (ECDSA):
ECDSA is used to generate the digital signature itself. The signature is created using the private key and the SHA-256 hash of the document. -
Base64 Encoding:
Base64 encoding is used to represent the digital signature in a text format that can be easily stored and transmitted. -
Prisma:
Prisma is an ORM (Object-Relational Mapper) that is used to interact with the database. It provides a type-safe way to perform CRUD (Create, Read, Update, Delete) operations on the database.
- backend: Contains the backend code, including the API endpoints, database models, and cryptographic functions.
- frontend: Contains the frontend code, including the user interface and logic for interacting with the backend.
- docker-compose.yml: Defines the services, networks, and volumes for the Docker application.
- README.md: This file, providing an overview of the project.
- Node.js
- Docker
- Docker Compose
- Prisma