Struct baru::Wallet[][src]

pub struct Wallet { /* fields omitted */ }

Implementations

Encrypts the extended private key with the encryption key.

Choice of nonce

We store the extended private key on disk and as such have to use a constant nonce, otherwise we would not be able to decrypt it again. The encryption only happens once and as such, there is conceptually only one message and we are not “reusing” the nonce which would be insecure.

Derive the blinding key.

Choice of salt

We choose to not add a salt because the ikm is already a randomly-generated, secret value with decent entropy.

Choice of ikm

We derive the blinding key from the secret key to avoid having to store two secret values on disk.

Choice of info

We choose to tag the derived key with b"BLINDING_KEY" in case we ever want to derive something else from the secret key.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.