Skip to content

tanishqg5325/Mixed-Encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mixed Encryption

Overview

A public key infrastructure (PKI) is an arrangement that binds public keys with respective identities of entities (like people and organizations). The binding is established through a process of registration and issuance of certificates by a certificate authority (CA). The primary role of the CA is to digitally sign and publish the public key bound to a given user. This is done using the CA's own private key, so that trust in the user key relies on one's trust in the validity of the CA's key.

Consider a mixed encryption scheme, which combines asymmetric key scheme with symmetric key scheme. We can define a mixed encryption scheme for transmitting a message m from user P to user Q, as follows:

Definitions

  • m := message
  • k := key of symmetric key scheme
  • skP := secret key for user P
  • pkP := public key for user P
  • skQ := secret key for user Q
  • pkQ := public key for user Q
  • ES := Encryption algorithm for symmetric key scheme
  • DS := Decryption algorithm for symmetric key scheme
  • EA := Encryption algorithm for asymmetric key scheme
  • DA := Decryption algorithm for asymmetric key scheme

Encryption by User P

  1. cs ← ES(m, k)
  2. (c, k') ← EA(DA((cs, k), skP), pkQ)

Decryption by User Q

  1. (cs, k) ← EA(DA((c, k'), skQ), pkP)
  2. m ← DS(cs, k)

In this project, RSA has been used as asymmetric key scheme and Vigenere as symmetric key scheme.

Usage

Requirements

  • GNU Multiple Precision Arithmetic Library

    apt-get install libgmp-dev

Compile

make

Execute

./rsa < <file_containing_message>

Example

./rsa < input.txt

Clean

make clean