CSerxy / DH

Implement DH algorithm by using high precision.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I write my homework under MAC OS, so the executable docoments can be executed under mac.



There are four code documents in this homework.

They are Calculator.h, DH.cpp, Calculator.cpp, main.cpp

Calculator.h declarates the class that will be used in DH.cpp and main.cpp

Calculator.cpp defines the class member functions that declarated in Calculator.h

main.cpp implements the requirement of "Write a +-*/ algorithm for large integers."

DH.cpp implements the requirement of "Implement the DH algorithm."



There are two executable documents in this homework.

They are Calculator and DH

Calculator requires you to input a large integer in first line, and it requires you to input a oprator(limited in +-*/) in second line, and it requires you to input a large integer in third line.
It will give you answer quickly.

DH requies you to input a prime number p, a primitive root g, the first secret key a, the second secret key b.
It will give you the first public key A, the second public key B, the session key K.

About

Implement DH algorithm by using high precision.


Languages

Language:C++ 100.0%