Skip to content

random() is not suitable for cryptographic use #2

@NikolayS

Description

@NikolayS

https://github.com/pyramation/totp/blob/master/packages/totp/sql/launchql-totp--0.0.3.sql#L121

  • random() is used to generate random values

It is documented that it's not suitable for cryptographic use https://www.postgresql.org/docs/current/functions-math.html:

The random() function uses a simple linear congruential algorithm. It is fast but not suitable for cryptographic applications; see the pgcrypto module for a more secure alternative. If setseed() is called, the series of results of subsequent random() calls in the current session can be repeated by re-issuing setseed() with the same argument.

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