类 ECDSASignature

java.lang.Object
org.nervos.ckb.crypto.secp256k1.ECDSASignature

public class ECDSASignature
extends java.lang.Object
  • 字段概要

    字段 
    修饰符和类型 字段 说明
    java.math.BigInteger r  
    java.math.BigInteger s  
  • 构造器概要

    构造器 
    构造器 说明
    ECDSASignature​(java.math.BigInteger r, java.math.BigInteger s)  
  • 方法概要

    修饰符和类型 方法 说明
    boolean isCanonical()  
    ECDSASignature toCanonicalised()
    Will automatically adjust the S component to be less than or equal to half the curve order, if necessary.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • r

      public final java.math.BigInteger r
    • s

      public final java.math.BigInteger s
  • 构造器详细资料

    • ECDSASignature

      public ECDSASignature​(java.math.BigInteger r, java.math.BigInteger s)
  • 方法详细资料

    • isCanonical

      public boolean isCanonical()
      返回:
      true if the S component is "low", that means it is below
    • toCanonicalised

      public ECDSASignature toCanonicalised()
      Will automatically adjust the S component to be less than or equal to half the curve order, if necessary. This is required because for every signature (r,s) the signature (r, -s (mod N)) is a valid signature of the same message. However, we dislike the ability to modify the bits of a Bitcoin transaction after it's been signed, as that violates various assumed invariants. Thus in future only one of those forms will be considered legal and the other will be banned.
      返回:
      the signature in a canonicalised form.