|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcommon.Parameters
public class Parameters
Provides tools for handling the parameters used for the
encryption scheme.
The following parameters are controlled:
p in the encryption scheme.b in the encryption scheme.q in the encryption scheme.s1 in the encryption scheme.r in the encryption scheme.Record.getNumFields() returns the number of fields contained in a record, which includes
both encrypted and plain-text fields, so Record.getNumFields() is equal to 2*numFields
(see Record).
| Constructor Summary | |
|---|---|
Parameters()
|
|
| Method Summary | |
|---|---|
static java.math.BigInteger |
getB()
Returns secret b. |
static int |
getMaxSizeD()
Returns the maximum domain size over all the countable fields. |
static java.math.BigInteger |
getN()
Returns upperbound of the number of records. |
static int |
getNumFields()
Returns number of countable fields. |
static java.math.BigInteger |
getP()
Returns secret prime p. |
static java.math.BigInteger |
getQ()
Returns prime q. |
static int |
getS1()
Returns security parameter s1. |
static int |
getS2()
Returns security parameter s2. |
static int |
getSizeD(int field)
Returns domain size of a field. |
static int |
getTotalSizeD()
Returns the total domain size which is the product of domain size of all fields. |
static void |
main(java.lang.String[] args)
|
static void |
readConfig(java.io.InputStream is)
Reads parameters from an input stream. |
static void |
readConfig(java.lang.String filename)
Reads parameters from a configuration file. |
static void |
setB(java.math.BigInteger newb)
Sets the new value for b. |
static void |
setP(java.math.BigInteger newp)
Sets new secret prime p. |
static void |
setQ(java.math.BigInteger newq)
Sets new prime q. |
static void |
writeConfig(java.io.OutputStream os)
Writes parameters to an output stream. |
static void |
writeConfig(java.lang.String filename)
Writes parameters to a configuration file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parameters()
| Method Detail |
|---|
public static java.math.BigInteger getP()
p.
p.public static void setP(java.math.BigInteger newp)
p.
newp - new secret prime p.public static java.math.BigInteger getB()
b.
b.public static void setB(java.math.BigInteger newb)
b.
newb - new value for b.public static java.math.BigInteger getQ()
q.
q.public static void setQ(java.math.BigInteger newq)
q.
newq - new prime q.public static java.math.BigInteger getN()
public static int getS1()
s1.
s1.public static int getS2()
s2.
s2.public static int getSizeD(int field)
field - given field.
public static int getMaxSizeD()
public static int getNumFields()
public static int getTotalSizeD()
public static void writeConfig(java.lang.String filename)
filename - name of the configuration file.public static void writeConfig(java.io.OutputStream os)
os - output stream.public static void readConfig(java.lang.String filename)
filename - name of the configuration file.public static void readConfig(java.io.InputStream is)
is - input stream.public static void main(java.lang.String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||