|
std::vector< uint8_t > | key (const std::vector< uint8_t > &seedBytes, uint32_t index=0, uint32_t security=2) |
|
std::vector< uint8_t > | digests (const std::vector< uint8_t > &keyBytes) |
|
std::vector< uint8_t > | address (const std::vector< uint8_t > &digests) |
|
std::vector< uint8_t > | digest (const std::vector< int8_t > &normalizedBundleFragment, const std::vector< uint8_t > &signatureFragment) |
|
Types::Trits | signatureFragment (const std::vector< int8_t > &normalizedBundleFragment, const Types::Trits &keyFragment) |
|
std::vector< Types::Trytes > | signInputs (const Models::Seed &seed, const std::vector< Models::Address > &inputs, Models::Bundle &bundle, const std::vector< Types::Trytes > &signatureFragments) |
|
bool | validateSignatures (const Models::Address &expectedAddress, const std::vector< Types::Trytes > &signatureFragments, const Types::Trytes &bundleHash) |
|
Signing related functions.
◆ address()
std::vector<uint8_t> IOTA::Crypto::Signing::address |
( |
const std::vector< uint8_t > & |
digests | ) |
|
Compute address from digests.
- Parameters
-
- Returns
- The address.
◆ digest()
std::vector<uint8_t> IOTA::Crypto::Signing::digest |
( |
const std::vector< int8_t > & |
normalizedBundleFragment, |
|
|
const std::vector< uint8_t > & |
signatureFragment |
|
) |
| |
Compute hash x normalizedBundleFragment[i] for each fragment in the signature.
- Parameters
-
normalizedBundleFragment | The bundle fragment. |
signatureFragment | The signature fragment. |
- Returns
- The digest.
◆ digests()
std::vector<uint8_t> IOTA::Crypto::Signing::digests |
( |
const std::vector< uint8_t > & |
keyBytes | ) |
|
Compute digests from key.
- Parameters
-
keyBytes | The key in bytes. |
- Returns
- The digests.
◆ key()
std::vector<uint8_t> IOTA::Crypto::Signing::key |
( |
const std::vector< uint8_t > & |
seedBytes, |
|
|
uint32_t |
index = 0 , |
|
|
uint32_t |
security = 2 |
|
) |
| |
Derive a private key from a seed.
- Parameters
-
seedBytes | Seed in bytes to be used for address generation. |
index | The index to start the generation from. |
security | The security to use for address generation. |
- Returns
- The key as bytes.
◆ signatureFragment()
Types::Trits IOTA::Crypto::Signing::signatureFragment |
( |
const std::vector< int8_t > & |
normalizedBundleFragment, |
|
|
const Types::Trits & |
keyFragment |
|
) |
| |
Compute signature from bundle fragment and key fragment.
- Parameters
-
normalizedBundleFragment | The bundle fragment. |
keyFragment | The key fragment. |
- Returns
- The signature fragment.
◆ validateSignatures()
bool IOTA::Crypto::Signing::validateSignatures |
( |
const Models::Address & |
expectedAddress, |
|
|
const std::vector< Types::Trytes > & |
signatureFragments, |
|
|
const Types::Trytes & |
bundleHash |
|
) |
| |
Validate signature fragments.
- Parameters
-
expectedAddress | The expected address. |
signatureFragments | The signature fragments. |
bundleHash | The bundle hash. |
- Returns
- whether signature fragment are valid or not.