A question for cryptography/networking nerds.

To protect from replay attacks, Shadowsocks 2022 requires clients to send a timestamp (in every packet) which servers verify and reject a packet if it differs by more than N minutes from the current server-side time.

TLS 1.3 protects from replays in a different way, it generates a new ephemeral encryption key for every handshake, so any old conversation replay is invalid.

What if i remove timestamp verification in my ss-inspired protocol, and make a key exchange handshake instead?
A handshake packet would be encrypted with a pre-shared key (like every packet in regular ss), server sends a new key in it, and then the rest of the conversation is encrypted with this newly generated psk.

What am i missing? Is this approach safe?

#askfedi #cryptography #infosec

Follow

@darkcat09 sounds good to me. The downside I can think of is the cost of the extra handshake packet. If the entire conversation is short like only a couple of packets, then that could be a significant overhead. But it's good to avoid relying on time, it can easily happen that someone is manipulated into having wrong time.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml