Skip to content

Questionable nonce generation #16

@NotAFile

Description

@NotAFile

The generate_nonce function uses a very questionable method for random number generation.

The schema is hmac(math.random() + "random" + os.time(), "keyyy").

I am not familiar with the security requirements for an oauth nonce, but all parts of this are trivially guessable or constant. If the goal is simply to have a unique number, just using e.g. socket.gettime() and/or a counter should be enough, so the complexity of the nonce generation makes me think this might be a poor attempt at generating a secret nonce.

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