项目作者: Kjablonska

项目描述 :
RSA public key cipher.
高级语言: Python
项目地址: git://github.com/Kjablonska/RSA-public-key-cipher.git
创建时间: 2021-04-07T10:43:04Z
项目社区:https://github.com/Kjablonska/RSA-public-key-cipher

开源协议:

下载


RSA public key cipher

Developed in Python 3.6.8.

Description

Program is divided into 3 files.

  • RSA.py - generate keys.
    Generating keys could be optimized by inputting file with previously generated prime numbers and simply taking random number from this set.

  • encrypt.py - encryption algorithm.
    Takes as input txt files with public key and message to be encrypted.
    Saves encrypted message to the file encryptedMessage.txt
    To encrypt message there is used function pow(m, n, e), where e and n numbers are read from the file containing the key and m is text to be encrypted.

  • decrypt.py - decryption algorithm.
    Takes as input txt files with private key and encrypted message to be decrypted.
    Saves decrypted message to the file decryptedMessage.txt
    To encrypt message there is used function pow(c, d, n), where d and n numbers are read from the file containing the key and c is text to be decrypted.

Algorithm

00