ArticleslgStudy

science

ISO/IEC 9797-1

ISO/IEC 9797-1 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 ISO/IEC 9797-1 rather than just read about it. In short: ISO/IEC 9797-1 Information technology – Security techniques – Message Authentication Codes (MACs) – Part 1: Mechanisms using a block cipher is an international standard that defines methods for calculating a message authentication code (MAC) over data. Rather than defining one specific algorithm, the standard defines a general model from which a variety of specific algorithms can be constructed.

Key takeaways

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

Reference excerpt

ISO/IEC 9797-1 Information technology – Security techniques – Message Authentication Codes (MACs) – Part 1: Mechanisms using a block cipher is an international standard that defines methods for calculating a message authentication code (MAC) over data. Rather than defining one specific algorithm, the standard defines a general model from which a variety of specific algorithms can be constructed. The model is based on a block cipher with a secret symmetric key. Because the standard describes a model rather than a specific algorithm, users of the standard must specify all of the particular options and parameter to be used, to ensure unambiguous MAC calculation.

Model The model for MAC generation comprises six steps:

Padding of the data to a multiple of the cipher block size Splitting of the data into blocks Initial transformation of the first block of data Iteration through the remaining blocks of data Output transformation of the result of the last iteration Truncation of the result to the required length For most steps, the standard provides several options from which to choose, and/or allows some configurability.

Padding The input data must be padded to a multiple of the cipher block size, so that each subsequent cryptographic operation will have a complete block of data. Three padding methods are defined. In each case n is the block length (in bits):

Padding method 1 If necessary, add bits with value 0 to the end of the data until the padded data is a multiple of n. (If the original data was already a multiple of n, no bits are added.)

Padding method 2 Add a single bit with value 1 to the end of the data. Then if necessary add bits with value 0 to the end of the data until the padded data is a multiple of n.

Padding method 3 The padded data comprises (in this order):

The length of the unpadded data (in bits) expressed in big-endian binary in n bits (i.e. one cipher block) The unpadded data As many (possibly none) bits with value 0 as are required to bring the total length to a multiple of n bits It is not necessary to transmit or store the padding bits, because the recipient can regenerate them, knowing the length of the unpadded data and the padding method used.

Splitting The padded data D is split into q blocks D1, D2, ... Dq, each of length n, suitable for the block cipher.

Initial transformation A cryptographic operation is performed on the first block (D1), to create an intermediate block H1. Two initial transformations are defined:

Initial transformation 1 D1 is encrypted with the key K:

H1 = eK(D1)

Initial transformation 2 D1 is encrypted with the key K, and then by a second key K′′:

H1 = eK′′(eK(D1))

Iteration Blocks H2 ... Hq are calculated by encrypting, with the key K, the bitwise exclusive-or of the corresponding data block and the previous H block.

for i = 2 to q Hi = eK(Di ⊕ Hi-1) If there is only one data block (q=1), this step is omitted.

Output transformation A cryptographic operation is (optionally) performed on the last iteration output block Hq to produce the block G. Three output transformations are defined:

Output transformation 1 Hq is used unchanged:

G = Hq

Output transformation 2 Hq is encrypted with the key K′:

G = eK′(Hq)

Output transformation 3 Hq is decrypted with the key K′ and the result encrypted with the key K:

G = eK(dK′(Hq))

Truncation The MAC is obtained by truncating the block G (keeping the leftmost bits, discarding the rightmost bits), to the required length.

Specific algorithms The general model nominally allows for any combination of options for each of the padding, initial transformation, output transformation, and truncation steps. However, the standard defines four particular combinations of initial and output transformation and (where appropriate) key derivation, and two further combinations based on duplicate parallel calculations. The combinations are denoted by the standard as "MAC Algorithm 1" through "MAC Algorithm 6".

MAC algorithm 1 This algorithm uses initial transformation 1 and output transformation 1. Only one key is required, K. (When the block cipher is DES, this is equivalent to the algorithm specified in FIPS PUB 113 Computer Data Authentication.) Algorithm 1 is commonly known as CBC-MAC.

MAC algorithm 2 This algorithm uses initial transformation 1 and output transformation 2. Two keys are required, K and K′, but K′ may be derived from K.

MAC algorithm 3 This algorithm uses initial transformation 1 and output transformation 3. Two independent keys are required, K and K′. Algorithm 3 is also known as Retail MAC.

MAC algorithm 4 This algorithm uses initial transformation 2 and output transformation 2. Two independent keys are required, K and K′, with a third key K′′ derived from K′.

MAC algorithm 5 MAC algorithm 5 comprises two parallel instances of MAC algorithm 1. The first instance operates on the original input data. The second instance operates on two key variants generated from the original key via multiplication in a Galois field. The final MAC is computed by the bitwise exclusive-or of the MACs generated by each instance of algorithm 1. Algorithm 5 is also known as CMAC.

MAC algorithm 6

This algorithm comprises two parallel instances of MAC algorithm 4. The final MAC is the bitwise exclusive-or of the MACs generated by each instance of algorithm 4. Each instance of algorithm 4 uses a different key pair (K and K′) but those four keys are derived from two independent base keys.

Key derivation MAC algorithms 2 (optionally), 4, 5 and 6 require deriving one or more keys from another key. The standard does not mandate any particular method of key derivation, although it does generally mandate that derived keys be different from each other. The standard gives some examples of key derivation methods, such as "complement alternate substrings of four bits of K commencing with the first four bits." This is equivalent to bitwise exclusive-oring each byte of the key with F0 (hex).

Complete specification of the MAC calculation To completely and unambiguously define the MAC calculation, a user of ISO/IEC 9797-1 must select and specify:

The block cipher algorithm e The padding method (1 to 3) The specific MAC algorithm (1 to 6) The length of the MAC The key derivation method(s) if necessary, for MAC algorithms 2, 4, 5 or 6

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with ISO/IEC 9797-1

Start with the simplest possible case. Write down what ISO/IEC 9797-1 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 ISO/IEC 9797-1 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 ISO/IEC 9797-1 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 ISO/IEC 9797-1

In research
ISO/IEC 9797-1 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 ISO/IEC 9797-1 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
ISO/IEC 9797-1 is common in secondary-school and first-year university syllabi. It links to neighbouring topics ISO/IEC 9797, Message authentication codes, so understanding it makes those chapters shorter.
In everyday life
Look for ISO/IEC 9797-1 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ISO/IEC 9797-1” →

Affiliate

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

How to study ISO/IEC 9797-1 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ISO/IEC 9797-1 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 ISO/IEC 9797-1 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ISO/IEC 9797-1 in simple terms?

ISO/IEC 9797-1 Information technology – Security techniques – Message Authentication Codes (MACs) – Part 1: Mechanisms using a block cipher is an international standard that defines methods for calculating a message authentication code (MAC) over data. Rather than defining one specific algorithm, t…

Why does ISO/IEC 9797-1 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 ISO/IEC 9797-1?

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 ISO/IEC 9797-1.

Tags

  • ISO/IEC 9797
  • Message authentication codes

Keep exploring