Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is the Raccoon Attack?

The Raccoon attack is a timing side channel against Diffie-Hellman in TLS, caused by the specification stripping leading zero bytes from the premaster secret before key derivation.

Illustration for the cybersecurity term Raccoon Attack
Home / Blog / Cybersecurity Terms / What Is the Raccoon Attack?
17 November 2026

What Is the Raccoon Attack?

What Is the Raccoon Attack?

The Raccoon attack is a timing side channel in the TLS protocol, published in September 2020 by researchers from Ruhr University Bochum, Tel Aviv University, and the University of Paderborn. It allows an attacker who can observe traffic and make repeated measurements to recover the premaster secret of a Diffie-Hellman handshake, and with it decrypt the session. It is unusually interesting for a reason that has nothing to do with its practicality: the flaw is in the specification itself, not in any implementation.

The Specification Bug

In a finite-field Diffie-Hellman exchange, both parties compute a shared value and use it as the premaster secret, from which the session keys are derived. TLS versions up to and including 1.2 specify that this value must be encoded as an integer with leading zero bytes removed.

That single instruction creates the problem. Roughly one time in 256 the shared secret begins with a zero byte, which is then stripped, producing a premaster secret one byte shorter than usual. The key derivation function processes a shorter input, which takes marginally less time. The duration of the handshake therefore leaks information about the first byte of a secret that is supposed to be opaque.

Every correct implementation of TLS 1.2 behaves this way, because the specification requires it. There was nothing for a careful developer to get right.

Turning a Timing Difference Into a Key

The leak is tiny, and exploiting it is substantial work. The attacker records a target handshake they wish to decrypt, then sends the server many crafted handshakes whose values are mathematically related to the recorded one, measuring the response time of each. Each measurement tells them whether a particular related secret had a leading zero. The collected results are expressed as a hidden number problem and solved with lattice reduction to recover the original premaster secret.

The decisive precondition is key reuse. The server must use the same Diffie-Hellman private key across many connections, because otherwise each measurement relates to a different secret and nothing accumulates. TLS does not require ephemeral keys to be genuinely ephemeral, and some servers reused them for performance reasons—OpenSSL before version 1.0.2f did so by default with the SSL_OP_SINGLE_DH_USE option unset, tracked as CVE-2020-1968, and F5 BIG-IP products were affected under CVE-2020-5929.

How Realistic Is It?

Honestly, not very, and the researchers said so. The attack requires a server that reuses Diffie-Hellman keys, a very large number of precise timing measurements, network conditions stable enough for microsecond-level differences to survive, and considerable computation. No exploitation in the wild has been reported.

Its value is as a reminder of two things. First, cryptographic protocol design can introduce side channels that no implementation can avoid, which is an argument for formal analysis of specifications rather than only of code. Second, performance optimisations in cryptography—reusing a key to save a modular exponentiation—have a habit of becoming security problems years later.

What to Do

The remediation is short, and most of it is already done in a well-maintained estate:

Where It Sits

Raccoon joins POODLE, ROBOT, and the Lucky Thirteen attack as a demonstration that the pre-TLS 1.3 protocol carried a long accumulation of awkward design decisions. TLS 1.3 removed most of them by deleting options rather than fixing them: no CBC cipher suites, no RSA key transport, no custom Diffie-Hellman groups, no renegotiation. That simplification is the real defence, and it is why migrating TLS endpoints forward has security value beyond any single advisory.

At Privia Security, our Network Security Services include protocol configuration review across web, mail, and VPN endpoints, where legacy key exchange settings tend to persist longest.

FAQ – Frequently Asked Questions

Is the Raccoon Attack Exploitable in Practice?

Barely. It needs a server that reuses its Diffie-Hellman private key across connections, an enormous number of precise timing measurements, stable network conditions, and significant computational effort to solve the resulting hidden number problem. No real-world exploitation has been reported. It matters as a protocol design lesson and as a reason to disable key reuse rather than as an active threat.

Does TLS 1.3 Fix It?

Yes, completely. TLS 1.3 encodes the shared secret at a fixed length rather than stripping leading zero bytes, so the timing difference that creates the side channel does not exist. It also removes static Diffie-Hellman key exchange and restricts the protocol to vetted named groups, which closes several other problems in the same family at once.

What Is Diffie-Hellman Key Reuse and Why Is It a Problem?

Ephemeral Diffie-Hellman is meant to generate a fresh private key for every connection, which is what provides forward secrecy. Some servers reused the same key across many connections to save computation. That turns a per-connection secret into a long-lived one, allowing an attacker to accumulate measurements against it and removing the forward secrecy the exchange was chosen for.

How Do We Check Our Servers?

Scan with testssl.sh or sslyze, which report the supported protocol versions and key exchange methods. Confirm TLS 1.2 and 1.3 are offered, that finite-field Diffie-Hellman suites are either removed or using a unique 2,048-bit group, and that ECDHE is preferred. Also verify that OpenSSL and load balancer firmware are current, since the key reuse behaviour was fixed in software.

Related Terms

You May Be Interested In These

What Is Multi-Factor Authentication (MFA)?

Cybersecurity Terms

17 November 2026

What Is Multi-Factor Authentication (MFA)?

Read More
What Was the 3CX Supply Chain Attack?

Cybersecurity Terms

17 November 2026

What Was the 3CX Supply Chain Attack?

Read More
What Is a Correlation Rule?

Cybersecurity Terms

17 November 2026

What Is a Correlation Rule?

Read More