Bloom filter to prevent replay attacks in signed HTTP requests

I’m thinking about an authentication sheme of a REST API in a setting where the only thing the server stores about a client, is their public key (the asymmetric encryption scheme should not matter). So I’ve come up with a scheme where the … Continue reading Bloom filter to prevent replay attacks in signed HTTP requests

AEAD and nonces explained in layman’s terms (Symmetric encryption example using Libsodium)

After almost 4 days of work, I’ve finally gotten Libsodium crypto_aead_xchacha20poly1305_ietf_encrypt to work and produce the same result in JavaScript and PHP.

But I’m confused.

The PHPDoc describes the parameters as:

* @… Continue reading AEAD and nonces explained in layman’s terms (Symmetric encryption example using Libsodium)

If we use only client nonce and not server nonce, which attack vectors become possible?

As we all know, nonce is needed to prevent replay attacks. Everywhere I read about nonce, I see that client always fetches one from the server, and, to improve security even more, it also can add its own client nonce (cnonce)… Continue reading If we use only client nonce and not server nonce, which attack vectors become possible?

Why is salt+nonce authentication over insecure channel vulnerable to man-in-the-middle attack?

In a network connection over an insecure channel I do the following:

Server sends database salt and a nonce to the client;
Client computes and sends hash(hash(pwd + salt) + nonce);
Server computes hash(db_pwd_hash + nonce) and compares it… Continue reading Why is salt+nonce authentication over insecure channel vulnerable to man-in-the-middle attack?