Skip to content

Nonce generation uses insecure random #24

@chethega

Description

@chethega

Consider this line.

This generates a nonce using the default random, which is Mersenne Twister. MT is not a CSPRNG, i.e. the internal state and hence all past and future random numbers can be extracted from a few random numbers from the stream.

The nonce generation should use a secure random instead. For example, const CSPRNG = Random.RandomDevice() and randstring(CSPRNG, length) would do the job.

Cf general discussion (here)[https://github.com/JuliaLang/julia/issues/32954].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions