#For fun, you input an extremely large number into the maximum field, open the
console in inspector and watch how many calculations are made before finding a match... depending on the
number can take some time...
*Secretly Multiplying 2 messages and returning a result (M = M1 *
M2)
Tools:
#For fun, you can input an extremely large number into the maximum field, open the
console in inspector and watch how many calculations are made before finding a match for [p], and
[g].... depending on the number can take some time....
Calculate y (y):
Calculate k (k1):
Calculate k (k2):
Calculate Code 1 (C11):
Calculate Code 1 (C21):
Calculate Code 2 (C12):
Calculate Code 2 (C22):
Cloud calculates encoded value and returns A and B values
This project was put together during the mid semester break to help identify and understand the underlying
concepts, formulas and principles within the Cryptography classes.
This is the original site, it holds the standard base calculations in javascript, however due to the javascript large
number limitations it can not hadle substantially large numbers, so it ony contains the basic concepts and tools,
such as:
Modulus calculation
Power modulus calculations
Modulus Inverse Calculations
Random Prime number
Random number
Elgamal Encryption
Elgamal Decryption
Paillier Encryption
Paillier Decryption
The javascript files have been broken up into specific types of calculations to help users identify how the
formulas are calculated in the javascript language. These are using basic javascript mathematic calculations in
order to help other users understand the underlying concepts.
If you want to view the specific javascript calculations, here are the links to the speicic javascript files. All
the methods have comments explaing what they do, how they function and the values required for them to function:
This is a child of the original site, it has the same initial calculations, however this version uses the BigInteger.js
javascript library which allows uses to do calculations on substantially large numbers. Due to this, further
examples have been added as they can use substantially larger numbers for their calculations.
The tools so far are:
Modulus calculation
Power modulus calculations
Modulus Inverse Calculations
Random Prime number
Random number
Convert Number to Binary
Convert Binary to Number
Elgamal Encryption
Elgamal Decryption
Paillier Encryption
Paillier Decryption
Elgamal Homomorphic encryption/decryption and
multiplication of secret numbers
*The Paillier version for secret addition of numbers will be added shortly for reference.
The javascript files for these are also split up based on type of calculations to help users understand the
concepts, however as they use the BigInteger.js library, the code is not using standard mathematic formulas. The
BigInteger.js library can be found at: https://github.com/peterolson/BigInteger.js and
it also lists a full explanation and examples of the library methods in the readme on the page.
If you want to view the specific javascript calculations, here are the links to the speicic javascript files. All
the methods have comments explaing what they do, how they function and the values required for them to function: