trait BouncycastleCryptoRuntime extends CryptoRuntime

This is an implementation of CryptoRuntime that defaults to Bouncy Castle (https://bouncycastle.org/) and java.security.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BouncycastleCryptoRuntime
  2. CryptoRuntime
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. def adaptorComplete(key: ECPrivateKey, adaptorSignature: ECAdaptorSignature): ECDigitalSignature
    Definition Classes
    CryptoRuntime
  5. def adaptorSign(key: ECPrivateKey, adaptorPoint: ECPublicKey, msg: ByteVector, auxRand: ByteVector): ECAdaptorSignature
    Definition Classes
    CryptoRuntime
  6. def adaptorVerify(adaptorSignature: ECAdaptorSignature, key: ECPublicKey, msg: ByteVector, adaptorPoint: ECPublicKey): Boolean
    Definition Classes
    CryptoRuntime
  7. def add(pk1: ECPublicKey, pk2: ECPublicKey): ECPublicKey

    Adds two public keys together, failing if the sum is 0x00 (the point at infinity).

    Adds two public keys together, failing if the sum is 0x00 (the point at infinity).

    Definition Classes
    BouncycastleCryptoRuntimeCryptoRuntime
  8. def add(point1: SecpPoint, point2: SecpPoint): SecpPoint

    Adds two SecpPoints together and correctly handles the point at infinity (0x00).

    Adds two SecpPoints together and correctly handles the point at infinity (0x00).

    Definition Classes
    CryptoRuntime
  9. def add(pk1: ByteVector, pk2: ECPrivateKey): ByteVector
    Definition Classes
    CryptoRuntime
  10. def add(pk1: ECPrivateKey, pk2: ECPrivateKey): ECPrivateKey
    Definition Classes
    CryptoRuntime
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def checkEntropy(bytes: ByteVector): Boolean
    Definition Classes
    CryptoRuntime
  13. def checkEntropy(bitVector: BitVector): Boolean

    Implements basic sanity tests for checking entropy like making sure it isn't all the same bytes, it isn't all 0x00...00 or it isn't all 0xffff...fff

    Implements basic sanity tests for checking entropy like making sure it isn't all the same bytes, it isn't all 0x00...00 or it isn't all 0xffff...fff

    Definition Classes
    CryptoRuntime
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. def combinePubKeys(pubKeys: Vector[ECPublicKey]): ECPublicKey

    Adds a Vector of public keys together, failing only if the total sum is 0x00 (the point at infinity), but still succeeding if sub-sums are 0x00.

    Adds a Vector of public keys together, failing only if the total sum is 0x00 (the point at infinity), but still succeeding if sub-sums are 0x00.

    Definition Classes
    CryptoRuntime
  16. val cryptoContext: CryptoContext
  17. def decodePoint(bytes: ByteVector): SecpPoint
  18. def decodePoint(pubKey: ECPublicKey): SecpPoint
    Definition Classes
    CryptoRuntime
  19. def decodeSignature(signature: ECDigitalSignature): (BigInt, BigInt)
    Definition Classes
    CryptoRuntime
  20. def decompressed[PK <: PublicKey](publicKey: PK): CryptoRuntime.decompressed.publicKey.type
    Definition Classes
    CryptoRuntime
  21. def decompressed[PK <: PublicKey](pubKeyBytes: ByteVector, fromBytes: (ByteVector) => PK): PK
    Definition Classes
    CryptoRuntime
  22. def decompressed(pubKeyBytes: ByteVector): ByteVector
    Definition Classes
    CryptoRuntime
  23. def doubleSHA256(bytes: ByteVector): DoubleSha256Digest

    Performs sha256(sha256(bytes)).

    Performs sha256(sha256(bytes)).

    Definition Classes
    CryptoRuntime
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  26. def extractAdaptorSecret(signature: ECDigitalSignature, adaptorSignature: ECAdaptorSignature, key: ECPublicKey): ECPrivateKey
    Definition Classes
    CryptoRuntime
  27. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  28. def freshPrivateKey: ECPrivateKey

    Cribbed from ECKeyPairGenerator::generateKeyPair

    Cribbed from ECKeyPairGenerator::generateKeyPair

    Definition Classes
    BouncycastleCryptoRuntimeCryptoRuntime
    See also

    https://github.com/bcgit/bc-java/blob/63b18eb973f5731e403f655ee81d6b8456f5b256/core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java#L39

  29. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. def hmac512(key: ByteVector, data: ByteVector): ByteVector
  32. def isDEREncoded(signature: ECDigitalSignature): Boolean
    Definition Classes
    CryptoRuntime
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. def isValidPubKey(pubKey: PublicKey): Boolean
    Definition Classes
    CryptoRuntime
  35. def isValidSignatureEncoding(signature: ECDigitalSignature): Boolean
    Definition Classes
    CryptoRuntime
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. def normalize(str: String): String
  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. def pbkdf2WithSha512(pass: ByteVector, salt: ByteVector, iterationCount: Int, derivedKeyLength: Int): ByteVector
  41. def pbkdf2WithSha512(pass: String, salt: String, iterationCount: Int, derivedKeyLength: Int): ByteVector
    Definition Classes
    CryptoRuntime
  42. def pubKeyTweakAdd(pubkey: ECPublicKey, privkey: ECPrivateKey): ECPublicKey
  43. def publicKey(privateKey: ECPrivateKey): ECPublicKey
  44. def randomBytes(n: Int): ByteVector
  45. def recoverPoint(x: BigInteger): (ECPoint, ECPoint)

    x

    x coordinate

    returns

    a tuple (p1, p2) where p1 and p2 are points on the curve and p1.x = p2.x = x p1.y is even, p2.y is odd

  46. def recoverPublicKey(signature: ECDigitalSignature, message: ByteVector): (ECPublicKey, ECPublicKey)

    Recover public keys from a signature and the message that was signed.

    Recover public keys from a signature and the message that was signed. This method will return 2 public keys, and the signature can be verified with both, but only one of them matches that private key that was used to generate the signature.

    signature

    signature

    message

    message that was signed

    returns

    a (pub1, pub2) tuple where pub1 and pub2 are candidates public keys. If you have the recovery id then use pub1 if the recovery id is even and pub2 if it is odd

    Definition Classes
    BouncycastleCryptoRuntimeCryptoRuntime
  47. def ripeMd160(bytes: ByteVector): RipeMd160Digest
  48. def schnorrComputeSigPoint(data: ByteVector, nonce: SchnorrNonce, pubKey: SchnorrPublicKey, compressed: Boolean): ECPublicKey
    Definition Classes
    CryptoRuntime
  49. def schnorrSign(dataToSign: ByteVector, privateKey: ECPrivateKey, auxRand: ByteVector): SchnorrDigitalSignature
    Definition Classes
    CryptoRuntime
  50. def schnorrSignWithNonce(dataToSign: ByteVector, privateKey: ECPrivateKey, nonceKey: ECPrivateKey): SchnorrDigitalSignature
    Definition Classes
    CryptoRuntime
  51. def schnorrVerify(data: ByteVector, schnorrPubKey: SchnorrPublicKey, signature: SchnorrDigitalSignature): Boolean
    Definition Classes
    CryptoRuntime
  52. def secKeyVerify(privateKeyBytes: ByteVector): Boolean
  53. def serializeForHash(str: String): ByteVector
    Definition Classes
    CryptoRuntime
  54. def sha1(bytes: ByteVector): Sha1Digest
  55. def sha256(bytes: ByteVector): Sha256Digest
  56. def sha256(bitVector: BitVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  57. def sha256(str: String): Sha256Digest
    Definition Classes
    CryptoRuntime
  58. def sha256DLCAnnouncement(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  59. def sha256DLCAttestation(str: String): Sha256Digest
    Definition Classes
    CryptoRuntime
  60. def sha256DLCAttestation(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  61. def sha256DLEQ(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  62. def sha256ECDSAAdaptorAux(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  63. def sha256ECDSAAdaptorNonce(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  64. def sha256Hash160(bytes: ByteVector): Sha256Hash160Digest
  65. def sha256SchnorrAuxRand(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  66. def sha256SchnorrChallenge(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  67. def sha256SchnorrNonce(bytes: ByteVector): Sha256Digest
    Definition Classes
    CryptoRuntime
  68. def sign(privateKey: ECPrivateKey, dataToSign: ByteVector): ECDigitalSignature
  69. def signWithEntropy(privateKey: ECPrivateKey, bytes: ByteVector, entropy: ByteVector): ECDigitalSignature
  70. def sipHash(item: ByteVector, key: SipHashKey): Long

    https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki#hashing-data-objects

    https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki#hashing-data-objects

    Definition Classes
    BouncycastleCryptoRuntimeCryptoRuntime
  71. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  72. def taggedSha256(bytes: ByteVector, tag: String): Sha256Digest
    Definition Classes
    CryptoRuntime
  73. def toPublicKey(privateKey: ECPrivateKey): ECPublicKey

    Converts a private key -> public key

    Converts a private key -> public key

    privateKey

    the private key we want the corresponding public key for

    Definition Classes
    BouncycastleCryptoRuntimeCryptoRuntime
  74. def toString(): String
    Definition Classes
    AnyRef → Any
  75. def tweakMultiply(publicKey: ECPublicKey, tweak: FieldElement): ECPublicKey
  76. def verify(publicKey: PublicKey, data: ByteVector, signature: ECDigitalSignature): Boolean
  77. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  78. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  79. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from CryptoRuntime

Inherited from AnyRef

Inherited from Any

Ungrouped