ArticleslgStudy

science

MMH-Badger MAC

MMH-Badger MAC 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 MMH-Badger MAC rather than just read about it. In short: Badger is a message authentication code (MAC) based on the idea of universal hashing and was developed by Boesgaard, Scavenius, Pedersen, Christensen, and Zenner. It is constructed by strengthening the ∆-universal hash family MMH using an ϵ-almost strongly universal (ASU) hash function family after the application of ENH (see below), where the value of ϵ is 1/(232−5).

Key takeaways

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

Reference excerpt

Badger is a message authentication code (MAC) based on the idea of universal hashing and was developed by Boesgaard, Scavenius, Pedersen, Christensen, and Zenner. It is constructed by strengthening the ∆-universal hash family MMH using an ϵ-almost strongly universal (ASU) hash function family after the application of ENH (see below), where the value of ϵ is 1/(232−5). Since Badger is a MAC function based on the universal hash function approach, the conditions needed for the security of Badger are the same as those for other universal hash functions such as UMAC.

Introduction The Badger MAC processes a message of length up to 264−1 bits and returns an authentication tag of length u⋅32 bits, where 1≤u≤5. According to the security needs, user can choose the value of u, that is the number of parallel hash trees in Badger. One can choose larger values of u, but those values do not influence further the security of MAC. The algorithm uses a 128-bit key and the limited message length to be processed under this key is 264. The key setup has to be run only once per key in order to run the Badger algorithm under a given key, since the resulting internal state of the MAC can be saved to be used with any other message that will be processed later.

ENH Hash families can be combined in order to obtain new hash families. For the ϵ-AU, ϵ-A∆U, and ϵ-ASU families, the latter are contained in the former. For instance, an A∆U family is also an AU family, an ASU is also an A∆U family, and so forth. On the other hand, a stronger family can be reduced to a weaker one, as long as a performance gain can be reached. A method to reduce ∆-universal hash function to universal hash functions will be described in the following. Theorem 2 Let H△ be an ϵ-AΔU hash family from a set A to a set B. Consider a message (m,mb)∈A×B. Then the family H consisting of the functions h(m,mb)=H△(m)+mb is ϵ-AU. If m≠m′, then the probability that h(m,mb)=h(m′,m'b) is at most ϵ, since H△ is an ϵ-A∆U family. If m=m′ but mb≠mb′, then the probability is trivially 0. The proof for Theorem 2 was described in The ENH-family is constructed based on the universal hash family NH (which is also used in UMAC):

NHK(M)=∑i=1ℓ2(k(2i−1)+wm(2i−1))×(k2i+wm2i)mod22w Where '+w' means 'addition modulo 2w', and mi,ki∈{0,…,2w−1}. It is a 2−w-A∆U hash family. Lemma 1 The following version of NH is 2−w-A∆U:

NHK(M)=(k1+wm1)×(k2+wm2)mod22w Choosing w=32 and applying Theorem 1, one can obtain the 2−32-AU function family ENH, which will be the basic building block of the badger MAC:

ENHk1,k2(m1,m2,m3,m4)=(m1+32k1)(m2+32k2)+64m3+64232m4 where all arguments are 32-bits long and the output has 64-bits.

Construction Badger is constructed using the strongly universality hash family and can be described as

ℋ=H∗×F, where an ϵH∗-AU universal function family H* is used to hash messages of any size onto a fixed size and an ϵF-ASU function family F is used to guarantee the strong universality of the overall construction. NH and ENH are used to construct H*. The maximum input size of the function family H* is 264−1 and the output size is 128 bits, split into 64 bits each for the message and the hash. The collision probability for the H*-function ranges from 2−32 to 2−26.14. To construct the strongly universal function family F, the ∆-universal hash family MMH* is transformed into a strongly universal hash family by adding another key.

Two steps on Badger There are two steps that have to be executed for every message: processing phase and finalize phase.

Processing phase In this phase, the data is hashed to a 64-bit string. A core function h : {0,1}64×{0,1}128→{0,1}64 is used in this processing phase, that hashes a 128-bit string m2∥m1 to a 64-bit string h(k,m2,m1) as follows:

h(k,m2,m1)=(L(m1)+32L(k))⋅(U(m1)+32U(k))+64m2 for any n, +n means addition modulo 2n. Given a ⁠2n⁠-bit string x, ⁠L(x)⁠ means least significant n bits, and ⁠U(x)⁠ means most significant n bits. A message can be processed by using this function. Denote level_key[j][i] by kji. Pseudo-code of the processing phase is as follow.

L = |M| if L = 0 M1=⋯=Mu=0 Go to finalization r = L mod 64 if r ≠ 0: M=064−r∥M for i = 1 to u: Mi=M v′=max⁡{1,⌈log2L⌉−6} for j = 1 to v′: divide ⁠Mi⁠ into 64-bit blocks, ⁠Mi=mti∥⋯∥m1i⁠ if t is even: ⁠Mi=h(kji,mti,mt−1i)∥⋯∥h(kji,m2i,m1i)⁠ else ⁠Mi=mti∥h(kji,mt−1i,mt−2i)∥⋯∥h(kji,m2i,m1i)⁠

Finalize phase In this phase, the 64-string resulting from the processing phase is transformed into the desired MAC tag. This finalization phase uses the Rabbit stream cipher and uses both key setup and IV setup by taking the finalization key final_key[j][i] as kji. Pseudo-code of the finalization phase

RabbitKeySetup(K) RabbitIVSetup(N) for i = 1 to u: Qi=07∥L∥Mi divide ⁠Qi⁠ into 27-bit blocks, Qi=q5i∥⋯∥q1i Si=(∑j=15(qjiKji))+K6imodp S=Su∥⋯∥S1 S = S ⨁ RabbitNextbit(u∙32) return S

Notation From the pseudocode above, k denotes the key in the Rabbit Key Setup(K) which initializes Rabbit with the 128-bit key k. M denotes the message to be hashed and |M| denotes the length of the message in bits. ⁠qi⁠ denotes a message M that is divided into i blocks. For the given ⁠2n⁠-bit string x then L(x) and U(x) respectively denoted its least significant n bits and most significant n bits.

Performance Boesgard, Christensen and Zenner report the performance of Badger measured on a 1.0 GHz Pentium III and on a 1.7 GHz Pentium 4 processor. The speed-optimized versions were programmed in assembly language inlined in C and compiled using the Intel C++ 7.1 compiler. The following table presents Badger's properties for various restricted message lengths. "Memory req." denotes the amount of memory required to store the internal state including key material and the inner state of the Rabbit stream cipher . "Setup" denotes the key setup, and "Fin." denotes finalization with IV-setup.

MMH (Multilinear Modular Hashing) The name MMH stands for Multilinear-Modular-Hashing. Applications in Multimedia are for example to verify the integrity of an on-line multimedia title. The performance of MMH is based on the improved support of integer scalar products in modern microprocessors. MMH uses single precision scalar products as its most basic operation. It consists of a (modified) inner product between the message and a key modulo a prime p. The construction of MMH works in the finite field Fp for some prime integer p.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with MMH-Badger MAC

Start with the simplest possible case. Write down what MMH-Badger MAC 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 MMH-Badger MAC 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 MMH-Badger MAC 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 MMH-Badger MAC

In research
MMH-Badger MAC 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 MMH-Badger MAC 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
MMH-Badger MAC is common in secondary-school and first-year university syllabi. It links to neighbouring topics Message authentication codes, so understanding it makes those chapters shorter.
In everyday life
Look for MMH-Badger MAC 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 “MMH-Badger MAC” →

How to study MMH-Badger MAC in 20 minutes

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

Frequently asked questions

What is MMH-Badger MAC in simple terms?

Badger is a message authentication code (MAC) based on the idea of universal hashing and was developed by Boesgaard, Scavenius, Pedersen, Christensen, and Zenner. It is constructed by strengthening the ∆-universal hash family MMH using an ϵ-almost strongly universal (ASU) hash function family after…

Why does MMH-Badger MAC 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 MMH-Badger MAC?

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 MMH-Badger MAC.

Tags

  • Message authentication codes

Keep exploring