ArticleslgStudy

science

RC5

RC5 is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand RC5 rather than just read about it. In short: In cryptography, RC5 is a symmetric-key block cipher notable for its simplicity. Designed by Ronald Rivest in 1994, According to Ron Rivest, RC stands for "Ron's Code" but its documentation gives only RC5 as its name.

RC5 — main illustration
RC5 — illustration

Key takeaways

  • RC5 belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect RC5 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of RC5 from memory before moving on to harder problems.

Reference excerpt

In cryptography, RC5 is a symmetric-key block cipher notable for its simplicity. Designed by Ronald Rivest in 1994, According to Ron Rivest, RC stands for "Ron's Code" but its documentation gives only RC5 as its name. The Advanced Encryption Standard (AES) candidate RC6 was based on RC5.

Description Unlike many schemes, RC5 has a variable block size (32, 64 or 128 bits), key size (0 to 2040 bits), and number of rounds (0 to 255). The original suggested choice of parameters were a block size of 64 bits, a 128-bit key, and 12 rounds. A key feature of RC5 is the use of data-dependent rotations; one of the goals of RC5 was to prompt the study and evaluation of such operations as a cryptographic primitive. RC5 also consists of a number of modular additions and eXclusive OR (XOR)s. The general structure of the algorithm is a Feistel-like network, similar to RC2. The encryption and decryption routines can be specified in a few lines of code. The key schedule, however, is more complex, expanding the key using an essentially one-way function with the binary expansions of both e and the golden ratio as sources of "nothing-up-my-sleeve numbers". The tantalising simplicity of the algorithm together with the novelty of the data-dependent rotations has made RC5 an attractive object of study for cryptanalysts. RC5 is basically denoted as RC5-w/r/b where w=word size in bits, r=number of rounds, b=number of bytes in the key.

Algorithm RC5 encryption and decryption both expand the random key into 2(r+1) words that will be used sequentially (and only once each) during the encryption and decryption processes. All of the below comes from Rivest's revised paper on RC5.

Key expansion The key expansion algorithm is illustrated below, first in pseudocode, then example C code copied directly from the reference paper's appendix. Following the naming scheme of the paper, the following variable names are used:

w – The length of a word in bits, typically 16, 32 or 64. Encryption is done in 2-word blocks. u = w/8 – The length of a word in bytes. b – The length of the key in bytes. K[] – The key, considered as an array of bytes (using 0-based indexing). c – The length of the key in words (or 1, if b = 0). L[] – A temporary working array used during key scheduling, initialized to the key in words. r – The number of rounds to use when encrypting data. t = 2(r+1) – the number of round subkeys required. S[] – The round subkey words. Pw – The first magic constant, defined as Odd((e − 2)  ×  2w), where Odd is the nearest odd integer to the given input, e is the base of the natural logarithm, and w is defined above. For common values of w, the associated values of Pw are given here in hexadecimal: For w = 16: 0xB7E1 For w = 32: 0xB7E15163 For w = 64: 0xB7E151628AED2A6B Qw – The second magic constant, defined as Odd((𝜙 − 1)  ×  2w), where Odd is the nearest odd integer to the given input, where 𝜙 is the golden ratio, and w is defined above. For common values of w, the associated values of Qw are given here in hexadecimal: For w = 16: 0x9E37 For w = 32: 0x9E3779B9 For w = 64: 0x9E3779B97F4A7C15

The example source code is provided from the appendix of Rivest's paper on RC5. The implementation is designed to work with w = 32, r = 12, and b = 16.

Encryption Encryption involved several rounds of a simple function, with 12 or 20 rounds seemingly recommended, depending on security needs and time considerations. Beyond the variables used above, the following variables are used in this algorithm:

A, B - The two words composing the block of plaintext to be encrypted.

The example C code given by Rivest is this.

Decryption Decryption is a fairly straightforward reversal of the encryption process. The below pseudocode shows the process.

The example C code given by Rivest is this.

Cryptanalysis Twelve-round RC5 (with 64-bit blocks) is susceptible to a differential attack using 244 chosen plaintexts. 18–20 rounds are suggested as sufficient protection. A number of these challenge problems have been tackled using distributed computing, organised by Distributed.net. Distributed.net has brute-forced RC5 messages encrypted with 56-bit and 64-bit keys and has been working on cracking a 72-bit key since November 3, 2002. As of November 26, 2025, 14.971% of the keyspace has been searched and based on the rate recorded that day, it would take a little more than 43 years to complete 100% of the keyspace. The task has inspired many new and novel developments in the field of cluster computing. RSA Security, which had a (now expired) patent on the algorithm, offered a series of US$10,000 prizes for breaking ciphertexts encrypted with RC5, but these contests were discontinued as of May 2007. As a result, distributed.net decided to fund the monetary prize. The individual who discovers the winning key will receive US$1,000, their team (if applicable) will receive US$1,000, and the Free Software Foundation will receive US$2,000.

See also Madryga Red Pike

References

External links Rivests's revised paper describing the cipher Rivest's original paper SCAN's entry for the cipher RSA Laboratories FAQ — What are RC5 and RC6? Helger Lipmaa's links on RC5

Illustrations

RC5 illustration

Worked examples

Example 1 — a first encounter with RC5

Start with the simplest possible case. Write down what RC5 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to RC5 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about RC5 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of RC5

In research
RC5 appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses RC5 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
RC5 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Block ciphers, Broken block ciphers, so understanding it makes those chapters shorter.
In everyday life
Look for RC5 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study RC5 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what RC5 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain RC5 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is RC5 in simple terms?

In cryptography, RC5 is a symmetric-key block cipher notable for its simplicity. Designed by Ronald Rivest in 1994, According to Ron Rivest, RC stands for "Ron's Code" but its documentation gives only RC5 as its name.

Why does RC5 matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study RC5?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on RC5.

Tags

  • Block ciphers
  • Broken block ciphers

Keep exploring