Crate harpo

Crate harpo 

Source
Expand description

harpo

The harpo crate provides functionality to secret-share seed phrases.

The main functions that harpo provides are:

The additional functionality that harpo provides is documented below.

Modules§

seed_phrase
The seed_phrase module provides the functionality to convert a seed phrase into a finite field element and vice versa.

Enums§

HarpoError
This enumeration type is returned by the main library functions if there is an error.

Constants§

MAX_EMBEDDED_SHARES
The maximum number of shares that can be embedded. It is 2^NUM_BITS_FOR_INDEX = 16 because 4 bits are used to encode the index in the embedding. It is not easily possible to use more than 4 bits because only 4 additional bits are used when using a 12-word seed phrase (12*11 = 132 bits to encode a secret of 128 bits).

Functions§

create_secret_shared_seed_phrases
The function is called to create secret-shared seed phrases.
create_secret_shared_seed_phrases_for_word_list
The function is called to create secret-shared seed phrases.
generate_seed_phrase
The function generates and returns a random seed phrase.
generate_seed_phrase_for_word_list
The function generates and returns a random seed phrase.
reconstruct_seed_phrase
The function is called to reconstruct a seed phrase.
reconstruct_seed_phrase_for_word_list
The function is called to reconstruct a seed phrase.
validate_seed_phrase
The function validates a given seed phrase using the standard word list.
validate_seed_phrase_for_word_list
The function validates a given seed phrase.

Type Aliases§

HarpoResult
A result that contains a HarpoError in the Err case.
SeedPhraseResult
A HarpoResult that encapsulates a SeedPhrase in the Ok case.