The doc is under assignment_1/Assignment 1.docx.
- gpp compiler
Change direcotry to assignment_1/programming_project. To complie all files and generate the executable, issue the command
make
The .o files will be generated under build/src/, and the executable a.out will be generated under build/. To run the executable, change directory to build/ and issue the command
./a.out
- getRandInt()
- isPrime()
- getPublicKey();
- extendEuclidGcd()
- euclidGcd()
- getMsg() //I plan to combine getMsg and the conversion to BearCatASCII into one function
- engToBearCatAscii() //I plan to combine getMsg and the conversion to BearCatASCII into one function
- polyEval()
- rsaEncrypt();
- rsaDecrypt();
- changeBase();
- bearCatAsciiToEng()
- int getRandInt();
- bool isPrime(int n, int k);
- int getPublicKey();
- int euclidGcd(int e, int phiN);
- tuple<int, int, int> extendEuclidGcd(int a, int b, int g, int x, int y);
- string getMsg();
- list engToBearCatAscii(string msg);
- int polyEval(list bca, int base);
- int rsaEncrypt(int polyVal);
- int rsaDecrypt(int rsaEnc);
- list changeBase(int rsaDec, int base);
- string bearCatAsciiToEng(list bca);
- string getMsg();
- list engToBearCatAscii(string msg);
- string bearCatAsciiToEng(list bca);
- changeBase(); //I might be able to do this once I have an idea what this function is doing, could be wrapped up with BearCat to English function
- ...
...
- ...
...
- extendedEuclidGCD -- DONE
- euclidGCD -- DONE
- hornerEval (polyEval) -- DONE
- modularExponentiaion -- DONE
- bool isPrime(int n, int k);
Implemented by using miller-rabin, if no other prime test is used to replace this implementation, it can be considered as DONE
- list changeBase(int rsaDec, int base);
Implemented as convert a single number to a list of integer on ANY base.