EPiC
Efficient Privacy-Preserving Counting for MapReduce
 All Classes Namespaces Functions Variables
Static Public Member Functions
common.Cipher Class Reference

Provides encryption and decryption operations. More...

List of all members.

Static Public Member Functions

static void initialize (String paramfile)
 Initializes the cipher with parameters in a given file.
static void initialize (InputStream is)
 Initializes the cipher with parameters in a stream.
static BigInteger encrypt (BigInteger x)
 Encrypts an integer x to E(x).
static BigInteger decrypt (BigInteger c)
 Decrypts an encrypted value to the original integer value.
static BigInteger decrypt (BigInteger c, int degree)
 Decrypts an encrypted value of a specified degree of b to the original integer value.

Detailed Description

Provides encryption and decryption operations.

The used encryption scheme is

$y=E(x)=b\cdot{}(r\cdot{}q+x)\bmod{p}$

The decryption is done by

$x=D(y)=b^{-1}\cdot{}y\bmod{p}\bmod{q}$

If an encrypted value is known to contain b of a degree k greater than 1, the decryption is instead done by $x=D(y,k)=b^{-k}\cdot{}y\bmod{p}\bmod{q}$

Before using, the Cipher object needs to be initialized with either a parameters file (see initialize(String)) or a stream (see initialize(InputStream)) containing the parameters.

Author:
vohuudtr

Member Function Documentation

static BigInteger common.Cipher.decrypt ( BigInteger  c) [inline, static]

Decrypts an encrypted value to the original integer value.

Parameters:
cencrypted value.
Returns:
plain-text integer.
static BigInteger common.Cipher.decrypt ( BigInteger  c,
int  degree 
) [inline, static]

Decrypts an encrypted value of a specified degree of b to the original integer value.

Parameters:
cencrypted value.
degreeknown degree of b in the encrypted value.
Returns:
plain-text integer.
static BigInteger common.Cipher.encrypt ( BigInteger  x) [inline, static]

Encrypts an integer x to E(x).

Parameters:
xinteger to be encrypted.
Returns:
encrypted integer.
static void common.Cipher.initialize ( String  paramfile) [inline, static]

Initializes the cipher with parameters in a given file.

Parameters:
paramfileparameters filename.
static void common.Cipher.initialize ( InputStream  is) [inline, static]

Initializes the cipher with parameters in a stream.

Parameters:
isstream containing the parameters.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables