| ... | ... | @@ -247,7 +247,7 @@ pub const Ed25519 = struct { |
| 247 | 247 | |
| 248 | 248 | /// Deterministically derive a key pair from a cryptograpically secure secret seed. |
| 249 | 249 | /// |
| 250 | | /// Except in tests, applications should generally call `generate()` instead of this function. |
| 250 | /// To create a new key, applications should generally call `generate()` instead of this function. |
| 251 | 251 | /// |
| 252 | 252 | /// As in RFC 8032, an Ed25519 public key is generated by hashing |
| 253 | 253 | /// the secret key using the SHA-512 function, and interpreting the |
| ... | ... | @@ -290,7 +290,8 @@ pub const Ed25519 = struct { |
| 290 | 290 | /// Note that with EdDSA, storing the seed, and recovering the key pair |
| 291 | 291 | /// from it is recommended over storing the entire secret key. |
| 292 | 292 | /// The seed of an exiting key pair can be obtained with |
| 293 | | /// `key_pair.secret_key.seed()`. |
| 293 | /// `key_pair.secret_key.seed()`, and the secret key can then be |
| 294 | /// recomputed using `SecretKey.generateDeterministic()`. |
| 294 | 295 | pub fn fromSecretKey(secret_key: SecretKey) (NonCanonicalError || EncodingError || IdentityElementError)!KeyPair { |
| 295 | 296 | // It is critical for EdDSA to use the correct public key. |
| 296 | 297 | // In order to enforce this, a SecretKey implicitly includes a copy of the public key. |