Object

sigmastate.crypto

Platform

Related Doc: package crypto

Permalink

object Platform

JVM specific implementation of crypto methods

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

Type Members

  1. implicit final class BcDlogGroupOps extends AnyVal

    Permalink

    This JVM specific methods are used in Ergo node which won't be JS cross-compiled.

  2. case class Curve(value: ECCurve) extends Product with Serializable

    Permalink

    Wrapper for curve descriptor.

    Wrapper for curve descriptor. Serves as the concrete implementation of the sigmastate.crypto.Curve type in JVM.

  3. case class ECFieldElem(value: ECFieldElement) extends Product with Serializable

    Permalink

    Wrapper for field element type.

  4. case class Ecp(value: ECPoint) extends Product with Serializable

    Permalink

    Wrapper for point type.

  5. implicit final class EcpOps extends AnyVal

    Permalink

    This JVM specific methods are used in Ergo node which won't be JS cross-compiled.

  6. type SecureRandom = java.security.SecureRandom

    Permalink

    Secure source of randomness on JVM.

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 def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createContext(): CryptoContext

    Permalink

    Create a new context for cryptographic operations.

  7. def createSecureRandom(): SecureRandom

    Permalink

    Create JVM specific source of secure randomness.

  8. def encodeFieldElem(p: ECFieldElem): Array[Byte]

    Permalink

    Returns byte representation of the given field element.

  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def exponentiatePoint(p: Ecp, n: BigInteger): Ecp

    Permalink

    Exponentiate a point.

    Exponentiate a point.

    p

    point to exponentiate

    n

    exponent

    returns

    p to the power of n (p^n) i.e. p + p + ... + p (n times)

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def generatePbkdf2Key(normalizedMnemonic: String, normalizedPass: String): Array[Byte]

    Permalink

    Generates PBKDF2 key from a mnemonic and passphrase using SHA512 digest.

    Generates PBKDF2 key from a mnemonic and passphrase using SHA512 digest. Seed generation based on bouncycastle implementation. See https://github.com/ergoplatform/ergo-appkit/issues/82

  14. def getASN1Encoding(p: Ecp, compressed: Boolean): Array[Byte]

    Permalink

    Byte representation of the given point.

    Byte representation of the given point.

    p

    point to encode

    compressed

    if true, generates a compressed point encoding

    See also

    CryptoFacade.getASN1Encoding

  15. def getAffineXCoord(p: Ecp): ECFieldElem

    Permalink

    Returns the affine x-coordinate after checking that this point is normalized.

    Returns the affine x-coordinate after checking that this point is normalized.

    returns

    The affine x-coordinate of this point

    Exceptions thrown

    IllegalStateException if the point is not normalized

  16. def getAffineYCoord(p: Ecp): ECFieldElem

    Permalink

    Returns the affine y-coordinate after checking that this point is normalized

    Returns the affine y-coordinate after checking that this point is normalized

    returns

    The affine y-coordinate of this point

    Exceptions thrown

    IllegalStateException if the point is not normalized

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getCurve(p: Ecp): Curve

    Permalink

    Description of elliptic curve of point p which belongs to the curve.

    Description of elliptic curve of point p which belongs to the curve.

    p

    the elliptic curve point

  19. def getXCoord(p: Ecp): ECFieldElem

    Permalink

    Returns the x-coordinate.

    Returns the x-coordinate.

    Caution: depending on the curve's coordinate system, this may not be the same value as in an affine coordinate system; use normalize() to get a point where the coordinates have their affine values, or use getAffineXCoord() if you expect the point to already have been normalized.

    returns

    the x-coordinate of this point

  20. def getYCoord(p: Ecp): ECFieldElem

    Permalink

    Returns the y-coordinate.

    Returns the y-coordinate.

    Caution: depending on the curve's coordinate system, this may not be the same value as in an affine coordinate system; use normalize() to get a point where the coordinates have their affine values, or use getAffineYCoord() if you expect the point to already have been normalized.

    returns

    the y-coordinate of this point

  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hashHmacSHA512(key: Array[Byte], data: Array[Byte]): Array[Byte]

    Permalink

    Computes HMAC-SHA512 hash of the given data using the specified key.

    Computes HMAC-SHA512 hash of the given data using the specified key.

    key

    the secret key used for hashing

    data

    the input data to be hashed

    returns

    a HMAC-SHA512 hash of the input data

  23. def isCorrectType[T <: SType](value: Any, tpe: T): Boolean

    Permalink

    Checks that the type of the value corresponds to the descriptor tpe.

    Checks that the type of the value corresponds to the descriptor tpe. If the value has complex structure only root type constructor is checked. NOTE, this is surface check with possible false positives, but it is ok when used in assertions, like assert(isCorrestType(...)), see ConstantNode.

  24. def isInfinityPoint(p: Ecp): Boolean

    Permalink

    Check if a point is infinity.

  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def multiplyPoints(p1: Ecp, p2: Ecp): Ecp

    Permalink

    Multiply two points.

    Multiply two points.

    p1

    first point

    p2

    second point

    returns

    group multiplication (p1 * p2)

  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def negatePoint(p: Ecp): Ecp

    Permalink

    Negates the given point by negating its y coordinate.

  29. def normalizeChars(chars: Array[Char]): String

    Permalink

    Normalize a sequence of char values.

    Normalize a sequence of char values. The sequence will be normalized according to the NFKD normalization form. Implementation that uses java.text.Normalizer. See https://www.unicode.org/reports/tr15/

  30. def normalizePoint(p: Ecp): Ecp

    Permalink

    Normalization ensures that any projective coordinate is 1, and therefore that the x, y coordinates reflect those of the equivalent point in an affine coordinate system.

    Normalization ensures that any projective coordinate is 1, and therefore that the x, y coordinates reflect those of the equivalent point in an affine coordinate system.

    returns

    a new ECPoint instance representing the same point, but with normalized coordinates

  31. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  33. def showPoint(p: Ecp): String

    Permalink

    Return simplified string representation of the point (used only for debugging)

  34. def signOf(p: ECFieldElem): Boolean

    Permalink

    Returns the value of bit 0 in BigInteger representation of this point.

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

    Permalink
    Definition Classes
    AnyRef
  36. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped