Skip to content

A demonstration of the Merkle-Hellman Knapsack Cryptosystem, written in Java.

License

Notifications You must be signed in to change notification settings

Stephen-X/Merkle-Hellman-Knapsack-Cryptosystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merkle-Hellman Knapsack Cryptosystem Demo

Author: Stephen Tse <[redacted]@cmu.edu>

A demonstration of the Merkle-Hellman Knapsack Cryptosystem, one of the earliest public key cryptosystems in 1970s. It should have been coded in C though, as bit manipulation on strings in Java is suprisingly troublesome and inefficient, but well here's assignment requirement to you... :/

Because the algorithm generates large public / private keys proportional to the maximum bits of a message to be encrypted, this demo limits the maximum characters allowed per turn to 150. Nontheless, it already consumed about 433MB RAM on my computer! Consider reducing MAX_CHARS if this is still too much for your machine.

Note that the cryptosystem has been cracked by a polynomial-time algorithm.

Screenshot

About

A demonstration of the Merkle-Hellman Knapsack Cryptosystem, written in Java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages