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. sealed abstract class BIP39Seed extends NetworkElement with MaskedToString
  8. sealed abstract class BaseECKey extends NetworkElement

    Created by chris on 2/16/16.

  9. sealed abstract class BaseTxSigComponent extends TxSigComponent

    The TxSigComponent used to evaluate the the original Satoshi transaction digest algorithm.

    The TxSigComponent used to evaluate the the original Satoshi transaction digest algorithm. Basically this is every spk that is not a WitnessScriptPubKey EXCEPT in the case of a P2SH(witness script) ScriptPubKey

  10. case class ChainCode(bytes: ByteVector) extends NetworkElement with Product with Serializable
  11. 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

  12. sealed abstract class DERSignatureUtil extends AnyRef

    Created by chris on 3/23/16.

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

    Represents the result of SHA256(SHA256())

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

    The big endian version of DoubleSha256Digest

  15. sealed abstract class ECDigitalSignature extends BitcoinSLogger

    Created by chris on 2/26/16.

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

    Created by chris on 2/16/16.

  17. sealed abstract class ECPublicKey extends BaseECKey

    Created by chris on 2/16/16.

  18. sealed abstract class ExtKey extends NetworkElement

    Represents an extended key as defined by BIP32 https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

  19. sealed abstract class ExtKeyPrivVersion extends ExtKeyVersion
  20. sealed abstract class ExtKeyPubVersion extends ExtKeyVersion
  21. sealed abstract class ExtKeyVersion extends NetworkElement
  22. sealed abstract class ExtPrivateKey extends ExtKey with ExtSign with MaskedToString
  23. sealed abstract class ExtPublicKey extends ExtKey
  24. trait ExtSign extends Sign

    A signing interface for ExtKey

  25. sealed trait HashDigest extends NetworkElement
  26. sealed abstract class MnemonicCode extends MaskedToString

    A mnemonic code conforming to BIP39.

    A mnemonic code conforming to BIP39. BIP39 mnemonic codes consist of a varying number of words (most often English, possible with other languages as well) that can be used to generate an ExtPrivateKey which again can be the root of a BIP32 HD wallet.

  27. sealed abstract class P2SHTxSigComponent extends BaseTxSigComponent
  28. sealed trait RipeMd160Digest extends HashDigest

    Represents the result of RIPEMD160()

  29. sealed trait RipeMd160DigestBE extends HashDigest

    Represents the result of RIPEMD160() big endian

  30. sealed trait Sha1Digest extends HashDigest

    Represents the result of SHA1()

  31. sealed trait Sha1DigestBE extends HashDigest
  32. sealed trait Sha256Digest extends HashDigest

    Represents the result of SHA256()

  33. sealed trait Sha256DigestBE extends HashDigest

    Represents the result of SHA256()

  34. sealed trait Sha256Hash160Digest extends HashDigest

    Represents the result of RIPEMD160(SHA256())

  35. sealed trait Sha256Hash160DigestBE extends HashDigest

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

  36. trait Sign extends AnyRef

    This is meant to be an abstraction for a org.bitcoins.core.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.core.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]

  37. sealed trait SignatureValidationError extends TransactionSignatureCheckerResult

    Indicates that there was an error when evaluating the signature of a transaction

  38. trait TransactionSignatureChecker extends BitcoinSLogger

    Created by chris on 2/16/16.

    Created by chris on 2/16/16. Responsible for checking digital signatures on inputs against their respective public keys

  39. sealed trait TransactionSignatureCheckerResult extends AnyRef

    The result type returned by checking a signature

  40. sealed abstract class TransactionSignatureCreator extends AnyRef

    Created by chris on 7/21/16.

  41. sealed abstract class TransactionSignatureSerializer extends AnyRef

    Created by chris on 2/16/16.

    Created by chris on 2/16/16. Wrapper that serializes like Transaction, but with the modifications required for the signature hash done https://github.com/bitcoin/bitcoin/blob/93c85d458ac3e2c496c1a053e1f5925f55e29100/src/script/interpreter.cpp#L1016-L1105 bitcoinj version of this https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/core/Transaction.java#L924-L1008

  42. sealed abstract class TxSigComponent extends AnyRef

    Created by chris on 4/6/16.

    Created by chris on 4/6/16. Represents a transaction whose input is being checked against the spending conditions of a ScriptPubKey

  43. sealed trait WitnessTxSigComponent extends TxSigComponent

    The TxSigComponent used to represent all the components necessarily for BIP143.

    The TxSigComponent used to represent all the components necessarily for BIP143. Examples of these ScriptPubKey's are P2WPKHWitnessSPKV0, P2WSHWitnessSPKV0, and P2SH(witness script)

  44. sealed abstract class WitnessTxSigComponentP2SH extends P2SHTxSigComponent with WitnessTxSigComponent

    This represents checking the WitnessTransaction against a P2SH(P2WSH) or P2SH(P2WPKH) scriptPubKey

  45. sealed abstract class WitnessTxSigComponentRaw extends TxSigComponent with WitnessTxSigComponent

    This represents checking the WitnessTransaction against a P2WPKHWitnessSPKV0 or a P2WSHWitnessSPKV0

  46. sealed abstract class WitnessTxSigComponentRebuilt extends TxSigComponent

    This represents a 'rebuilt' ScriptPubKey that was constructed from WitnessScriptPubKey After the ScriptPubKey is rebuilt, we need to use that rebuilt scriptpubkey to evaluate the ScriptSignature See BIP141 for more info on rebuilding P2WSH and P2WPKH scriptpubkeys

Value Members

  1. object AesCrypt

    Provides functionality for encrypting and decrypting with AES

  2. object AesEncryptedData extends Serializable
  3. object AesException
  4. object AesIV extends Serializable
  5. object AesKey extends Serializable
  6. object AesPassword extends Serializable
  7. object AesSalt extends Factory[AesSalt] with Serializable
  8. object BIP39Seed extends Factory[BIP39Seed]

    See also

    BIP32

  9. object BaseTxSigComponent
  10. object ChainCode extends Factory[ChainCode] with Serializable
  11. object CryptoParams extends CryptoParams
  12. object DERSignatureUtil extends DERSignatureUtil
  13. object DoubleSha256Digest extends Factory[DoubleSha256Digest] with Serializable
  14. object DoubleSha256DigestBE extends Factory[DoubleSha256DigestBE] with Serializable
  15. 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

  16. object ECDigitalSignature extends Factory[ECDigitalSignature]
  17. object ECPrivateKey extends Factory[ECPrivateKey]
  18. object ECPublicKey extends Factory[ECPublicKey]
  19. object EmptyDigitalSignature extends ECDigitalSignature with Product with Serializable
  20. object ExtKey extends Factory[ExtKey]
  21. object ExtKeyVersion

    See also

    SLIP132 for a list of registered HD version bytes

  22. object ExtPrivateKey extends Factory[ExtPrivateKey]
  23. object ExtPublicKey extends Factory[ExtPublicKey]
  24. object MnemonicCode

    See also

    BIP39

  25. object P2SHTxSigComponent
  26. object PBKDF2

  27. object RipeMd160Digest extends Factory[RipeMd160Digest]
  28. object RipeMd160DigestBE extends Factory[RipeMd160DigestBE]
  29. object Sha1Digest extends Factory[Sha1Digest]
  30. object Sha1DigestBE extends Factory[Sha1DigestBE]
  31. object Sha256Digest extends Factory[Sha256Digest]
  32. object Sha256DigestBE extends Factory[Sha256DigestBE]
  33. object Sha256Hash160Digest extends Factory[Sha256Hash160Digest]
  34. object Sha256Hash160DigestBE extends Factory[Sha256Hash160DigestBE]
  35. object Sign
  36. object SignatureValidationErrorHashType extends SignatureValidationError with Product with Serializable

    Fails the script if the hash type is not defined on a digital signature

  37. object SignatureValidationErrorHighSValue extends SignatureValidationError with Product with Serializable

    This indicates that the digital signature did not have a Low S value as per BIP62 https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#Low_S_values_in_signatures

  38. object SignatureValidationErrorIncorrectSignatures extends SignatureValidationError with Product with Serializable

    Signature validation failed because there were not enough correct signatures for the transaction we were given

  39. object SignatureValidationErrorNotStrictDerEncoding extends SignatureValidationError with Product with Serializable

    Signature validation failed because a signature was not encoded per the BIP66 rules https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki#specification

  40. object SignatureValidationErrorNullFail extends SignatureValidationError with Product with Serializable

    Fails the script if a an invalid signature is not an empty byte vector See BIP146 https://github.com/bitcoin/bips/blob/master/bip-0146.mediawiki#nullfail

  41. object SignatureValidationErrorPubKeyEncoding extends SignatureValidationError with Product with Serializable

    This indicates that the public key was not encoded correctly according to this function https://github.com/bitcoin/bitcoin/blob/528472111b4965b1a99c4bcf08ac5ec93d87f10f/src/script/interpreter.cpp#L214-L223

  42. object SignatureValidationErrorSignatureCount extends SignatureValidationError with Product with Serializable

    This indicates that the signature validation failed because we have more signatures left to check than public keys remaining to check them against see https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L914-915

  43. object SignatureValidationErrorWitnessPubKeyType extends SignatureValidationError with Product with Serializable

    Fails the script if the given public key was not compressed and the org.bitcoins.core.script.flag.ScriptVerifyWitnessPubKeyType flag was set

  44. object SignatureValidationSuccess extends TransactionSignatureCheckerResult with Product with Serializable

    Represents the case that the signatures checked inside of the transaction were all validly encoded as per the script verify flag & that the signatures were valid when checked against the public keys

  45. object TransactionSignatureChecker extends TransactionSignatureChecker
  46. object TransactionSignatureCreator extends TransactionSignatureCreator
  47. object TransactionSignatureSerializer extends TransactionSignatureSerializer
  48. object WitnessTxSigComponent
  49. object WitnessTxSigComponentP2SH
  50. object WitnessTxSigComponentRaw
  51. object WitnessTxSigComponentRebuilt

Ungrouped