Operations to support the security of Blockchain-based structures.
See the HSM technical documentation.
|
byte[] | bchainSignHash (byte bType, byte bHashMode, byte[] pbHash, String strPk) throws TacException |
| Sign a hash using the blockchain module.
|
|
byte[] | bchainGetPubKey (byte bType, String jszId) throws TacException |
| Recover a public key from a private key using the blockchain module.
|
|
◆ bchainSignHash()
byte[] bchainSignHash |
( |
byte | bType, |
|
|
byte | bHashMode, |
|
|
byte[] | pbHash, |
|
|
String | strPk ) throws TacException |
Sign a hash using the blockchain module.
- Parameters
-
bType | Type of subscription to be generated. It can be one of the values below.
Value | Meaning |
TacNDJavaLib.DN_BCHAIN_SIG_DER_ECDSA | DER signature, in the format v || DER. SECG!SEC1 strict DER with low S as described in BIP62/66, BIP146, EIP2. With 'v' having a size of 1 byte. 'v' is the parity bit of 'r' and can have the values 0 or 1. |
TacNDJavaLib.DN_BCHAIN_SIG_RAW_ECDSA | RAW signature, in the format v || r || s. With 'v' having a size of 1 byte and 'r' and 's' each having a size of 32 bytes. 'v' is the parity bit of 'r' and can have the values 0 or 1. |
TacNDJavaLib.DN_BCHAIN_SIG_BIP340 | Signature BIP340 - Schnorr 64 bytes. |
|
bHashMode | Hash type.
|
pbHash | Hash to be signed. |
strPk | Private key identifier. |
- Return
- Signature in the format specified in
bType
.
- Exceptions
-
◆ bchainGetPubKey()
byte[] bchainGetPubKey |
( |
byte | bType, |
|
|
String | jszId ) throws TacException |
Recover a public key from a private key using the blockchain module.
- Parameters
-
bType | Format of the public key to be exported. Can be one of the values below.
|
jszId | Private key identifier. |
- Return
- Public key in the format specified in
bType
.
- Exceptions
-