Packages

package crypto

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait AesDecryptionException extends Exception
  2. final case class AesEncryptedData(cipherText: ByteVector, iv: AesIV) extends Product with Serializable

    Represents a encrypted cipher text with it's accompanying initialization vector (IV).

    Represents a encrypted cipher text with it's accompanying initialization vector (IV). Both the cipher text and the IV is needed to decrypt the cipher text.

  3. final case class AesIV extends AnyVal with NetworkElement with Product with Serializable

    Represents an initialization vector (IV) used in AES encryption.

  4. final case class AesKey extends MaskedToString with NetworkElement with Product with Serializable

    Represents a encryption/decryption key.

    Represents a encryption/decryption key. AES keys can be converted to SecretKeys, and have certain length requirements.

  5. final case class AesPassword extends MaskedToString with Product with Serializable
  6. final case class AesSalt(bytes: ByteVector) extends AnyVal with Product with Serializable

    Represents a salt used to derive a AES key from a human-readable passphrase.

  7. trait AsyncSign extends AnyRef

    This is meant to be an abstraction for a org.bitcoins.crypto.ECPrivateKey, sometimes we will not have direct access to a private key in memory -- for instance if that key is on a hardware device -- so we need to create an abstraction of the signing process.

    This is meant to be an abstraction for a org.bitcoins.crypto.ECPrivateKey, sometimes we will not have direct access to a private key in memory -- for instance if that key is on a hardware device -- so we need to create an abstraction of the signing process. Fundamentally a private key takes in a scodec.bits.ByteVector and returns a ECDigitalSignature That is what this abstraction is meant to represent. If you have a ECPrivateKey in your application, you can get it's Sign type by doing this:

    val key = ECPrivateKey() val sign: scodec.bits.ByteVector => Future[ECDigitalSignature] = key.signFunction

    If you have a hardware wallet, you will need to implement the protocol to send a message to the hardware device. The type signature of the function you implement must be scodec.bits.ByteVector => Future[ECDigitalSignature]

  8. sealed abstract class BaseECKey extends NetworkElement

    Created by chris on 2/16/16.

  9. trait BouncycastleCryptoRuntime extends CryptoRuntime

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

  10. trait CryptoBytesUtil extends AnyRef

    Created by chris on 2/26/16.

  11. sealed trait CryptoContext extends AnyRef
  12. trait CryptoNumberUtil extends AnyRef
  13. sealed abstract class CryptoParams extends AnyRef

    Created by chris on 3/29/16.

    Created by chris on 3/29/16. This trait represents all of the default parameters for our elliptic curve

  14. trait CryptoRuntime extends AnyRef

    Trait that should be extended by specific runtimes like javascript or the JVM to support crypto functions needed for bitcoin-s

  15. sealed trait CryptoRuntimeFactory extends AnyRef
    Attributes
    protected
  16. trait CryptoUtil extends CryptoRuntime

    Utility cryptographic functions This is a proxy for the underlying implementation of CryptoRuntime such as LibSecp256k1CryptoRuntime.

    Utility cryptographic functions This is a proxy for the underlying implementation of CryptoRuntime such as LibSecp256k1CryptoRuntime.

    This is necessary so that the core module doesn't need to be refactored to add support for multiple platforms, it can keep referencing CryptoUtil

  17. sealed abstract class DERSignatureUtil extends AnyRef

    Created by chris on 3/23/16.

  18. case class DoubleSha256Digest(bytes: ByteVector) extends HashDigest with Product with Serializable

    Represents the result of SHA256(SHA256())

  19. case class DoubleSha256DigestBE(bytes: ByteVector) extends HashDigest with Product with Serializable

    The big endian version of DoubleSha256Digest

  20. case class ECAdaptorSignature(bytes: ByteVector) extends NetworkElement with Product with Serializable
  21. sealed abstract class ECDigitalSignature extends NetworkElement

    Created by chris on 2/26/16.

  22. sealed trait ECPoint extends AnyRef

    Represents a point on secp256k1 elliptic curve.

  23. case class ECPointImpl(x: FieldElement, y: FieldElement) extends ECPoint with Product with Serializable

    A point on an elliptic curve.

  24. sealed abstract class ECPrivateKey extends BaseECKey with Sign with MaskedToString

    Created by chris on 2/16/16.

  25. sealed abstract class ECPublicKey extends BaseECKey

    Created by chris on 2/16/16.

  26. abstract class Factory[+T] extends AnyRef

    Created by chris on 2/26/16.

    Created by chris on 2/26/16. Trait to implement ubiquitous factory functions across our codebase

  27. case class FieldElement(bytes: ByteVector) extends NetworkElement with Product with Serializable

    Represents integers modulo the secp256k1 field size: pow(2,256) - 0x1000003D1.

    Represents integers modulo the secp256k1 field size: pow(2,256) - 0x1000003D1.

    Supports arithmetic for these elements including +, -, *, and inverses. Supports 32 byte serialization as is needed for ECPrivateKeys.

  28. class HMacDSAKCalculatorWithEntropy extends DSAKCalculator

    Entirely copied from HMacDSAKCalculator with an added entropy parameter as well as two lines added adding the entropy to the hash.

    Entirely copied from HMacDSAKCalculator with an added entropy parameter as well as two lines added adding the entropy to the hash.

    For a reference in secp256k1, see nonce_function_rfc6979 in secp256k1.c For a description of the altered part, see RFC 6979 section 3.2d here https://tools.ietf.org/html/rfc6979#section-3.2

    The added lines are marked below with comments.

  29. sealed trait HashDigest extends NetworkElement
  30. trait LibSecp256k1CryptoRuntime extends CryptoRuntime

    This is an implementation of CryptoRuntime that defaults to libsecp256k1 (https://github.com/bitcoin-core/secp256k1) when possible.

    This is an implementation of CryptoRuntime that defaults to libsecp256k1 (https://github.com/bitcoin-core/secp256k1) when possible. All unsupported functions are delegated to BouncycastleCryptoRuntime.

  31. trait MaskedToString extends AnyRef

    Meant to provide a simple trait that masks the default to string for sensitive classes

  32. trait NetworkElement extends Any

    Created by chris on 1/14/16.

    Created by chris on 1/14/16. This represents a element that can be serialized to be sent over the network

  33. sealed trait RipeMd160Digest extends HashDigest

    Represents the result of RIPEMD160()

  34. sealed trait RipeMd160DigestBE extends HashDigest

    Represents the result of RIPEMD160() big endian

  35. case class SchnorrDigitalSignature(rx: SchnorrNonce, sig: FieldElement) extends NetworkElement with Product with Serializable
  36. case class SchnorrNonce(bytes: ByteVector) extends NetworkElement with Product with Serializable
  37. case class SchnorrPublicKey(bytes: ByteVector) extends NetworkElement with Product with Serializable
  38. sealed trait Sha1Digest extends HashDigest

    Represents the result of SHA1()

  39. sealed trait Sha1DigestBE extends HashDigest
  40. sealed trait Sha256Digest extends HashDigest

    Represents the result of SHA256()

  41. sealed trait Sha256DigestBE extends HashDigest

    Represents the result of SHA256()

  42. sealed trait Sha256Hash160Digest extends HashDigest

    Represents the result of RIPEMD160(SHA256())

  43. sealed trait Sha256Hash160DigestBE extends HashDigest

    Represents the result of RIPEMD160(SHA256()) big endian

  44. trait Sign extends AsyncSign
  45. case class SipHashKey(bytes: ByteVector) extends NetworkElement with Product with Serializable
  46. trait StringFactory[+T] extends AnyRef

    A common factory trait that can be re-used to deserialize a string to a type t

Value Members

  1. object AdaptorUtil
  2. object AesCrypt

    Provides functionality for encrypting and decrypting with AES

  3. object AesEncryptedData extends Serializable
  4. object AesException
  5. object AesIV extends Serializable
  6. object AesKey extends Serializable
  7. object AesPassword extends StringFactory[AesPassword] with Serializable
  8. object AesSalt extends Factory[AesSalt] with Serializable
  9. object AsyncSign
  10. object BouncyCastleCryptoParams
  11. object BouncyCastleUtil
  12. object BouncycastleCryptoRuntime extends BouncycastleCryptoRuntime
  13. object CryptoBytesUtil extends CryptoBytesUtil
  14. object CryptoContext
  15. object CryptoNumberUtil extends CryptoNumberUtil
  16. object CryptoParams extends CryptoParams
  17. object CryptoRuntimeFactory extends CryptoRuntimeFactory
    Attributes
    protected
  18. object CryptoUtil extends CryptoUtil
  19. object DERSignatureUtil extends DERSignatureUtil
  20. object DLEQUtil
  21. object DoubleSha256Digest extends Factory[DoubleSha256Digest] with Serializable
  22. object DoubleSha256DigestBE extends Factory[DoubleSha256DigestBE] with Serializable
  23. case object DummyECDigitalSignature extends ECDigitalSignature with Product with Serializable

    The point of this case object is to help with fee estimation an average ECDigitalSignature is 72 bytes in size Technically this number can vary, 72 bytes is the most likely though according to https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm

  24. object ECAdaptorSignature extends Factory[ECAdaptorSignature] with Serializable
  25. object ECDigitalSignature extends Factory[ECDigitalSignature]
  26. object ECPoint
  27. case object ECPointInfinity extends ECPoint with Product with Serializable

    The infinity point.

  28. object ECPrivateKey extends Factory[ECPrivateKey]
  29. object ECPublicKey extends Factory[ECPublicKey]
  30. case object EmptyDigitalSignature extends ECDigitalSignature with Product with Serializable
  31. object FieldElement extends Factory[FieldElement] with Serializable
  32. object LibSecp256k1CryptoRuntime extends LibSecp256k1CryptoRuntime
  33. case object LowRDummyECDigitalSignature extends ECDigitalSignature with Product with Serializable

    The point of this case object is to help with fee estimation when using low r signing.

    The point of this case object is to help with fee estimation when using low r signing. Technically this number can vary, 71 bytes is the most likely when using low r signing

  34. object PBKDF2

  35. object RipeMd160Digest extends Factory[RipeMd160Digest]
  36. object RipeMd160DigestBE extends Factory[RipeMd160DigestBE]
  37. object SchnorrDigitalSignature extends Factory[SchnorrDigitalSignature] with Serializable
  38. object SchnorrNonce extends Factory[SchnorrNonce] with Serializable
  39. object SchnorrPublicKey extends Factory[SchnorrPublicKey] with Serializable
  40. object Sha1Digest extends Factory[Sha1Digest]
  41. object Sha1DigestBE extends Factory[Sha1DigestBE]
  42. object Sha256Digest extends Factory[Sha256Digest]
  43. object Sha256DigestBE extends Factory[Sha256DigestBE]
  44. object Sha256Hash160Digest extends Factory[Sha256Hash160Digest]
  45. object Sha256Hash160DigestBE extends Factory[Sha256Hash160DigestBE]
  46. object Sign

Ungrouped