This JVM specific methods are used in Ergo node which won't be JS cross-compiled.
Wrapper for curve descriptor.
Wrapper for curve descriptor. Serves as the concrete implementation of the sigmastate.crypto.Curve type in JVM.
Wrapper for field element type.
Wrapper for point type.
This JVM specific methods are used in Ergo node which won't be JS cross-compiled.
Secure source of randomness on JVM.
Create a new context for cryptographic operations.
Create JVM specific source of secure randomness.
Returns byte representation of the given field element.
Exponentiate a point.
Exponentiate a point.
point to exponentiate
exponent
p to the power of n (p^n
) i.e.
p + p + ... + p (n times)
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
Byte representation of the given point.
Byte representation of the given point.
point to encode
if true, generates a compressed point encoding
Returns the affine x-coordinate after checking that this point is normalized.
Returns the affine x-coordinate after checking that this point is normalized.
The affine x-coordinate of this point
IllegalStateException
if the point is not normalized
Returns the affine y-coordinate after checking that this point is normalized
Returns the affine y-coordinate after checking that this point is normalized
The affine y-coordinate of this point
IllegalStateException
if the point is not normalized
Description of elliptic curve of point p
which belongs to the curve.
Description of elliptic curve of point p
which belongs to the curve.
the elliptic curve point
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.
the x-coordinate of this point
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.
the y-coordinate of this point
Computes HMAC-SHA512 hash of the given data using the specified key.
Computes HMAC-SHA512 hash of the given data using the specified key.
the secret key used for hashing
the input data to be hashed
a HMAC-SHA512 hash of the input data
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
.
Check if a point is infinity.
Multiply two points.
Multiply two points.
first point
second point
group multiplication (p1 * p2)
Negates the given point by negating its y coordinate.
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/
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.
a new ECPoint instance representing the same point, but with normalized coordinates
Return simplified string representation of the point (used only for debugging)
Returns the value of bit 0 in BigInteger representation of this point.
JVM specific implementation of crypto methods