GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MohamedHashim/RSA_Algorithm: Simple implementation of RSA algorithm, asymmetric cryptography algorithm

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
venv
venv
 
 
README.md
README.md
 
 
main.py
main.py
 
 
screenshot.PNG
screenshot.PNG
 
 

Repository files navigation

RSA Algorithm

Simple implementation of RSA algorithm, asymmetric cryptography algorithm

The concept of RSA Algorithm is generating public and private keys in 512 bits.

Screenshot

The Algorithm theory:

1- Key Generation

• Choose two random prime numbers p & q using Miller-Rabin Test
• Compute n =p*q
• Compute euler phi = (p-1) (q-1)
• Choose e, random prime number in specific range
• Then get the key of (n,e)

2- Message Encryption using EEA (Extended Euclidean algorithm)

• C = m^e mod n

3- Message Decryption using CRT

• C^d mod n
• e^-1 mod phi

• Miller-Rabin Test

1- Get U & R from the prime number
2- Use Square and multiply algorithm to allow fast exponentiaition

• CRT

1- Modular representation of y into p and q

𝑦𝑝=𝑦 𝑚𝑜𝑑 𝑝 
𝑦𝑞=𝑦 𝑚𝑜𝑑 𝑞 

2- Compute exponents

𝑑𝑝=𝑑 𝑚𝑜𝑑 (𝑝−1) 
𝑑𝑞=𝑑 𝑚𝑜𝑑 (𝑞−1) 

3- Compute exponentiation

𝑥𝑝=𝑦𝑝𝑑𝑝 𝑚𝑜𝑑 𝑝
𝑥𝑞=𝑦𝑞𝑑𝑞 𝑚𝑜𝑑 𝑞

4- Compute C:

𝐶𝑝=𝑞−1 𝑚𝑜𝑑 𝑝 
𝐶𝑞=𝑝−1 𝑚𝑜𝑑 𝑞 

5- Compute X

𝑋 = {(𝑞.𝐶𝑝)𝑋𝑝 + (𝑝.𝐶𝑞) 𝑋𝑞} 𝑚𝑜𝑑 𝑛 

About

Simple implementation of RSA algorithm, asymmetric cryptography algorithm

Topics

rsa-algorithmrsa-encryptionrsa-key-encryption

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.