|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpaillierp.zkp.ZKP
public abstract class ZKP
An abstract class for non-interactive Zero Knowledge Proofs. This class gives the simple necessities for creating a Zero Knowledge Proof which uses the hash of values as inputs.
Field Summary | |
---|---|
protected java.security.MessageDigest |
hashFunction
Instance of a hash function. |
private static long |
serialVersionUID
This Serial ID |
Constructor Summary | |
---|---|
ZKP()
Default constructor. |
|
ZKP(java.lang.String hashFunctionName)
Creates a ZKP with the specified function as the hash function. |
Method Summary | |
---|---|
abstract java.math.BigInteger |
getValue()
|
protected java.math.BigInteger |
hash(byte[]... byteArrays)
Creates a hash of the given array of bytes |
abstract byte[] |
toByteArray()
|
abstract byte[] |
toByteArrayNoKey()
|
abstract boolean |
verify()
Verifies that the rehash of the particular variables is indeed the specified hash. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected java.security.MessageDigest hashFunction
Constructor Detail |
---|
public ZKP()
public ZKP(java.lang.String hashFunctionName)
hashFunctionName
- Name of the hash functionMethod Detail |
---|
protected java.math.BigInteger hash(byte[]... byteArrays)
byteArrays
- original array of bytes
public abstract boolean verify()
public abstract byte[] toByteArray()
public abstract byte[] toByteArrayNoKey()
public abstract java.math.BigInteger getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |