mak- / digital-signature-elgamal Goto Github PK
View Code? Open in Web Editor NEWImplementing a Digital signature using the ElGamal signature scheme. (Crypto Assignment 2)
Implementing a Digital signature using the ElGamal signature scheme. (Crypto Assignment 2)
-------------------------------------- ____ _ ____ / ___|_ __ _ _ _ __ | |_ ___|___ \ | | | '__| | | | '_ \| __/ _ \ __) | | |___| | | |_| | |_) | || (_) / __/ \____|_| \__, | .__/ \__\___|_____| |___/|_| -------------------------------------- Ciaran McNally - Assignment 2 - 16/12/2013 This tool was developed as a solution to my second Cryptography assignment. --/For help/-- ./run.sh -help --/Example Run/-- ./run.sh -go -f Crypto.zip This would generate all our signatures & value files for inspection. ./run.sh -v -f Crypto.zip This would verify the file specified using the generated files with created with the last command. --/Files Generated/-- r.hex - File containing r signature value in hex s.hex - File containing s signature value in hex privatekey-x.hex - Private key publickey-y.hex - Public key --/Default Files/-- README - This file! argparser.jar - Used in assignment to parse cmd-line arguments. Crypto2.java - File containing assignment solution code run.sh - This compiles & sets the classpath, runs accepting additional cmd-line arguments. generator-g - Provided Generator hex g prime-mod-p - Provided Prime hex p --/Notes and Problems/-- I had a problem where the output of my multiplicative inverse was negative number. After some googling a suggestion I found was to mod the number again which resulted in a successful verification. I threw an Arithmetic Exception that matched the one thrown by the original modInverse BigInteger function, as I developed my code using this first and thought it would would be a good fit. This exception is thrown when no inverse exists. I catch it and try again. Likewise if our s = 0; I spent a full day debugging my mod_inverse function, I was getting a null exception error and found it difficult to locate as it was within my recursive function. I Eventually realised I simply didn't initialise one of my variables :( Fixed now! --/HELP OUTPUT/-- Usage: ./run.sh <params> Ciaran McNally Make sure the files 'prime-mod-p' and 'generator-g' are in your dir. Options include: -help,-? displays help information -go Run assignment and generate our values... -f,-file <string> File to encrypt -v,-verify Verify correct encryption.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.