paillier-bigint
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "paillier-bigint", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "An implementation of the Paillier cryptosystem using native JS (stage 3) implementation of BigInt", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -54,4 +54,4 @@ # bigint-paillier | ||
4. Select generator `g` where in Z* of `n^2`. `g` can be computed as follows (there are other ways): | ||
* Generate randoms `λ` and `β` in Z* of n (i.e. `0<λ<n` and `0<β<n`). | ||
* Compute `g=( λ·n + 1 ) β^n mod n^2` | ||
* Generate randoms `α` and `β` in Z* of n (i.e. `0<α<n` and `0<β<n`). | ||
* Compute `g=( α·n + 1 ) β^n mod n^2` | ||
5. Compute `μ=( L( g^λ mod n^2 ) )^(-1) mod n` where `L(x)=(x-1)/n`. | ||
@@ -64,10 +64,12 @@ | ||
## Encryption | ||
Let `m` in Z* of `n` be the clear-text message, 1. Select random `r` in Z* of `n^2`. | ||
Let `m` in Z* of `n` be the clear-text message, | ||
Compute ciphertext as: **`c=g^m · r^n mod n^2`** | ||
1. Select random `r` in Z* of `n^2`. | ||
2. Compute ciphertext as: **`c=g^m · r^n mod n^2`** | ||
## Decryption | ||
Let `c` be the ciphertext to decrypt, where `c` in Z* of `n^2`. | ||
Compute the plaintext message as: **`m=L( c^λ mod n^2 ) · μ mod n`** | ||
1. Compute the plaintext message as: **`m=L( c^λ mod n^2 ) · μ mod n`** | ||
@@ -74,0 +76,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130799
449