Skip to content

BIP32: Missing seed bit-length validation in master key generation #6350

Description

@kuliq23

I found that ExtPrivateKey.apply does not provide any seed bit-length checks.

However, minimum and maximum bit-length constraints are defined in BIP32.

Generate a seed byte sequence S of a chosen length (between 128 and 512 bits; 256 bits is advised) from a (P)RNG.

I wonder whether there is a specific reason for this not being enforced.

This was discovered using the bitcoinfuzz tool, leveraging the Bitcoin-S master key generation fuzzing target implemented by @guptapratykshh. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcorework for the core project

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions