Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
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.

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.
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.
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.
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.
The remediation is short, and most of it is already done in a well-maintained estate:
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.
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.
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.
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.
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.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.