Packages

class SigSerializer extends AnyRef

Contains implementation of signature (aka proof) serialization.

See also

toProofBytes, parseAndComputeChallenges

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SigSerializer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SigSerializer()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final val EvaluatePolynomial: OperationCostInfo[PerItemCost]

    Represents cost of: 1) evaluating a polynomial 2) obtaining GF2_192 instance 3) converting it to array of bytes

  5. final val ParseChallenge_ProveDHT: OperationCostInfo[FixedCost]

    Represents cost of parsing UncheckedDiffieHellmanTuple node from proof bytes.

  6. final val ParseChallenge_ProveDlog: OperationCostInfo[FixedCost]

    Represents cost of parsing UncheckedSchnorr node from proof bytes.

  7. final val ParsePolynomial: OperationCostInfo[PerItemCost]

    Represents cost of parsing GF2_192_Poly from proof bytes.

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. val hashSize: Int

    A size of challenge in Sigma protocols, in bits.

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val order: Int

    Number of bytes to represent any group element as byte array

  21. 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 is null, 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.

  22. 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 is null, then profiling is turned-off and has no effect on the execution.

    returns

    An instance of UncheckedTree i.e. either NoProof or UncheckedSigmaTree

  23. def readBytesChecked(r: SigmaByteReader, numRequestedBytes: Int, onError: (String) ⇒ Unit): Array[Byte]

    Helper method to read requested or remaining bytes from the reader.

  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. 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.

  26. 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)

  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  31. def warn(msg: String): Unit

    Log warning message using this class's logger.

Inherited from AnyRef

Inherited from Any

Ungrouped