Skip to main content

Questions tagged [nonce]

a random number that is only used once. It is generated at the beginning of a communication by one communication partner and has to be sent back by the other one in order to prevent replay attacks.

Filter by
Sorted by
Tagged with
64 votes
3 answers
62k views

When using AES and CBC, is it necessary to keep the IV secret?

If I encrypt some data with a randomly generated Key and Initialization Vector, then store all three pieces of information in the same table row; is it necessary to encrypt the IV as well as the Key? ...
Stu Pegg's user avatar
  • 743
35 votes
4 answers
21k views

Why does the SSL/TLS handshake have a client and server random?

In the SSL handshake both the client and server generate their respective random numbers. The client then generates a pre master secret and encrypts it with the server's public key. However, why can't ...
George Robinson's user avatar
91 votes
4 answers
68k views

What is the use of a client nonce?

After reading Part I of Ross Anderson's book, Security Engineering, and clarifying some topics on Wikipedia, I came across the idea of Client Nonce (cnonce). Ross never mentions it in his book and I'm ...
user2014's user avatar
  • 1,013
38 votes
3 answers
19k views

How long should a random nonce be?

NIST provides good guidelines on the length of keys and hashes for various algorithms. But I don't see anything specifically on the length of a random or pseudo-random nonce (number used once). If ...
nealmcb's user avatar
  • 20.8k
24 votes
2 answers
8k views

Openid connect nonce replay attack

The openid connect specification adds a nonce parameter to the authorize endpoint, which must be echoed back as a claim in the id_token. It claims that the purpose of this parameter is to prevent ...
user3072507's user avatar
6 votes
3 answers
4k views

AES use same Nonce security risk?

If I use AES-GCM and encrypt data with a 128 Bit Key and always use the same Nonce. Is using the same nonce a security risk? Can a hacker guess the Key? Or is the Nonce only to verify that the ...
John Smith's user avatar
19 votes
2 answers
35k views

Purpose of nonce validation in OpenID Connect implicit flow

The OpenID Connect specification requires implicit flow clients to generate and validate a nonce: String value used to associate a Client session with an ID Token, and to mitigate replay attacks. ...
meriton's user avatar
  • 1,488
13 votes
2 answers
14k views

when to use nonce?

I have trouble understanding nonce. I read a very good answer related to nonce by @Thomas Pornin, but it is too complicated for me as I am new to cryptography. From what I know, nonce is used to ...
Loonb's user avatar
  • 293
5 votes
3 answers
3k views

optimal way to salt password?

A good way to salt password? I have read a few answers related to salting password. But I started to get confused. I came across few functions people used to generate salt like: mcrypt_create_iv() ...
Loonb's user avatar
  • 293
3 votes
1 answer
3k views

Replay attack example for validating nonce?

I am trying to validate a JWT token received from Windows Azure. I am following the documentation here: https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-tokens/#validating-...
User52016's user avatar
  • 145
34 votes
1 answer
4k views

How does a nonce reset allow for decryption?

I'm sure that by now most InfoSec-lovers have heard about KRACK. If you haven't, check out this great explaination by a fellow StackExchanger. It's a new attack on WPA2 which allows for decryption ...
FMaz's user avatar
  • 472
12 votes
1 answer
5k views

SSL replay attack when client/server random is missing

Hey studying the SSL protocol, I'm wondering how can someone be able to do a replay attack if the server nonce is missing? All the material I find says that nonces prevent it, but theres no examples ...
ddayan's user avatar
  • 223
9 votes
3 answers
3k views

According to RFC 5246, are nonces in TLS useless (in terms of security) and if yes, why aren't they only random data?

I know the common usage of nonces in security (which is well described in this topic). However, when checking the SSL/TLS protocol, we can notice, according to the RFC, that nonces as ClientHello....
blingbou's user avatar
9 votes
1 answer
4k views

Is it possible to have stateless server nonces in HTTP Digest

When implementing a HTTP Digest server, there's the issue of nonces. Server nonces (as opposed to client nonces) must be issued by the server may be re-used by clients as long as the server allows ...
mogsie's user avatar
  • 255
8 votes
3 answers
3k views

How can salted, hashed password storage be combined with a plaintext, nonce and hash based authentication?

My understanding is as follows: To securely store a password (e.g. in a database), you use a hashing algorithm designed for this purpose (designed to be slow, e.g. bcrypt), and you use a unique salt ...
Tim's user avatar
  • 183
7 votes
3 answers
2k views

chosen plaintext attacks against MD5 and SHA1

According to https://www.rfc-editor.org/rfc/rfc2617#section-4.9, having the server chose a nonce but not having the client chose a nonce opens up Digest Access authentication to chosen plaintext ...
paynes_bay's user avatar
5 votes
2 answers
18k views

nonce in SSL/TLS handshake

In SSL/TLS handshake, a nonce is always sent by the client to server and vice versa. The nonce basically consists of a random number and unix timestamp. Why do we need the unix timestamp? As the ...
asit_dhal's user avatar
  • 169