Java API
HSM Dinamo
Loading...
Looking for...
No entries found
Blockchain Module

Detailed description

Operations to support the security of Blockchain-based structures.

See HSM technical documentation about operating details, specifications used, licenses e module trade name.

Operations to support the security of Blockchain-based structures. More...

Functions

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.
 

Functions

bchainSignHash()

byte[] bchainSignHash ( byte bType,
byte bHashMode,
byte[] pbHash,
String strPk ) throws TacException

Sign a hash using the blockchain module.

Parameters
bTypeType 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.
bHashModeHash type.
Value Meaning
TacNDJavaLib.DN_BCHAIN_HASH_BTC_H160 Bitcoin H160.
TacNDJavaLib.DN_BCHAIN_HASH_RIPEMD160 RIPEMD160.
TacNDJavaLib.DN_BCHAIN_HASH_SHA256 SHA256
TacNDJavaLib.DN_BCHAIN_HASH_BTC_SHA256_2X Bitcoin SHA256 2x.
TacNDJavaLib.DN_BCHAIN_HASH_KECCAK256 KECCAK256.
TacNDJavaLib.DN_BCHAIN_HASH_BLAKE2B224 Blake2b 224.
TacNDJavaLib.DN_BCHAIN_HASH_BLAKE2B256 Blake2b 256.
pbHashHash to be signed.
strPkPrivate key identifier.
Return
Signature in the format specified in bType.
Exceptions
TacException

bchainGetPubKey()

byte[] bchainGetPubKey ( byte bType,
String jszId ) throws TacException

Recover a public key from a private key using the blockchain module.

Parameters
bTypeFormat of the public key to be exported. Can be one of the values below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_PBK_SEC1_UNCOMP ECDSA SEC1 uncompressed.
TacNDJavaLib.DN_BCHAIN_PBK_SEC1_COMP ECDSA SEC1 compressed.
TacNDJavaLib.DN_BCHAIN_PBK_BIP340 Schnorr, BIP-340.
TacNDJavaLib.DN_BCHAIN_PBK_ED25519 Ed25519.
TacNDJavaLib.DN_BCHAIN_PBK_AT_ALGORAND Algorand.
TacNDJavaLib.DN_BCHAIN_PBK_BIP32_XPUB BIP32 XPub.
TacNDJavaLib.DN_BCHAIN_PBK_AT_SOL Solana.
TacNDJavaLib.DN_BCHAIN_PBK_AT_XLM Stellar Lumens.
TacNDJavaLib.DN_BCHAIN_PBK_ADA_VK Cardano CIP-0016 / CIP-0005.
TacNDJavaLib.DN_BCHAIN_PBK_AT_SS58 SS58.
TacNDJavaLib.DN_BCHAIN_PBK_TON TEP-2 "User-friendly"/"armored."
TacNDJavaLib.DN_BCHAIN_PBK_E_UNCOMP | SEC1_UNCOMP without the 0x04 prefix (X || Y). Only alt_bn128 (EIPs 196/197).
jszIdPrivate key identifier.
Return
Public key in the format specified in bType.
Exceptions
TacException