- Naccache-Stern knapsack cryptosystem
Note: this is not to be confused with the
Naccache-Stern cryptosystem based on thehigher residuosity problem .The Naccache-Stern Knapsack Cryptosystem is an atypical Public Key Cryptosystem developed by
David Naccache andJacques Stern in 1997. This cryptosystem is deterministic, and hence is not semantically secure. This system also lacksprovable security .ystem Overview
This system is based on a type of
knapsack problem . Specifically, the underlying problem is this: given integers "c","n","p" and "v"0,...,"v""n", find a vector such that:The idea here is that when the "v""i" are relatively prime and much smaller than the modulus "p" this problem can be solved easily. It is this observation which allows decryption.
Key Generation
To generate a public/private key pair
*Pick a large prime modulus "p".
*Pick a positive integer "n".
*For "i" from 0 to "n", set "p""i" to be the "i"th prime, starting with "p"0 = 2.
*Pick a secret integer "s" < "p"-1, such that gcd("p"-1,"s") = 1.
*Set . Note: these roots can be calculated using thePohlig-Hellman algorithm .The public key is then "p","n" and "v"0,...,"v""n". The private key is "s".
Encryption
To encrypt an "n"-bit long message "m", calculate
:
where "m""i" is the "i"th bit of the message "m".
Decryption
To decrypt a message "c", calculate
:
This works because the fraction
:
is 0 or 1 depending on whether "p""i" divides "c""s" mod "p".
References
[http://citeseer.ist.psu.edu/205954.html Original Paper]
[http://eprint.iacr.org/2008/119.pdf Recent bandwidth improvement]
Wikimedia Foundation. 2010.