|
Offline Transaction Signing (OTS) 0.1.0
|
The library exists complete only in this namespace. More...
Namespaces | |
| namespace | data |
| namespace | exception |
| All ots library related exceptions are in this namespace. | |
Classes | |
| class | Account |
| holds monero internal account and internal functions More... | |
| struct | AccountDeleter |
| class | Address |
| Represents a Monero address. More... | |
| class | Entropy |
| Entropy check functions. More... | |
| class | KeyStore |
| essentialy wraps crypto::secret_key More... | |
| struct | KeyStoreDeleter |
| class | LegacySeed |
| Represents a monero 13-words seed type for backward compatibility. More... | |
| class | MoneroSeed |
| Represents a Monero 25-words seed. More... | |
| class | OTS |
| General functionality. More... | |
| class | Polyseed |
| Represents a Polyseed type. More... | |
| class | PolyseedKeyStore |
| Extends KeyStore with specific functionality for polyseed-based cryptographic operations. More... | |
| struct | PolyseedKeyStoreDeleter |
| class | Seed |
| Abstract base class for cryptographic seed management. More... | |
| class | SeedIndices |
| Secure container for seed word indices. More... | |
| class | SeedJar |
| Storage for the Seed objects, mainly for the purpose of the C ABI. More... | |
| class | SeedLanguage |
| Manages seed phrase languages and their properties. More... | |
| class | TxDescription |
| detailed information about a transaction, used to check transaction before signing More... | |
| class | TxWarning |
| Warnings directed to the actual user related to a transaction to be signed, to make it easier to the application developer to help the user make informed decissions. More... | |
| class | Wallet |
| provides all offline wallet functionality More... | |
| class | WipeableString |
| String class that wipes its memory on destruction. More... | |
| class | ZeroizeReferenceCopy |
| A class to handle a reference copy of a value and zeroize it on destruction. More... | |
Typedefs | |
| using | key_handle_t = size_t |
| using | seed_handle_t = size_t |
Enumerations | |
| enum class | Network { MAIN , TEST , STAGE } |
| Represents the monero network. More... | |
| enum class | AddressType { Standard , SubAddress , Integrated } |
| Represents the monero address type. More... | |
| enum class | SeedType { Monero , Polyseed } |
| Represents the seed type, and is used for the different dictionaries (languages) available. More... | |
Functions | |
| cryptonote::network_type | cryptonoteNetwork (Network network) noexcept |
| Converts the network type from the library network type to cryptonote network type. | |
| std::vector< std::string > | splitString (const std::string &input, const std::string &separator="", size_t fixedWidth=4) |
| Converts a string by a separator or fixed 4 char width. | |
| SeedIndices | seedIndices (const unsigned char *bytes, size_t byte_length, size_t word_list_length=1626, size_t bytes_per_chunk=4, size_t words_per_chunk=3) |
| Returns the indices of a seed phrase. | |
| template<size_t byte_count> | |
| std::array< unsigned char, byte_count > | seedBytes (const SeedIndices &indices, const size_t word_list_length=1626, const size_t bytes_per_chunk=4, const size_t words_per_chunk=3) |
| const ots::data::NetworkData * | getNetworkData (Network network) |
| void | onPolyseedStatusNotOkThrowException (const polyseed_status &status) |
| Translates status to ots::exception's. | |
| void | injectPolyseedDependency () |
| makes sure dependencies are injected before first use, injection happens only once - first time. | |
| void | polyseed_random_wrapper (void *result, size_t n) |
| provides random bytes to polyseed library | |
| void | polyseed_pbkdf2_wrapper (const uint8_t *pw, size_t pwlen, const uint8_t *salt, size_t saltlen, uint64_t iterations, uint8_t *key, size_t keylen) |
| provides pbkdf2-sha256 to polyseed library | |
| void | polyseed_memwipe_wrapper (void *const ptr, const size_t len) |
| provides memory wipe to polyseed library | |
| size_t | utf8_nfc (const char *str, polyseed_str norm) |
| provides utf8 normalization to polyseed library at the moment utf8proc is used, because it seems that boost::locale will drag more dependencies with in. | |
| size_t | utf8_nfkd (const char *str, polyseed_str norm) |
| provides utf8 normalization to polyseed library, uses also utf8proc | |
| std::ostream & | operator<< (std::ostream &os, const WipeableString &str) |
Variables | |
| const std::map< Network, ots::data::NetworkData > | NETWORK_DATA_MAP |
The library exists complete only in this namespace.
This header file provides following features for the ots library for C++:
| using ots::key_handle_t = typedef size_t |
| using ots::seed_handle_t = typedef size_t |
|
strong |
|
strong |
|
strong |
Represents the seed type, and is used for the different dictionaries (languages) available.
| Enumerator | |
|---|---|
| Monero | |
| Polyseed | |
|
noexcept |
Converts the network type from the library network type to cryptonote network type.
| network | the library network type |
| const ots::data::NetworkData * ots::getNetworkData | ( | Network | network | ) |
| void ots::injectPolyseedDependency | ( | ) |
makes sure dependencies are injected before first use, injection happens only once - first time.
| void ots::onPolyseedStatusNotOkThrowException | ( | const polyseed_status & | status | ) |
Translates status to ots::exception's.
| std::ostream & ots::operator<< | ( | std::ostream & | os, |
| const WipeableString & | str | ||
| ) |
| void ots::polyseed_memwipe_wrapper | ( | void *const | ptr, |
| const size_t | len | ||
| ) |
provides memory wipe to polyseed library
| ptr | pointer to memory |
| len | length of memory |
| void ots::polyseed_pbkdf2_wrapper | ( | const uint8_t * | pw, |
| size_t | pwlen, | ||
| const uint8_t * | salt, | ||
| size_t | saltlen, | ||
| uint64_t | iterations, | ||
| uint8_t * | key, | ||
| size_t | keylen | ||
| ) |
provides pbkdf2-sha256 to polyseed library
| pw | password | |
| pwlen | password length | |
| salt | salt | |
| saltlen | salt length | |
| iterations | number of iterations | |
| [out] | key | Output. Pre-allocated buffer where the derived key will be stored. |
| keylen | output key length |
| void ots::polyseed_random_wrapper | ( | void * | result, |
| size_t | n | ||
| ) |
provides random bytes to polyseed library
| std::array< unsigned char, byte_count > ots::seedBytes | ( | const SeedIndices & | indices, |
| const size_t | word_list_length = 1626, |
||
| const size_t | bytes_per_chunk = 4, |
||
| const size_t | words_per_chunk = 3 |
||
| ) |
| SeedIndices ots::seedIndices | ( | const unsigned char * | bytes, |
| size_t | byte_length, | ||
| size_t | word_list_length = 1626, |
||
| size_t | bytes_per_chunk = 4, |
||
| size_t | words_per_chunk = 3 |
||
| ) |
Returns the indices of a seed phrase.
| bytes | the bytes to convert |
| byte_length | the length of the bytes |
| word_list_length | the length of the word list, monero wordlist length is 1626 |
| bytes_per_chunk | the number of bytes per chunk, monero uses 4 bytes per chunk is electrum default |
| words_per_chunk | the number of words per chunk, monero uses 3 words per chunk is electrum default |
| ots::exception::seed::LengthMismatch | If more bits provided than needed |
| std::vector< std::string > ots::splitString | ( | const std::string & | input, |
| const std::string & | separator = "", |
||
| size_t | fixedWidth = 4 |
||
| ) |
Converts a string by a separator or fixed 4 char width.
| input | the string to split |
| separator | the separator to split the string, if empty the fixed width is used |
| fixedWidth | the fixed width to split the string, by default 4 chars |
| size_t ots::utf8_nfc | ( | const char * | str, |
| polyseed_str | norm | ||
| ) |
provides utf8 normalization to polyseed library at the moment utf8proc is used, because it seems that boost::locale will drag more dependencies with in.
| str | input string | |
| [out] | norm | output normalized string, esentially it is char[360] |
| size_t ots::utf8_nfkd | ( | const char * | str, |
| polyseed_str | norm | ||
| ) |
provides utf8 normalization to polyseed library, uses also utf8proc
| str | input string | |
| [out] | norm | output normalized string, esentially it is char[360] |
| const std::map< ots::Network, ots::data::NetworkData > ots::NETWORK_DATA_MAP |