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[] bchainEdDsaSign (byte bType, String szCtxStr, byte[] pbData, String strPk) throws TacException
 Generates an EdDsa signature using the blockchain module.
 
void bchainVerify (byte bSigType, byte bHashMode, byte[] pbHash, byte[] pbSig, byte bInPbkType, byte[] pbInPbk) throws TacException
 Verifies a signature using the blockchain module.
 
void bchainEdDsaVerify (byte bType, String szCtxStr, byte[] pbData, byte bPbkType, byte[] pbPbk, byte[] pbSig) throws TacException
 Verifies an EdDsa signature using the blockchain module.
 
byte[] bchainGetPubKey (byte bType, String jszId) throws TacException
 Recover a public key from a private key using the blockchain module.
 
byte[] bchainGetAddress (byte bType, byte bVer, String szHrp, String szPk) throws TacException
 Retrieves the address of a key using the blockchain module.
 
BchainKeyInfo bchainGetKeyInfo (String szId) throws TacException
 Retrieves the properties of a key using the blockchain module.
 
byte[] bchainHashData (byte bMode, byte[] pbData) throws TacException
 Calculates a hash using the blockchain module.
 
BchainKeyInfo bchainCreateCkdBip32 (byte bVer, int dwIndex, int dwAttributes, String szPar, String szDst) throws TacException
 Derive a BIP32 XPrv child key in the blockchain module.
 
BchainKeyInfo bchainCreateCkdEd25519 (byte bCkdType, byte bVer, int dwIndex, int dwAttributes, String szPar, String szDst) throws TacException
 Derive an Ed25519 XPrv child key using the BIP32/SLIP-0010 standard in the blockchain module.
 
BchainKeyInfo bchainCreateCkdP256 (byte bCkdType, byte bVer, int dwIndex, int dwAttributes, String szPar, String szDst) throws TacException
 Derive a P-256 XPrv child key using the BIP32/SLIP-0010 standard in the blockchain module.
 
void bchainCreateXPrv (byte bType, int dwAttributes, String szId, byte[] pbData) throws TacException
 Creates an XPrv key in the blockchain module.
 
void bchainCreateXPrv (byte bType, byte bVer, int dwAttributes, String szId) throws TacException
 Creates an XPrv key without seed data in the blockchain module.
 
void bchainCreateXPrvBip32Seed (byte bVer, int dwAttributes, String szId, byte[] pbSeed) throws TacException
 Creates an XPrv key from a BIP32 seed in the blockchain module.
 
void bchainCreateXPrvBip39Seed (byte bVer, int dwAttributes, String szId, String szSeed, String szPwd) throws TacException
 Creates an XPrv key from a BIP39 seed in 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

◆ bchainEdDsaSign()

byte[] bchainEdDsaSign ( byte bType,
String szCtxStr,
byte[] pbData,
String strPk ) throws TacException

Generates an EdDsa signature using the blockchain module.

Parameters
bTypeType of subscription to be generated. It can be one of the values below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_PURE EdDsa Pure Signature.
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_ALGORAND EdDsa Algorand Signature.
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_XRP EdDsa XRP Ledger/Ripple signature.
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_SOL Signature EdDsa Solana.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_XLM EdDsa Stellar signature.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_ADA EdDsa Cardano signature.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_DOT EdDsa Polkadot signature.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_XTZ EdDsa Tezos signature encoded in b58.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_XTZ_PH Signing an EdDsa Tezos signature using blake2b-256.
szCtxStrContext string as defined in RFC-8032. Use TacNDJavaLib.DN_BCHAIN_EDDSA_CSTR_UNUSED when not applicable.
pbDataData to be signed.
strPkName of the private key.
Return
Signature in the format specified in bType.
Exceptions
TacException

◆ bchainVerify()

void bchainVerify ( byte bSigType,
byte bHashMode,
byte[] pbHash,
byte[] pbSig,
byte bInPbkType,
byte[] pbInPbk ) throws TacException

Verifies a signature using the blockchain module.

Parameters
bSigTypeSignature type. It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_SIG_DER_ECDSA DER signature, in the format v || DER.
TacNDJavaLib.DN_BCHAIN_SIG_RAW_ECDSA RAW signature, in v || r || s format.
TacNDJavaLib.DN_BCHAIN_SIG_BIP340 Signature BIP340 - Schnorr 64 bytes.
bHashModeHash type. It can be one of the values listed below.
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 calculated according to the information in bHashMode.
pbSigSignature to be verified according to the information specified in bSigType.
bInPbkTypePublic key format. 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.
pbInPbkPublic key used for verification.
Exceptions
TacException

◆ bchainEdDsaVerify()

void bchainEdDsaVerify ( byte bType,
String szCtxStr,
byte[] pbData,
byte bPbkType,
byte[] pbPbk,
byte[] pbSig ) throws TacException

Verifies an EdDsa signature using the blockchain module.

Parameters
bTypeType of signature to be verified. It can be one of the values below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_PURE EdDsa Pure Signature.
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_ALGORAND EdDsa Algorand Signature.
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_XRP EdDsa XRP Ledger/Ripple signature.
TacNDJavaLib.DN_BCHAIN_EDDSA_SIG_SOL Signature EdDsa Solana.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_XLM EdDsa Stellar signature.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_ADA EdDsa Cardano signature.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_DOT EdDsa Polkadot signature.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_XTZ EdDsa Tezos signature encoded in b58.
TacNDJavaLib.DN_BCHAIN_EdDSA_SIG_XTZ_PH Signing an EdDsa Tezos signature using blake2b-256.
szCtxStrContext string as defined in RFC-8032. Use TacNDJavaLib.DN_BCHAIN_EDDSA_CSTR_UNUSED when not applicable.
pbDataData to be verified.
bPbkTypePublic key format. Can be one of the values below.
Value Meaning
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."
pbPbkPublic key used for verification.
pbSigSignature to be verified.
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

◆ bchainGetAddress()

byte[] bchainGetAddress ( byte bType,
byte bVer,
String szHrp,
String szPk ) throws TacException

Retrieves the address of a key using the blockchain module.

Parameters
bTypeAddress type. It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_AT_BTC_P2PKH P2PKH address. bVer: DN_BCHAIN_VER_BTC_A1_MAIN_NET/A3_MAIN_NET/AMN_TEST_NET/HTR_MAINNET/HTR_TESTNET; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_BTC_P2SH P2SH address BIP13. bVer: same as P2PKH; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_BTC_P2WPKH BIP173 address, version 0. bVer: DN_BCHAIN_VER_BTC_B32_WITVER; szHrp: DN_BCHAIN_HRP_BTC_MAIN_NET or DN_BCHAIN_HRP_BTC_TEST_NET.
TacNDJavaLib.DN_BCHAIN_AT_BTC_P2WSH BIP173 address, version 0. bVer: same as P2PKH; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_ETH_EOA ETH EOA address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_ETH_EOA_MC_CKS Address ETH EOA MC CKS. EIP55. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_ETH_EOA_ICAP ETH EOA ICAP address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_ALGORAND Algorand address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_TRON_HEX TRON hex address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_TRON_B58 TRON Base 58 address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_XRP XRP Ledger/Ripple address. bVer: DN_BCHAIN_VER_XRP_CLASSIC; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_SOL Solana address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_XLM Stellar Address SEP-23. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_ADA_PKH Cardano Address CIP-0019. bVer: DN_BCHAIN_VER_ADA_MAINNET or DN_BCHAIN_VER_ADA_TESTNET; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_ADA_SH Cardano Address CIP-0019 SH. bVer: DN_BCHAIN_VER_ADA_MAINNET or DN_BCHAIN_VER_ADA_TESTNET; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_LUNC Terra Classic address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_SS58 Address SS58. bVer: DN_BCHAIN_VER_SS58_POLKADOT or DN_BCHAIN_VER_SS58_GEN_SUBST; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_XTZ Tezos address. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_TON Toncoin TEP-2 address. bVer: DN_BCHAIN_VER_TON_MN_BWORK/MN_MCHAIN/TN_BWORK/TN_MCHAIN; szHrp: DN_BCHAIN_HRP_TON_BNCBLE or DN_BCHAIN_HRP_TON_NBNCBLE.
TacNDJavaLib.DN_BCHAIN_AT_TON_SH Toncoin TEP-2 SH address. bVer: same as TON; szHrp: same as TON.
TacNDJavaLib.DN_BCHAIN_AT_ATOM Atom address ADR-028. bVer: DN_BCHAIN_VER_UNUSED; szHrp: DN_BCHAIN_HRP_UNUSED.
TacNDJavaLib.DN_BCHAIN_AT_BTC_P2TR BTC BIP350 address, version 1-16. bVer: DN_BCHAIN_VER_BTC_SEGWIT1/LTC_SEGWIT1; szHrp: DN_BCHAIN_HRP_BTC_MAIN_NET/BTC_TEST_NET/LTC_MAINNET/LTC_TESTNET.
bVerAddress version based on the type. It can be one of the values below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_VER_UNUSED Not used.
TacNDJavaLib.DN_BCHAIN_VER_BTC_A1_MAIN_NET Bitcoin A1 mainnet.
TacNDJavaLib.DN_BCHAIN_VER_BTC_AMN_TEST_NET Bitcoin P2PKH testnet.
TacNDJavaLib.DN_BCHAIN_VER_BTC_A3_MAIN_NET Bitcoin A3 mainnet.
TacNDJavaLib.DN_BCHAIN_VER_BTC_B32_WITVER Bitcoin B32 witver.
TacNDJavaLib.DN_BCHAIN_VER_BTC_SEGWIT0 Bitcoin SegWit0.
TacNDJavaLib.DN_BCHAIN_VER_BTC_SEGWIT1 Bitcoin SegWit1.
TacNDJavaLib.DN_BCHAIN_VER_HTR_MAINNET Hathor mainnet.
TacNDJavaLib.DN_BCHAIN_VER_HTR_TESTNET Hathor testnet.
TacNDJavaLib.DN_BCHAIN_VER_HTR_P2SH_MAINNET Hathor P2SH mainnet.
TacNDJavaLib.DN_BCHAIN_VER_HTR_P2SH_TESTNET Hathor P2SH testnet.
TacNDJavaLib.DN_BCHAIN_VER_XRP_CLASSIC XRP Ledger/Ripple Classic.
TacNDJavaLib.DN_BCHAIN_VER_LTC_AL_MAINNET Litecoin AL mainnet.
TacNDJavaLib.DN_BCHAIN_VER_LTC_Amn_TESTNET Litecoin Amn testnet.
TacNDJavaLib.DN_BCHAIN_VER_LTC_AM_MAINNET Litecoin AM mainnet.
TacNDJavaLib.DN_BCHAIN_VER_LTC_AQ_TESTNET Litecoin AQ testnet.
TacNDJavaLib.DN_BCHAIN_VER_ADA_MAINNET Cardano mainnet.
TacNDJavaLib.DN_BCHAIN_VER_ADA_TESTNET Cardano testnet.
TacNDJavaLib.DN_BCHAIN_VER_SS58_POLKADOT Polkadot SS58.
TacNDJavaLib.DN_BCHAIN_VER_SS58_GEN_SUBST Generic Substrate SS58.
TacNDJavaLib.DN_BCHAIN_VER_TON_MN_BWORK Toncoin wallet v4r2; mainnet; basic workchain.
TacNDJavaLib.DN_BCHAIN_VER_TON_MN_MCHAIN Toncoin wallet v4r2; mainnet; masterchain.
TacNDJavaLib.DN_BCHAIN_VER_TON_TN_BWORK Toncoin wallet v4r2; testnet; basic workchain.
TacNDJavaLib.DN_BCHAIN_VER_TON_TN_MCHAIN Toncoin wallet v4r2; testnet; masterchain.
szHrpHRP (Human Readable Part). It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_HRP_UNUSED Not used.
TacNDJavaLib.DN_BCHAIN_HRP_BTC_MAIN_NET Bitcoin mainnet.
TacNDJavaLib.DN_BCHAIN_HRP_BTC_TEST_NET Bitcoin testnet.
TacNDJavaLib.DN_BCHAIN_HRP_LTC_MAINNET Litecoin mainnet.
TacNDJavaLib.DN_BCHAIN_HRP_LTC_TESTNET Litecoin testnet.
TacNDJavaLib.DN_BCHAIN_HRP_TON_BNCBLE Toncoin bounceable.
TacNDJavaLib.DN_BCHAIN_HRP_TON_NBNCBLE Toncoin non-bounceable.
szPkName of the private key in the HSM.
Return
Address in the format specified in bType.
Exceptions
TacException

◆ bchainGetKeyInfo()

BchainKeyInfo bchainGetKeyInfo ( String szId) throws TacException

Retrieves the properties of a key using the blockchain module.

Parameters
szIdName of the key in the HSM.
Return
Key information in a BchainKeyInfo.
Exceptions
TacException

◆ bchainHashData()

byte[] bchainHashData ( byte bMode,
byte[] pbData ) throws TacException

Calculates a hash using the blockchain module.

Parameters
bModeHash type. It can be one of the values listed below.
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.
pbDataData to be processed. Maximum size: DN_BCHAIN_MAX_HDATA_LEN (2 MB).
Return
Hash calculated according to the type specified in bMode.
Exceptions
TacException
Notes
This API is available for implementation validation. We recommend generating the hash using software for better performance and more efficient use of HSM resources.

◆ bchainCreateCkdBip32()

BchainKeyInfo bchainCreateCkdBip32 ( byte bVer,
int dwIndex,
int dwAttributes,
String szPar,
String szDst ) throws TacException

Derive a BIP32 XPrv child key in the blockchain module.

Parameters
bVerDerived key version. It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_VER_BIP32_MAINNET Mainnet BIP32.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_TESTNET Testnet BIP32.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_HTR_MAINNET Mainnet BIP32 Hathor.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_HTR_TESTNET Testnet BIP32 Hathor.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_FPRV1 Fireblocks variation.
dwIndexDerivation index. Non-hardened keys: 0 to 2^31-1. Hardened keys: TacNDJavaLib#DN_BCHAIN_SECURE_BIP32_INDEX_BASE to TacNDJavaLib#DN_BCHAIN_SECURE_BIP32_INDEX_BASE + 2^31-1.
dwAttributesAdditional key parameters. See createKey.
szParName of the parent key in the HSM.
szDstName of the derived key to be created in the HSM.
Return
Derived key information in an instance of BchainKeyInfo.
Exceptions
TacException

◆ bchainCreateCkdEd25519()

BchainKeyInfo bchainCreateCkdEd25519 ( byte bCkdType,
byte bVer,
int dwIndex,
int dwAttributes,
String szPar,
String szDst ) throws TacException

Derive an Ed25519 XPrv child key using the BIP32/SLIP-0010 standard in the blockchain module.

Parameters
bCkdTypeDerivation type. It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_BIP32_Ed_KDT_SLIP10 SatoshiLabs SLIP-0010.
TacNDJavaLib.DN_BCHAIN_BIP32_Ed_KDT_FPRV1 Fireblocks variation.
bVerDerived key version. See the options table in bchainCreateCkdBip32(byte, int, int, String, String).
dwIndexDerivation index. See the options table in bchainCreateCkdBip32(byte, int, int, String, String).
dwAttributesAdditional key parameters. See createKey.
szParName of the parent key in the HSM.
szDstName of the derived key to be created in the HSM.
Return
Derived key information in an instance of BchainKeyInfo.
Exceptions
TacException

◆ bchainCreateCkdP256()

BchainKeyInfo bchainCreateCkdP256 ( byte bCkdType,
byte bVer,
int dwIndex,
int dwAttributes,
String szPar,
String szDst ) throws TacException

Derive a P-256 XPrv child key using the BIP32/SLIP-0010 standard in the blockchain module.

Parameters
bCkdTypeDerivation type. It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_BIP32_P256_KDT_SLIP10 SatoshiLabs SLIP-0010 for P-256.
bVerDerived key version. See the options table in bchainCreateCkdBip32(byte, int, int, String, String).
dwIndexDerivation index. See the options table in bchainCreateCkdBip32(byte, int, int, String, String).
dwAttributesAdditional key parameters. See createKey.
szParName of the parent key in the HSM.
szDstName of the derived key to be created in the HSM.
Return
Derived key information in an instance of BchainKeyInfo.
Exceptions
TacException

◆ bchainCreateXPrv() [1/2]

void bchainCreateXPrv ( byte bType,
int dwAttributes,
String szId,
byte[] pbData ) throws TacException

Creates an XPrv key in the blockchain module.

Parameters
bTypeKey generation type. It can be one of the values listed below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_BTC_MINIKEY Bitcoin minikey. pbData must be null and dwDataLen must be 0.
TacNDJavaLib.DN_BCHAIN_BIP32_SEED_XPRV The BIP32 seed XPrv. pbData must contain the serialized DN_BCHAIN_BIP32_SEED_XPRV_DATA structure.
TacNDJavaLib.DN_BCHAIN_BIP39_SEED_XPRV The BIP39 seed XPrv. pbData must contain the serialized DN_BCHAIN_BIP39_SEED_XPRV_DATA structure.
TacNDJavaLib.DN_BCHAIN_BIP32_XPRV BIP32 XPrv. pbData must be the version (TacNDJavaLib.DN_BCHAIN_VER_BIP32_MAINNET, etc.).
TacNDJavaLib.DN_BCHAIN_BIP32_ED25519_XPRV BIP32 Ed25519 XPrv. pbData must be the version.
TacNDJavaLib.DN_BCHAIN_BIP32_P256_XPRV BIP32 P-256 XPrv. pbData must be the version.
dwAttributesAdditional key parameters. See createKey.
szIdName of the key in the HSM.
pbDataBuffer containing the key generation data based on the type specified in bType. It may be null for types that do not require data.
Exceptions
TacException

◆ bchainCreateXPrv() [2/2]

void bchainCreateXPrv ( byte bType,
byte bVer,
int dwAttributes,
String szId ) throws TacException

Creates an XPrv key without seed data in the blockchain module.

Used with types that require only the key version: TacNDJavaLib.DN_BCHAIN_BIP32_XPRV, TacNDJavaLib.DN_BCHAIN_BIP32_ED25519_XPRV, and TacNDJavaLib.DN_BCHAIN_BIP32_P256_XPRV. For TacNDJavaLib.DN_BCHAIN_BTC_MINIKEY, use bVer 0.

Parameters
bTypeType of key generation.
bVerKey version. Used by the types TacNDJavaLib.DN_BCHAIN_BIP32_XPRV, TacNDJavaLib.DN_BCHAIN_BIP32_ED25519_XPRV e TacNDJavaLib.DN_BCHAIN_BIP32_P256_XPRV. To TacNDJavaLib.DN_BCHAIN_BTC_MINIKEY, enter 0. It can be one of the values below.
Value Meaning
TacNDJavaLib.DN_BCHAIN_VER_BIP32_MAINNET Mainnet BIP32.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_TESTNET Testnet BIP32.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_HTR_MAINNET Mainnet BIP32 Hathor.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_HTR_TESTNET Testnet BIP32 Hathor.
TacNDJavaLib.DN_BCHAIN_VER_BIP32_FPRV1 Fireblocks Variation.
dwAttributesAdditional key parameters. See createKey.
szIdName of the key in the HSM.
Exceptions
TacException

◆ bchainCreateXPrvBip32Seed()

void bchainCreateXPrvBip32Seed ( byte bVer,
int dwAttributes,
String szId,
byte[] pbSeed ) throws TacException

Creates an XPrv key from a BIP32 seed in the blockchain module.

Parameters
bVerKey version. See the options table in bchainCreateXPrv(byte, byte, int, String).
dwAttributesAdditional key parameters. See createKey.
szIdName of the key in the HSM.
pbSeedBIP32 seed. Maximum length of TacNDJavaLib.DN_BCHAIN_BIP32_SEED_LEN_MAX.
Exceptions
TacException

◆ bchainCreateXPrvBip39Seed()

void bchainCreateXPrvBip39Seed ( byte bVer,
int dwAttributes,
String szId,
String szSeed,
String szPwd ) throws TacException

Creates an XPrv key from a BIP39 seed in the blockchain module.

The strings `szSeed` and `szPwd` must be in UTF-8 NFKD format, as specified in BIP39.

Parameters
bVerKey version. See the options table in bchainCreateXPrv(byte, byte, int, String).
dwAttributesAdditional key parameters. See createKey.
szIdName of the key in the HSM.
szSeedBIP39 seed in UTF-8 NFKD. Maximum size of TacNDJavaLib.DN_BCHAIN_BIP39_SEED_LEN_MAX.
szPwdBIP39 password in UTF-8 NFKD. May be an empty string. Maximum length is TacNDJavaLib.DN_BCHAIN_BIP39_PWD_LEN_MAX.
Exceptions
TacException