Skip to content
Advertisement

what is nonce in the api client

I have a API client to make a PHP call. But as a matter of fact the documentation given with the API is very limited, so I don’t really know how to use it. This a part of the API code:

JavaScript

I don’t know what is nonce and how does it works.

Advertisement

Answer

The NIST glossary defines a nonce as follows:

“A time-varying value that has at most a negligible chance of repeating, for example, a random value that is generated anew for each use, a timestamp, a sequence number, or some combination of these.”

Source: https://csrc.nist.gov/glossary/term/nonce

See also:

Nonce values are typically used in security related use-cases to help defend against replay attacks.


It is not obvious (to me) how the nonce should be generated and used for your particular use-case. However, for it to be effective, it needs to be part of the message that is being hashed.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement