object DERSignatureUtil extends DERSignatureUtil
- Alphabetic
- By Inheritance
- DERSignatureUtil
- DERSignatureUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def decodeSignature(bytes: ByteVector): (BigInt, BigInt)
Decodes the given sequence of bytes into it's r and s points throws an exception if the given sequence of bytes is not a DER encoded signature
Decodes the given sequence of bytes into it's r and s points throws an exception if the given sequence of bytes is not a DER encoded signature
- Definition Classes
- DERSignatureUtil
- def decodeSignature(signature: ECDigitalSignature): (BigInt, BigInt)
Decodes the given digital signature into it's r and s points
Decodes the given digital signature into it's r and s points
- Definition Classes
- DERSignatureUtil
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isDEREncoded(bytes: ByteVector): Boolean
Checks if the bytes are encoded to DER correctly https://crypto.stackexchange.com/questions/1795/how-can-i-convert-a-der-ecdsa-signature-to-asn-1 This will fail if this signature contains the hash type appended to the end of it
Checks if the bytes are encoded to DER correctly https://crypto.stackexchange.com/questions/1795/how-can-i-convert-a-der-ecdsa-signature-to-asn-1 This will fail if this signature contains the hash type appended to the end of it
- returns
boolean representing if the signature is a valid
- Definition Classes
- DERSignatureUtil
- def isDEREncoded(signature: ECDigitalSignature): Boolean
Checks if this signature is encoded to DER correctly https://crypto.stackexchange.com/questions/1795/how-can-i-convert-a-der-ecdsa-signature-to-asn-1 NOTE: This will fail if this signature contains the hash type appended to the end of it
Checks if this signature is encoded to DER correctly https://crypto.stackexchange.com/questions/1795/how-can-i-convert-a-der-ecdsa-signature-to-asn-1 NOTE: This will fail if this signature contains the hash type appended to the end of it
- returns
boolean representing if the signature is a valid
- Definition Classes
- DERSignatureUtil
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLowS(signature: ByteVector): Boolean
Requires the S value in signatures to be the low version of the S value https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#low-s-values-in-signatures
Requires the S value in signatures to be the low version of the S value https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#low-s-values-in-signatures
- returns
if the S value is the low version
- Definition Classes
- DERSignatureUtil
- def isLowS(signature: ECDigitalSignature): Boolean
Requires the S value in signatures to be the low version of the S value https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#low-s-values-in-signatures
Requires the S value in signatures to be the low version of the S value https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#low-s-values-in-signatures
- returns
if the S value is the low version
- Definition Classes
- DERSignatureUtil
- def isValidSignatureEncoding(bytes: ByteVector): Boolean
This functions implements the strict der encoding rules that were created in BIP66 https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L98
This functions implements the strict der encoding rules that were created in BIP66 https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L98
IMPORTANT: This function assumes bytes has a SigHash byte and will fail if not!
- bytes
the bytes to check if they are strictly der encoded
- returns
boolean indicating whether the bytes were der encoded or not
- Definition Classes
- DERSignatureUtil
- def isValidSignatureEncoding(signature: ECDigitalSignature): Boolean
This functions implements the strict der encoding rules that were created in BIP66 https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L98
This functions implements the strict der encoding rules that were created in BIP66 https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L98
IMPORTANT: This function assumes signature has a SigHash byte and will fail if not!
- signature
the signature to check if they are strictly der encoded
- returns
boolean indicating whether the signature was der encoded or not
- Definition Classes
- DERSignatureUtil
- def lowS(signature: ECDigitalSignature): ECDigitalSignature
Checks if the given digital signature uses a low s value, if it does not it converts it to a low s value and returns it
Checks if the given digital signature uses a low s value, if it does not it converts it to a low s value and returns it
- Definition Classes
- DERSignatureUtil
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def parseDERLax(input: ByteVector): Option[(BigInt, BigInt)]
Scala implementation of https://github.com/bitcoin/bitcoin/blob/master/src/pubkey.cpp#L16-L165
Scala implementation of https://github.com/bitcoin/bitcoin/blob/master/src/pubkey.cpp#L16-L165
Parses correctly as well as poorly encoded DER signatures.
"Supported violations include negative integers, excessive padding, garbage at the end, and overly long length descriptors."
The signatures must still follow the following general format:
0x30 | total length | 0x02 | R length | [R] \ 0x02 | S length | [S]
IMPORTANT: Do not use this without further validation when validating blocks because BIP 66 requires that new signatures are verified to be strict DER encodings.
- Definition Classes
- DERSignatureUtil
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()