Brute-force attack
![](http://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Board300.jpg/260px-Board300.jpg)
In cryptography, a brute-force attack, or exhaustive key search, is a strategy that can, in theory, be used against any encrypted data[1][page needed] (except for data encrypted in an information-theoretically secure manner). Such an attack might be utilized when it is not possible to take advantage of other weaknesses in an encryption system (if any exist) that would make the task easier. It involves systematically checking all possible keys until the correct key is found. In the worst case, this would involve traversing the entire search space.
The key length used in the encryption determines the practical feasibility of performing a brute-force attack, with longer keys exponentially more difficult to crack than shorter ones. Brute-force attacks can be made less effective by obfuscating the data to be encoded, something that makes it more difficult for an attacker to recognise when he/she has cracked the code. One of the measures of the strength of an encryption system is how long it would theoretically take an attacker to mount a successful brute-force attack against it.
Brute-force attacks are an application of brute-force search, the general problem-solving technique of enumerating all candidates and checking each one.
Theoretical limits
The resources required for a brute-force attack grow exponentially with increasing key size, not linearly. As a result, doubling the key size for an algorithm does not simply double the required number of operations, but rather squares them. Although US export regulations historically restricted key lengths to 56-bit symmetric keys (e.g. Data Encryption Standard), these restrictions are no longer in place, so modern symmetric algorithms typically use computationally stronger 128- to 256-bit keys.
There is a physical argument that a 128-bit symmetric key is computationally secure against brute-force attack. The so-called Landauer limit implied by the laws of physics sets a lower limit on the energy required to perform a computation of kT · ln 2 per bit erased in a computation, where T is the temperature of the computing device in kelvins, k is the Boltzmann constant, and the natural logarithm of 2 is about 0.693. No irreversible computing device can use less energy than this, even in principle.[2] Thus, in order to simply flip through the possible values for a 128-bit symmetric key (ignoring doing the actual computing to check it) would theoretically require 2128 − 1 bit flips on a conventional processor. If it is assumed that the calculation occurs near room temperature (~300 K) the Von Neumann-Landauer Limit can be applied to estimate the energy required as ~1018 joules, which is equivalent to consuming 30 gigawatts of power for one year. This is equal to 30×109 W×365×24×3600 s = 9.46×1017 J or 262.7 TWh (more than 1/100th of the world energy production). The full actual computation—checking each key to see if you have found a solution—would consume many times this amount.
However, this argument assumes that the register values are changed using conventional set and clear operations which inevitably generate entropy. It has been shown that computational hardware can be designed not to encounter this theoretical obstruction (see reversible computing), though no such computers are known to have been constructed.[citation needed]
![](http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/ATI_Radeon_HD_5770_Graphics_Card-oblique_view.jpg/220px-ATI_Radeon_HD_5770_Graphics_Card-oblique_view.jpg)
As commercial available successors of governmental ASICs Solution also known as custom hardware attack, today two emerging technologies have proven their capability in the brute-force attack of certain ciphers. One is modern graphics processing unit (GPU) technology,[3][page needed] the other is the field-programmable gate array (FPGA) technology. GPUs benefit from their wide availability and price-performance benefit, FPGAs from their energy efficiency per cryptographic operation. Both technologies try to transport the benefits of parallel processing to brute-force attacks. In case of GPUs some hundreds, in the case of FPGA some thousand processing units making them much better suited to cracking passwords than conventional processors. Various publications in the fields of cryptographic analysis have proved the energy efficiency of today’s FPGA technology, for example, the COPACOBANA FPGA Cluster computer consumes the same energy as a single PC (600 W), but performs like 2,500 PCs for certain algorithms. A number of firms provide hardware-based FPGA cryptographic analysis solutions from a single FPGA PCI Express card up to dedicated FPGA computers.[citation needed] WPA and WPA2 encryption have successfully been brute-force attacked by reducing the workload by a factor of 50 in comparison to conventional CPUs[4][5] and some hundred in case of FPGAs.
AES permits the use of 256-bit keys. Breaking a symmetric 256-bit key by brute force requires 2128 times more computational power than a 128-bit key. A device that could check a billion billion (1018) AES keys per second (if such a device could ever be made - as of 2012, supercomputers have computing capacities of 0.02 Peta-FLOPS, see Titan. So 50 supercomputers would be required to process (1018) operations per second) would in theory require about 3×1051 years to exhaust the 256-bit key space.
An underlying assumption of a brute-force attack is that the complete keyspace was used to generate keys, something that relies on an effective random number generator, and that there are no defects in the algorithm or its implementation. For example, a number of systems that were originally thought to be impossible to crack by brute force have nevertheless been cracked because the key space to search through was found to be much smaller than originally thought, because of a lack of entropy in their pseudorandom number generators. These include Netscape's implementation of SSL (famously cracked by Ian Goldberg and David Wagner in 1995[6]) and a Debian/Ubuntu edition of OpenSSL discovered in 2008 to be flawed.[7] A similar lack of implemented entropy lead to the breaking of Enigma's code.[8][9]
Credential recycling
Credential recycling refers to the hacking practice to re-use username and password combinations gathered in previous brute-force attacks. A special form of credential recycling is Pass the hash where credentials are stolen, not brute forced.
Unbreakable codes
Certain types of encryption, by their mathematical properties, cannot be defeated by brute force. An example of this is one-time pad cryptography, where every cleartext bit has a corresponding key bit. One-time pads rely on the ability to generate a truly random sequence of key bits. A brute-force attack would eventually reveal the correct decoding, but also every other possible combination of bits, and would have no way of distinguishing one from the other. A small, 100-byte, one-time-pad–encoded string subjected to a brute-force attack would eventually reveal every 100-byte string possible, including the correct answer, but mostly nonsense. Of all the answers given, there is no way of knowing which is the correct one. Nevertheless, the system can be defeated if not implemented correctly, for example if one-time pads are re-used or intercepted.[10]
A similar argument can apply when a single plaintext is encrypted by any method where the text is shorter than the key. For example, if the text is a single byte, then (for most types of encryption with large key sizes such as 128 bits) all bytes from "00"-"FF" will appear, with equal probability, as possible plaintexts corresponding to guessed keys.
A truly unbreakable code must not have an obtainable key. A theory for this is for the code breaker to not realize that he has broken the code even if he has the key. For example, the key and cleartext may change according to a random time variable so that even when the code has been broken the encrypted text could still represent any other meaning. This is however very impractical and has never been able to be put into affect.
Countermeasures
In case of an offline attack where the attacker has access to the encrypted material, he can try key combinations at his leisure without the risk of discovery or interference. However database and directory administrators can take countermeasures against online attacks, for example by limiting the number of attempts that a password can be tried, by introducing time delays between successive attempts, increasing the answer's complexity (e.g. requiring a CAPTCHA answer or verification code sent via cellphone), and/or locking accounts out after unsuccessful logon attempts.[11][page needed] Website administrators may prevent a particular IP address from trying more than a predetermined number of password attempts against any account on the site.[12]
See also
- Cryptographic key length for a fuller discussion of recommended key sizes for symmetric and asymmetric algorithms.
- Distributed.net
- MD5CRK
- Metasploit Express for brute-forcing SMB, Postgres, DB2, MySQL, MSSQL, HTTP, SSH, Telnet & Tomcat
- Side-channel attack
- TWINKLE and TWIRL
- Unicity distance
- RSA Factoring Challenge
- Bitcoin mining
Footnotes
- ^ Paar 2010.
- ^ Landauer 1961, p. 183-191.
- ^ Graham 2011.
- ^ Kingsley-Hughes 2008.
- ^ Kamerling 2007.
- ^ Viega 2002, p. 18.
- ^ CERT-2008.
- ^ Ellis.
- ^ NSA-2009.
- ^ Reynard 1997, p. 86.
- ^ Burnett 2004.
- ^ Ristic 2010, p. 136.
References
- Adleman, Leonard M.; Roweis, Sam; Winfree, Erik (June 10–12). On Applying Molecular Computation To The Data Encryption Standard. Proceedings of the Second Annual Meeting on DNA Based Computers. Princeton University.
{{cite conference}}
:|first2=
missing|last2=
(help); Check date values in:|date=
and|year=
/|date=
mismatch (help); Invalid|ref=harv
(help); Unknown parameter|,last2=
ignored (help) - Cracking DES — Secrets of Encryption Research, Wiretap Politics & Chip Design. Electronic Frontier Foundation. ISBN 1-56592-520-3.
{{cite book}}
: Invalid|ref=harv
(help) - Burnett, Mark; Foster, James C. (2004). Hacking the Code: ASP.NET Web Application Security. Syngress. ISBN 1-932266-65-8.
{{cite book}}
: Invalid|ref=harv
(help) - Diffie, W.; Hellman, M.E. (1977). "Exhaustive Cryptanalysis of the NBS Data Encryption Standard". Computer. 10.
{{cite journal}}
: Invalid|ref=harv
(help) - Graham, Robert David (22 June 2011). "Password cracking, mining, and GPUs". erratasec.com. Retrieved 17 August 2011.
{{cite web}}
: Invalid|ref=harv
(help) - Ellis, Claire. "Exploring the Enigma". Plus Magazine.
{{cite web}}
: Invalid|ref=harv
(help) - Kamerling, Erik (2007-11-12). "Elcomsoft Debuts Graphics Processing Unit (GPU) Password Recovery Advancement". Symantec.
{{cite web}}
: Invalid|ref=harv
(help) - Kingsley-Hughes, Adrian (2008-10-12). "ElcomSoft uses NVIDIA GPUs to Speed up WPA/WPA2 Brute-force Attack". ZDNet.
{{cite news}}
: Invalid|ref=harv
(help) - Landauer, L (1961). "Irreversibility and Heat Generation in the Computing Process". IBM Journal of Research and Development. 5.
{{cite journal}}
: Invalid|ref=harv
(help) - Paar, Christof; Pelzl, Jan; Preneel, Bart (2010). Understanding Cryptography: A Textbook for Students and Practitioners. Springer. p. 7. ISBN 3-642-04100-0.
{{cite book}}
: Invalid|ref=harv
(help) - Reynard, Robert (1997). Secret Code Breaker II: A Cryptanalyst's Handbook. Jacksonville, FL: Smith & Daniel Marketing. ISBN 1-889668-06-0. Retrieved 2008-09-21.
{{cite book}}
: Invalid|ref=harv
(help) - Ristic, Ivan (2010). Modsecurity Handbook. Feisty Duck. ISBN 1-907117-02-4.
{{cite book}}
: Invalid|ref=harv
(help) - Viega, John; Messier, Matt; Chandra, Pravir (2002). Network Security with OpenSSL. O'Reilly. ISBN 0-596-00270-X. Retrieved 2008-11-25.
{{cite book}}
: Invalid|ref=harv
(help) - Wiener, Michael J. (1996). "Crypto 93". Practical Cryptography for Data Internetworks. W. Stallings, editor, IEEE Computer Society Press.
{{cite journal}}
: Invalid|ref=harv
(help) - "Technical Cyber Security Alert TA08-137A: Debian/Ubuntu OpenSSL Random Number Generator Vulnerability". United States Computer Emergency Readiness Team (CERT). 2008-05-16. Retrieved 2008-08-10.
- "NSA's How Mathematicians Helped Win WWII". National Security Agency. 15 Jan 2009.
External links
- RSA-sponsored DES-III cracking contest
- How We Cracked the Code Book Ciphers - Essay by the winning team of the challenge in The Code Book