First commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Generating RSA Keys
|
||||
In the following section, we are going to see how to generate RSA Keys and how to encrypt data with these keys.
|
||||
|
||||
```
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from Cryptotools.Encryptions.RSA import RSA
|
||||
|
||||
|
||||
rsa = RSA()
|
||||
rsa.generateKeys(size=512)
|
||||
|
||||
e = rsa.e
|
||||
d = rsa.d
|
||||
n = rsa.n
|
||||
|
||||
s = "I am encrypted with RSA"
|
||||
print(f"plaintext: {s}")
|
||||
encrypted = rsa.encrypt(s)
|
||||
|
||||
# Encrypt data
|
||||
print(f"ciphertext: {encrypted}")
|
||||
|
||||
# We decrypt
|
||||
plaintext = rsa.decrypt(encrypted)
|
||||
print(f"Plaintext: {plaintext}")
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
# Group Theory
|
||||
## Group
|
||||
::: Cryptotools.Groups.group
|
||||
|
||||
## Cyclic group
|
||||
::: Cryptotools.Groups.cyclic
|
||||
|
||||
## Galois Field (Finite Field)
|
||||
::: Cryptotools.Groups.galois
|
||||
@@ -0,0 +1,13 @@
|
||||
# Welcome to CryptoTools
|
||||
|
||||
* [Introduction](/introduction)
|
||||
* [Installation](/installation)
|
||||
* Low-Level Cryptographic
|
||||
* [Number Theory](/number-theory)
|
||||
* [Group Theory](/group-theory)
|
||||
* Public Keys:
|
||||
* [RSA](/rsa)
|
||||
* Examples:
|
||||
* [Generating RSA keys](/examples-rsa-keys)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Installation
|
||||
To install the project, you should install from my own Python repository but, you first need to deploy your virtual enviroment.
|
||||
|
||||
## Installation from source
|
||||
You can install from the source. Download the [project](https://gitea.bucchino.org/gbucchino/cryptotools.git) and install it in your virtual environment:
|
||||
|
||||
```
|
||||
$ virtualenv ~/venv/cryptotools
|
||||
$ source ~/venv/cryptotools/bin/activate
|
||||
```
|
||||
|
||||
```
|
||||
$ git clone https://gitea.bucchino.org/gbucchino/cryptotools.git
|
||||
$ cd cryptotools
|
||||
$ python3 setup.py install
|
||||
```
|
||||
|
||||
The installation is completed. You can know use Cryptotools package into your project. In the directory `examples` you may find some examples scripts
|
||||
@@ -0,0 +1,5 @@
|
||||
# CryptoTools
|
||||
CryptoTools is a Python package that provides low-level cryptographic primitives for generating strong numbers. With this project, it's possible to generate public key cryptosystems such as RSA.
|
||||
This project has a academic purpose and can not be used in production enviroment yet.
|
||||
|
||||
So far, my cryptographic modules are not compliant with [FIPS 140-3](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-3.pdf) but in the future, that will be.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Number Theory
|
||||
For generating keys, we need strong prime number, they are the basis. CryptoTools provides functions for generating these numbers.
|
||||
|
||||
## prime numbers
|
||||
::: Cryptotools.Numbers.primeNumber
|
||||
|
||||
## Fibonacci sequence
|
||||
::: Cryptotools.Numbers.numbers
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
CryptoTools provides several functions for generating a RSA Keys
|
||||
|
||||
::: Cryptotools.Encryptions.RSA
|
||||
Reference in New Issue
Block a user