Welcome to our RSA cryptography project, developed as a part of our final project for the Discrete Mathematics course at the Federal University of Alagoas (UFAL). In this project, we employed technologies including C for the cryptography implementation and Vue.js with Vuetify for the frontend development.
RSA cryptography, named after its inventors Ron Rivest, Adi Shamir, and Leonard Adleman, is a widely used public-key encryption algorithm. It plays a crucial role in securing communications over the internet, protecting sensitive data, and ensuring the integrity of digital signatures.
RSA encryption relies on the mathematical properties of large prime numbers and their relationship with modular arithmetic. Here's a simplified explanation of how it works:
-
Key Generation:
- Choose two large prime numbers,
p
andq
. - Calculate their product
n = p * q
. - Compute Euler's totient function,
φ(n) = (p - 1) * (q - 1)
. - Choose a public exponent
e
such that1 < e < φ(n)
ande
is coprime toφ(n)
. - Calculate the private exponent
d
such thatd * e ≡ 1 (mod φ(n))
.
- Choose two large prime numbers,
-
Encryption:
- To encrypt a message
M
, the sender uses the recipient's public key(e, n)
. - The sender calculates the ciphertext
C
asC ≡ M^e (mod n)
.
- To encrypt a message
-
Decryption:
- To decrypt the ciphertext
C
, the recipient uses their private key(d, n)
. - The recipient calculates the original message
M
asM ≡ C^d (mod n)
.
- To decrypt the ciphertext
The security of RSA cryptography relies on the difficulty of factoring the product n
(known as the RSA modulus) into its prime factors p
and q
. As long as this factorization remains computationally infeasible for sufficiently large numbers, RSA encryption remains secure.
Our project implements the RSA encryption and decryption processes in the C programming language, providing a secure and efficient way to protect your data.
Feel free to explore the code and documentation to understand how our project works and how you can use it.
Make sure you have the following dependencies installed:
-
Clone this repository to your local system:
git clone https://github.com/Eliezir/Criptografia-RSA cd Criptografia-RSA
# yarn
yarn
# npm
npm install
# pnpm
pnpm install
# bun
bun install
# yarn
yarn dev
# npm
npm run dev
# pnpm
pnpm dev
# bun
bun run dev
# yarn
yarn build
# npm
npm run build
# pnpm
pnpm build
# bun
bun run build
# yarn
yarn lint
# npm
npm run lint
# pnpm
pnpm lint
# bun
bun run lint
- Eliezir Moreira (GitHub: @Eliezir)
- Josué Medino (GitHub: @Josué)
- Josenilton Ferreira (GitHub: @Josenilton)
- Lucas Maciel (GitHub: @Lucas)
- Raphael Phillips (GitHub: @Raphael)
We hope you find our RSA cryptography project both educational and useful. If you have any questions or encounter any issues, please don't hesitate to open an issue or reach out to one of the contributors.