public abstract class SignatureEcBc extends SignatureBinary
SignatureBinary for ECDSA based on BouncyCastle.| Modifier and Type | Field and Description |
|---|---|
private CryptoEllipticCurveBc |
curve |
private BigInteger |
r |
private BigInteger |
s |
| Constructor and Description |
|---|
SignatureEcBc(CryptoEllipticCurveBc curve,
byte[] data)
The constructor.
|
SignatureEcBc(CryptoEllipticCurveBc curve,
byte[] data,
BigInteger r,
BigInteger s)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static byte |
calculateRecoveryIndex(byte[] message,
CryptoEllipticCurveBc curve,
BigInteger r,
BigInteger s,
org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey publicKey) |
protected static byte[] |
createData(int head,
BigInteger r,
BigInteger s) |
protected void |
deserialize()
|
protected CryptoEllipticCurveBc |
getCurve() |
protected int |
getHead() |
BigInteger |
getR() |
BigInteger |
getS() |
private void |
initRS() |
protected org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey |
recoverPublicKey(byte[] message,
byte recoveryIndex) |
protected static org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey |
recoverPublicKey(byte[] message,
CryptoEllipticCurveBc curve,
BigInteger r,
BigInteger s,
byte recoveryIndex) |
asStream, equals, format, formatBase64, formatHex, getData, getData, getDataByte, getLength, getMaxLength, getMinLength, hashCode, isZeros, parseBase64, parseHex, save, toBytes, toBytes, toInt, toLong, toStringprivate final CryptoEllipticCurveBc curve
private BigInteger r
private BigInteger s
public SignatureEcBc(CryptoEllipticCurveBc curve, byte[] data, BigInteger r, BigInteger s)
curve - the elliptic curve.data - the binary data.r - - see getR().s - - see getS().public SignatureEcBc(CryptoEllipticCurveBc curve, byte[] data)
curve - the elliptic curve.data - the binary data.private void initRS()
protected int getHead()
binary data.protected void deserialize()
protected static byte[] createData(int head,
BigInteger r,
BigInteger s)
public BigInteger getR()
public BigInteger getS()
protected CryptoEllipticCurveBc getCurve()
elliptic curve.protected org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey recoverPublicKey(byte[] message,
byte recoveryIndex)
message - the payload (typically hash of message) that was signed when this signature was created.recoveryIndex - the recovery index for public key recovery.protected static byte calculateRecoveryIndex(byte[] message,
CryptoEllipticCurveBc curve,
BigInteger r,
BigInteger s,
org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey publicKey)
message - the payload (typically hash of message) that was signed when this signature was created.curve - the elliptic curve.r - value R.s - value S.publicKey - the public key corresponding to the private key that was used to sign the
message.recovery index.protected static org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey recoverPublicKey(byte[] message,
CryptoEllipticCurveBc curve,
BigInteger r,
BigInteger s,
byte recoveryIndex)
message - the payload (typically hash of message) that was signed when this signature was created.curve - the elliptic curve.r - value R.s - value S.recoveryIndex - the recovery index for public key
recovery.Copyright © 2001–2019 mmm-Team. All rights reserved.