Skip to content

Simple and efficient Elgamal Encryption with friendly UI

Notifications You must be signed in to change notification settings

zachtrong/ElGamal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ElGamal

Requirements

Java Zulu 11

Maven 3

Build

mvn clean javafx:jlink

Run

./bin/elgamaljava

Key Generation

First, input key set or generate one for further execution Screen Shot 2021-10-12 at 02 05 10

Figure 1: Options to input arbitary key set or let the program to generate one

Screen Shot 2021-10-12 at 02 09 00

Figure 2: Key set output of program key generation

Message Encryption

Second, for message encryption, input message in UTF-8 string. Program will output cipher in base64 format which encodes the cipher pair (C, r). Users ,therefore, can subsequently press on Encrypt button to view (C, r) pair in decimal format. Screen Shot 2021-10-12 at 02 09 26

Figure 3: An arbitary message in UTF-8 string

Screen Shot 2021-10-12 at 02 09 32

Figure 4: Cipher pair (C, r) in base64 format

Screen Shot 2021-10-12 at 02 09 39

Figure 5: Cipher pair (C, r) in decimal format

Message Decryption

Third, for message decryption, input either cipher (C, r) pair in decimal format or in base64 format. Press Decrypt button to start decrypt the cipher with the private key p and x on the Key Generation section.

Screen Shot 2021-10-12 at 02 14 34

Figure 5: Decrypt cipher pair (C, r) in base64 format

Screen Shot 2021-10-12 at 02 15 05

Figure 6: Decrypt cipher pair (C, r) in decimal format

Screen Shot 2021-10-12 at 02 15 35

Figure 7: Successfully decrypt cipher pair with provided private key p and x