All Projects → ridwanmsharif → prsa

ridwanmsharif / prsa

Licence: MIT license
RSA Public Key Encryption

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to prsa

optiga-trust-m
OPTIGA™ Trust M Software Framework
Stars: ✭ 86 (+377.78%)
Mutual labels:  rsa, public-key-cryptography
jh-weapp-demo
微信小程序项目- 实现一些常用效果、封装通用组件和工具类
Stars: ✭ 60 (+233.33%)
Mutual labels:  rsa
node-seal
Homomorphic Encryption for TypeScript or JavaScript - Microsoft SEAL
Stars: ✭ 139 (+672.22%)
Mutual labels:  cryptosystem
bee2
A cryptographic library
Stars: ✭ 59 (+227.78%)
Mutual labels:  public-key-cryptography
cryptotools
No description or website provided.
Stars: ✭ 182 (+911.11%)
Mutual labels:  rsa
PemToXml
Python script which converts RSA PEM key (PKCS#1) to XML compatible for .Net
Stars: ✭ 28 (+55.56%)
Mutual labels:  rsa
enigma
A fast, native, cryptographic engine for the web
Stars: ✭ 101 (+461.11%)
Mutual labels:  rsa
openssl
A functions wrapping of OpenSSL library for symmetric and asymmetric encryption and decryption.
Stars: ✭ 199 (+1005.56%)
Mutual labels:  rsa
blog v3
云天河博客v3,后端重构Laravel5系列+Gulp+VUE
Stars: ✭ 22 (+22.22%)
Mutual labels:  rsa
rsa aes md5
RSA(SHA1withRSA/pem私钥0/crt证书公钥) + AES(256/AES/CBC/PKCS5Padding)
Stars: ✭ 11 (-38.89%)
Mutual labels:  rsa
keystore-idb
In-browser key management with IndexedDB and the Web Crypto API
Stars: ✭ 37 (+105.56%)
Mutual labels:  rsa
rsa-encrypt-body-spring-boot
Spring Boot 接口请求参数自动加解密
Stars: ✭ 108 (+500%)
Mutual labels:  rsa
Qt-Secret
Simple encryption library supporting RSA and AES algorithms.
Stars: ✭ 196 (+988.89%)
Mutual labels:  rsa
Computer-Security-algorithms
👨‍💻 Computer Security algorithms in C#
Stars: ✭ 48 (+166.67%)
Mutual labels:  rsa
Python-SecureHTTP
Make HTTP transmissions more secure via RSA+AES, encrypted communication for C/S architecture.
Stars: ✭ 19 (+5.56%)
Mutual labels:  rsa
encryption
A simple wrapper for the OpenSSL Cipher library for Ruby and Rails applications. Distributed as a Gem through Rubygems.
Stars: ✭ 28 (+55.56%)
Mutual labels:  rsa
signature
HMAC and RSA signature for Laravel and Lumen
Stars: ✭ 26 (+44.44%)
Mutual labels:  rsa
RSA-via-OpenSSL-libeay32
Реализация шифрования/дешифрование строки алгоритмом RSA через библиотеку openssl на Delphi
Stars: ✭ 29 (+61.11%)
Mutual labels:  rsa
vault
Is a plugin for project management system Redmine. Allows you to store various passwords/keys in one place for the project.
Stars: ✭ 44 (+144.44%)
Mutual labels:  encryption-key
rhonabwy
Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
Stars: ✭ 33 (+83.33%)
Mutual labels:  rsa

RSA implementation (Python)

Implementation of the algorithms defined by the RSA scheme as a Command Line Utility. Computes ciphertext from message and Computes message from ciphertext granted access to secret decryption key by using Extended Euclidean Algorithm, Unicode Points, Modular Arithmetic and Modular Exponentiation

Setup

pip install primesieve
pip install prsa

What is the RSA Scheme?

RSA is one of the first practical public-key cryptosystems and is widely used for secure data transmission. In this cryptosystem, the encryption key is public and differs from the decryption key which is kept secret. In RSA, this asymmetry is based on the practical difficulty of factoring the product of two large prime numbers, the factoring problem. RSA is made of the initial letters of the surnames of Ron Rivest, Adi Shamir, and Leonard Adleman - The minds behind the RSA Scheme.

Usage

Help

~$ prsa -h
usage: PRSA [-h] {decrypt,encrypt,generate} ...

Implementation of the algorithms defined by the RSA scheme in Python3.
Computes ciphertext from message and Computes message from ciphertext granted
access to secret decryption key by using Extended Euclidean Algorithm, Unicode
Points, Modular Arithmetic and Modular Exponentiation

positional arguments:
  {decrypt,encrypt,generate}
    decrypt             Decrypt ciphertext using RSA
    encrypt             Encrypt message using RSA
    generate            Find a key pair given the two natural numbers

optional arguments:
  -h, --help            show this help message and exit

Generate Help

~$ prsa generate -h
usage: PRSA generate [-h] p q

positional arguments:
  p           An integer for setting a prime (p)
  q           An integer for setting a prime (q)

optional arguments:
  -h, --help  show this help message and exit

Encrypt Help

~$ prsa encrypt -h
usage: PRSA encrypt [-h] M e n

positional arguments:
  M           Message to be encrypted
  e           A natural number that serves as the first element of the public
              key
  n           A natural number that serves as the second element of the
              private key

optional arguments:
  -h, --help  show this help message and exit

Decrypt Help

~$ prsa decrypt -h
usage: PRSA decrypt [-h] C d n

positional arguments:
  C           Encoded ciphertext to be decrypted
  d           A natural number that serves as the first element of the private
              key
  n           A natural number that serves as the second element of the
              private key

optional arguments:
  -h, --help  show this help message and exit

Example

Generate Keys, Encrypt 'msg' and then Decrypt

~$ prsa generate 31974198 84197413
   {
	'Public': [579312365, 1042765315429168511L], 
	'Private': [802880348865349973L, 1042765315429168511L],
   }

~$ prsa encrypt "msg" 579312365 1042765315429168511
   585349761260265530

~$ prsa decrypt 585349761260265530 802880348865349973 1042765315429168511
   msg

Disclaimer

Purely experimental project. Designed for learning purposes not production use.

Contributing

Bug reports and pull requests are welcome on GitHub at @ridwanmsharif

Author

Ridwan M. Sharif: E-mail, @ridwanmsharif

License

The command line utility is available as open source under the terms of the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].