Skip to content

Commit b103d51

Browse files
Update doc for seed mod
1 parent 1bcfa53 commit b103d51

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/seed.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
use bip39::{Language, Mnemonic, MnemonicType};
22

33
/// Seed phrase generation function
4+
///
5+
/// The private key can be generated from some random seed phrase using hashing functions. The public key is obtained from the private key using an elliptic curve multiplication. Account address is obtained from the public key. All these transformations are unidirectional. The opposite direction is almost impossible in terms of the required computations.
6+
///
7+
/// The secret phrase (a.k.a. seed phrase, backup phrase) can be any combination of symbols, words, or bytes. Waves wallet apps typically use a random set of 15 English words out of 2048 words available. Using such a phrase is secure: the probability of generating two identical seed phrases is 1/204815, so brute-force will take millions of years on an average CPU. The point of using a secret phrase (rather than a private key) is to simplify user experience: the secret phrase is much easier to write down or remember.
8+
///
9+
/// Example of a secret phrase:
10+
/// ```plain_text
11+
/// body key praise enter toss road cup result shrimp bus blame typical sphere pottery claim
12+
/// ```
13+
///
414
/// # Usage
515
/// ```
616
/// use wavesplatform::seed::*;

0 commit comments

Comments
 (0)