Object

sigmastate

SigSerializer

Related Doc: package sigmastate

Permalink

object SigSerializer extends LazyLogging

Contains implementation of signature (aka proof) serialization.

See also

toProofBytes, parseAndComputeChallenges

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final val EvaluatePolynomial: OperationCostInfo[PerItemCost]

    Permalink

    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]

    Permalink

    Represents cost of parsing UncheckedDiffieHellmanTuple node from proof bytes.

  6. final val ParseChallenge_ProveDlog: OperationCostInfo[FixedCost]

    Permalink

    Represents cost of parsing UncheckedSchnorr node from proof bytes.

  7. final val ParsePolynomial: OperationCostInfo[PerItemCost]

    Permalink

    Represents cost of parsing GF2_192_Poly from proof bytes.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. val hashSize: Int

    Permalink

    A size of challenge in Sigma protocols, in bits.

  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. val order: Int

    Permalink

    Number of bytes to represent any group element as byte array

  22. def parseAndComputeChallenges(exp: SigmaBoolean, r: SigmaByteReader, challengeOpt: Challenge = null)(implicit E: ErgoTreeEvaluator): UncheckedSigmaTree

    Permalink

    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.

  23. def parseAndComputeChallenges(exp: SigmaBoolean, proof: Array[Byte])(implicit E: ErgoTreeEvaluator): UncheckedTree

    Permalink

    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

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

    Permalink

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

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toProofBytes(node: UncheckedSigmaTree, w: SigmaByteWriter, writeChallenge: Boolean): Unit

    Permalink

    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.

  27. def toProofBytes(tree: UncheckedTree): Array[Byte]

    Permalink

    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)

  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def warn(msg: String): Unit

    Permalink

    Log warning message using this class's logger.

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped