# Questions tagged as ['nonce']

A "nonce" is an arbitrary number or string used only once within the context of a specific cryptographic scheme. Nonces are used e.g. in authentication protocols to prevent replay attacks, as well as in stream ciphers (including CTR mode) to avoid keystream reuse.
Score: 2
Short Nonces in ECDSA signature generation

Recently I noticed that my device generates short-sized `Nonces`.

Approximately $$2 ^ {243} - 2^{244}$$.

Could it turn out that there will be a small leak of information about the first 3 bits of `Nonces`?

Accordingly, if `Nonces` is short, then it must contain null at the beginning. That is, the first 3 bits of `Nonces` contain null at the beginning.

Hence, for the sake of safety:

When creating an ECDSA signatur ...

Score: 1
Signing same message 2 times with ECDSA

Can multiple signatures of the same message with the same private key (different nonces) lead to a private key trace?

Score: 2
Is it insecure to make nonce using random number generator and hashing algorythm with secret key like HMAC?

I'm building a project on Arduino Mega microcontroller and I need some nonce generator for challenge-response exchange. But I failed to find some alphanumerical string generators. Then I came up with an idea to make one using the `random()` function that generates random int in limit you give and hash that integer with HMAC using another secret key (one that could be auto-generated on startup since it  ...

Score: 1
Can a nonce be completely random on (simplified) Needham–Schroeder Protocol?

From what I've read so far, nonces are random one-time values, which are sent in plaintext in addition to the ciphertext to verify identity of sender/receiver. Theoretically, if the nonce is random, an attacker E can intercept Alice's message which was designated to Bob, and impersonate as Bob by generating a random nonce, without ever communicating with Bob.

So if the request-response protocol i ...

Score: 1
Incrementing nonces vs regular nonces?

I have recently been studying up on the lorawan protocol for IoT devices.

LoraWAN has a handshake, and then communication can commense. Messages are encrypted and MAC'ed. When encryption and MAC's are made, the values `FCntUp` and `FCntDown` are mixed in. `FCntUp` is used for Uplink messages, while `FCntDown` is for downlink.

Both of the values start at 0, and increment with every message, and then reset every s ...

Score: 1
How safe is store nonce with encrypted text?

I am using `AESGCM256` with a nonce of 96 bytes to store keys (very secret information). There are more than 500 keys, the only place where they can be stored in decrypted form is the application RAM.

Now, when the application is launched, the user enters one decryption key and a nonce for each key. This is very uncomfortable, all the `nonce` are stored separately from the database where the encrypted ke ...

Score: 0
How to use nonce, counter, and IV in AES-256-CTR?

preface: i am not cryptographically savvy. there are similar questions on this board but they do not give the answer i need.

how do i construct a valid IV, given a nonce? What does this have to do with a counter?

im doing 2-way communication with a bluetooth module (it is the server to my phone's client) and its data is encrypted using AES-256-CTR with a 32B key and a 128-bit (16B) counter. after succe ...