This module is being developed as a part of Cryptography with elements of algebra course. It includes implementation of basic and advanced algorithms, including cryptographic algorithms.
Module 1 includes basic algorithms:
- addBinary: school addition algorithm,
- multiplyBinary: division with remainder algorithm,
- divideBinary: school multiplication algorithm,
and advanced algorithms:
- findInverse: finding an inverse modulo n,
- fastPower: fast power algorithm,
- isSquare: algorithm which checks whether an element is a square modulo p,
- squarePrime: algorithm which finds a square root of a square modulo p,
- fermat: algorithm which checks the primality using Fermat's test.
To install dependencies, run the following command in the root of the project:
npm install
To run the project, run the following command in the root of the project:
npm start
You will see the result as the command line output.
To test algorithms, run the following command in the root of the project:
npm test