[go: nahoru, domu]

Skip to content

Astrophore/Increasing-Trapdoor-Knapsack-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Trapdoor Knapsack Problem

Implementing an C++ super increasing knapsack to show the encryption and decryption of message This program demonstrates the concept of super-increasing knapsack of 8 private keys. User input is required.

Compilation

On Linux terminal:
g++ -std=c++11 knapsack.cpp -o knapsack

Example of Program execution

User types in 8 inputs (2,7,11,21,42,89,180,354) for super increasing knapsack
Program calculates total sum of knapsack inputs and display

User key in modulus value that is larger than sum of knapsack (881)

User key in multiplier value that must be coprime to modulus value that is earlier given (588)

User is prompted to key in message to encrypt 

Program displays encypted message in bits 

Program displays decrypted message in bits and back into plaintext




 
 

 

About

Demonstration of super increasing knapsack in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages