-
Notifications
You must be signed in to change notification settings - Fork 866
Open
Description
Hi,
While looking around the KeyPath implementation, because of #1258, I've stumbled upon the Increment method.
Consider the following examples:
Console.WriteLine(masterPrivateKey.Derive(KeyPath.Parse("2147483647'").Increment()) == masterPrivateKey.Derive(KeyPath.Parse("0"))); //
Console.WriteLine(masterPrivateKey.Derive(KeyPath.Parse("2147483647").Increment()) == masterPrivateKey.Derive(KeyPath.Parse("0'"))); //Incrementing a child key seems like a benign and usable feature. However, crossing non-hardened and hardened boundaries silently seems like asking for an unexpected behavior somewhere down the line. Generally, key-reuse and thus address reuse is bad for privacy. Just the API cannot defend against an address reuse, but still I would definitely err on the side of caution and stop incrementing, when crossing both boundaries.
Increment is being used. However, I did not find it being used in any of the top projects listed in your README.md.
Metadata
Metadata
Assignees
Labels
No labels