Skip to content

Incomplete entropy: RNG doesn't include 0xff bytes #67

@MatthewLM

Description

@MatthewLM

For Random.nextInt(int max), max is exclusive (https://api.dart.dev/stable/2.14.4/dart-math/Random/nextInt.html). This means the _randomBytes() function (https://github.com/dart-bitcoin/bitcoin_flutter/blob/master/lib/src/ecpair.dart#L92) does not include 255. _SIZE_BYTE should be 256.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions