FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme Class Reference

A fake CryptoScheme used to test and debug P2-DPOP. More...

Inheritance diagram for frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme:

Classes

class  FakePublicKeyShare
 A share of the (unused) public key. More...
class  FakeEncryptedInteger
 A wrapper around a BigInteger so that it implements AddableLimited. More...

Public Member Functions

 FakeCryptoScheme (Element params)
 Constructor.
String toString ()
AddableInteger decrypt (FakeEncryptedInteger initialCypherText, FakeEncryptedInteger partialDecryption)
FakeEncryptedInteger encrypt (AddableInteger cleartext)
FakeEncryptedInteger encrypt (AddableInteger cleartext, AddableInteger bound)
FakeEncryptedInteger partialDecrypt (FakeEncryptedInteger cyphertext)
 Partially decrypts the input cyphertext.
FakeEncryptedInteger reencrypt (FakeEncryptedInteger cyphertext)
FakeEncryptedInteger partialDecrypt (FakeEncryptedInteger initialCypherText, FakeEncryptedInteger partialDecryption)
void addPublicKeyShare (FakePublicKeyShare share)
FakePublicKeyShare newPublicKeyShare ()
Public Member Functions inherited from frodo2.solutionSpaces.crypto.CryptoScheme< C extends Serializable, E extends Serializable, K extends CryptoScheme.PublicKeyShare >
void addPublicKeyShare (K share)
 Records another share of the public key.
encrypt (C cleartext)
 Encrypts a cleartext.
encrypt (C cleartext, C bound)
 Encrypts a cleartext.
reencrypt (E cyphertext)
 Re-encrypts a cyphertext.
partialDecrypt (E initialCypherText, E partialDecryption)
 Partially decrypts a cyphertext.
decrypt (E initialCypherText, E partialDecryption)
 Decrypts a cyphertext.

Static Public Member Functions

static synchronized void resetCounter ()
 Resets the counter.

Private Attributes

final FakeEncryptedInteger key
 Key used for FakeCryptoScheme.

Static Private Attributes

static final long serialVersionUID = 5205003208535233191L
 Used for serialization.
static final FakeEncryptedInteger TEN = new FakeEncryptedInteger("10")
 CONSTANT 10.
static FakeEncryptedInteger cleartextPlusInf = new FakeEncryptedInteger("100000000000000000")
 +INF is replaced with this very large number, so that we can track its successive encryptions/decryptions
static final Object lock = new Object ()
 Lock to call before creating new key.
static final String startCounter = "10000"
 Initial value of the counter.
static FakeEncryptedInteger counter = new FakeEncryptedInteger(startCounter)
 counter

Detailed Description

A fake CryptoScheme used to test and debug P2-DPOP.

Author
Eric Zbinden, Thomas Leaute

Constructor & Destructor Documentation

◆ FakeCryptoScheme()

frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeCryptoScheme ( Element params)

Constructor.

Parameters
paramsunused

References cleartextPlusInf, counter, key, lock, and TEN.

Member Function Documentation

◆ addPublicKeyShare()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.addPublicKeyShare ( FakePublicKeyShare share)

◆ decrypt()

AddableInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.decrypt ( FakeEncryptedInteger initialCypherText,
FakeEncryptedInteger partialDecryption )

◆ encrypt() [1/2]

◆ encrypt() [2/2]

FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.encrypt ( AddableInteger cleartext,
AddableInteger bound )
See also
CryptoScheme#encrypt(Serializable, Serializable)

References encrypt().

Here is the call graph for this function:

◆ newPublicKeyShare()

◆ partialDecrypt() [1/2]

FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.partialDecrypt ( FakeEncryptedInteger cyphertext)

Partially decrypts the input cyphertext.

Parameters
cyphertextthe cyphertext to be partially decrypted
Returns
the partially decrypted cyphertext

References frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.add(), key, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.mod(), frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.subtract(), and TEN.

Referenced by partialDecrypt().

Here is the call graph for this function:

◆ partialDecrypt() [2/2]

FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.partialDecrypt ( FakeEncryptedInteger initialCypherText,
FakeEncryptedInteger partialDecryption )
See also
CryptoScheme.partialDecrypt(java.io.Serializable, java.io.Serializable)

References partialDecrypt().

Here is the call graph for this function:

◆ reencrypt()

FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.reencrypt ( FakeEncryptedInteger cyphertext)
See also
CryptoScheme#reencrypt(Serializable)

References frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.add(), and key.

Referenced by frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decrypt().

Here is the call graph for this function:

◆ resetCounter()

synchronized void frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.resetCounter ( )
static

◆ toString()

String frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.toString ( )
See also
java.lang.Object#toString()

Member Data Documentation

◆ cleartextPlusInf

FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.cleartextPlusInf = new FakeEncryptedInteger("100000000000000000")
staticprivate

◆ counter

FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.counter = new FakeEncryptedInteger(startCounter)
staticprivate

counter

Referenced by FakeCryptoScheme(), and resetCounter().

◆ key

final FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.key
private

◆ lock

final Object frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.lock = new Object ()
staticprivate

Lock to call before creating new key.

Referenced by FakeCryptoScheme().

◆ serialVersionUID

final long frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.serialVersionUID = 5205003208535233191L
staticprivate

Used for serialization.

◆ startCounter

final String frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.startCounter = "10000"
staticprivate

Initial value of the counter.

Referenced by decrypt(), and resetCounter().

◆ TEN

final FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.TEN = new FakeEncryptedInteger("10")
staticprivate

CONSTANT 10.

Referenced by FakeCryptoScheme(), and partialDecrypt().


The documentation for this class was generated from the following file: