class SigSerializer extends AnyRef
Contains implementation of signature (aka proof) serialization.
- See also
toProofBytes, parseAndComputeChallenges
- Alphabetic
- By Inheritance
- SigSerializer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SigSerializer()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
val
EvaluatePolynomial: OperationCostInfo[PerItemCost]
Represents cost of: 1) evaluating a polynomial 2) obtaining GF2_192 instance 3) converting it to array of bytes
-
final
val
ParseChallenge_ProveDHT: OperationCostInfo[FixedCost]
Represents cost of parsing UncheckedDiffieHellmanTuple node from proof bytes.
-
final
val
ParseChallenge_ProveDlog: OperationCostInfo[FixedCost]
Represents cost of parsing UncheckedSchnorr node from proof bytes.
-
final
val
ParsePolynomial: OperationCostInfo[PerItemCost]
Represents cost of parsing GF2_192_Poly from proof bytes.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
hashSize: Int
A size of challenge in Sigma protocols, in bits.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
order: Int
Number of bytes to represent any group element as byte array
-
def
parseAndComputeChallenges(exp: SigmaBoolean, r: SigmaByteReader, challengeOpt: Challenge = null)(implicit E: ErgoTreeEvaluator): UncheckedSigmaTree
Verifier Step 2: In a top-down traversal of the tree, obtain the challenges for the children of every non-leaf node by reading them from the proof or computing them.
Verifier Step 2: In a top-down traversal of the tree, obtain the challenges for the children of every non-leaf node by reading them from the proof or computing them. Verifier Step 3: For every leaf node, read the response z provided in the proof.
- exp
sigma proposition which defines the structure of bytes from the reader
- r
reader to extract challenges from
- challengeOpt
if non-empty, then the challenge has been computed for this node by its parent; else it needs to be read from the proof (via reader)
- E
optional evaluator (can be null) which is used for profiling of operations. When
E
isnull
, then profiling is turned-off and has no effect on the execution.- returns
An instance of UncheckedSigmaTree HOTSPOT: don't beautify the code Note, null
is used instead of Option to avoid allocations.
-
def
parseAndComputeChallenges(exp: SigmaBoolean, proof: Array[Byte])(implicit E: ErgoTreeEvaluator): UncheckedTree
Verifier Step 2: In a top-down traversal of the tree, obtain the challenges for the children of every non-leaf node by reading them from the proof or computing them.
Verifier Step 2: In a top-down traversal of the tree, obtain the challenges for the children of every non-leaf node by reading them from the proof or computing them. Verifier Step 3: For every leaf node, read the response z provided in the proof.
- exp
sigma proposition which defines the structure of bytes from the reader
- proof
proof to extract challenges from
- E
optional evaluator (can be null) which is used for profiling of operations. When
E
isnull
, then profiling is turned-off and has no effect on the execution.- returns
An instance of UncheckedTree i.e. either NoProof or UncheckedSigmaTree
-
def
readBytesChecked(r: SigmaByteReader, numRequestedBytes: Int, onError: (String) ⇒ Unit): Array[Byte]
Helper method to read requested or remaining bytes from the reader.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toProofBytes(node: UncheckedSigmaTree, w: SigmaByteWriter, writeChallenge: Boolean): Unit
Recursively traverses the given node and serializes challenges and prover messages to the given writer.
Recursively traverses the given node and serializes challenges and prover messages to the given writer. Note, sigma propositions and commitments are not serialized.
- node
subtree to traverse
- w
writer to put the bytes
- writeChallenge
if true, than node.challenge is serialized, and omitted otherwise.
-
def
toProofBytes(tree: UncheckedTree): Array[Byte]
Recursively traverses the given node and serializes challenges and prover messages to the given writer.
Recursively traverses the given node and serializes challenges and prover messages to the given writer. Note, sigma propositions and commitments are not serialized.
- tree
tree to traverse and serialize
- returns
the proof bytes containing all the serialized challenges and prover messages (aka
z
values)
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
warn(msg: String): Unit
Log warning message using this class's logger.