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 BaseECKey extends NetworkElement

    Created by chris on 2/16/16.

  8. trait CryptoBytesUtil extends AnyRef

    Created by chris on 2/26/16.

  9. sealed trait CryptoContext extends AnyRef
  10. 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

  11. trait CryptoUtil extends AnyRef

    Utility cryptographic functions

  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. case class ECAdaptorSignature(bytes: ByteVector) extends NetworkElement with Product with Serializable
  16. sealed abstract class ECDigitalSignature extends NetworkElement

    Created by chris on 2/26/16.

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

    Created by chris on 2/16/16.

  18. sealed abstract class ECPublicKey extends BaseECKey

    Created by chris on 2/16/16.

  19. 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

  20. 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.

  21. 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.

  22. sealed trait HashDigest extends NetworkElement
  23. trait MaskedToString extends AnyRef

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

  24. 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

  25. sealed trait RipeMd160Digest extends HashDigest

    Represents the result of RIPEMD160()

  26. sealed trait RipeMd160DigestBE extends HashDigest

    Represents the result of RIPEMD160() big endian

  27. case class SchnorrDigitalSignature(rx: SchnorrNonce, sig: FieldElement) extends NetworkElement with Product with Serializable
  28. case class SchnorrNonce(bytes: ByteVector) extends NetworkElement with Product with Serializable
  29. case class SchnorrPublicKey(bytes: ByteVector) extends NetworkElement with Product with Serializable
  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.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]

  37. 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 AdaptorStuff
  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 BouncyCastleUtil
  10. object CryptoBytesUtil extends CryptoBytesUtil
  11. object CryptoContext
  12. object CryptoParams extends CryptoParams
  13. object CryptoUtil extends CryptoUtil
  14. object DERSignatureUtil extends DERSignatureUtil
  15. object DLEQStuff
  16. object DoubleSha256Digest extends Factory[DoubleSha256Digest] with Serializable
  17. object DoubleSha256DigestBE extends Factory[DoubleSha256DigestBE] with Serializable
  18. 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

  19. object ECAdaptorSignature extends Factory[ECAdaptorSignature] with Serializable
  20. object ECDigitalSignature extends Factory[ECDigitalSignature]
  21. object ECPrivateKey extends Factory[ECPrivateKey]
  22. object ECPublicKey extends Factory[ECPublicKey]
  23. case object EmptyDigitalSignature extends ECDigitalSignature with Product with Serializable
  24. object FieldElement extends Factory[FieldElement] with Serializable
  25. 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

  26. object PBKDF2

  27. object RipeMd160Digest extends Factory[RipeMd160Digest]
  28. object RipeMd160DigestBE extends Factory[RipeMd160DigestBE]
  29. object SchnorrDigitalSignature extends Factory[SchnorrDigitalSignature] with Serializable
  30. object SchnorrNonce extends Factory[SchnorrNonce] with Serializable
  31. object SchnorrPublicKey extends Factory[SchnorrPublicKey] with Serializable
  32. object Sha1Digest extends Factory[Sha1Digest]
  33. object Sha1DigestBE extends Factory[Sha1DigestBE]
  34. object Sha256Digest extends Factory[Sha256Digest]
  35. object Sha256DigestBE extends Factory[Sha256DigestBE]
  36. object Sha256Hash160Digest extends Factory[Sha256Hash160Digest]
  37. object Sha256Hash160DigestBE extends Factory[Sha256Hash160DigestBE]
  38. object Sign

Ungrouped