ArticleslgStudy

mathematics

LSH (hash function)

LSH (hash function) is a mathematics 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 LSH (hash function) rather than just read about it. In short: LSH is a cryptographic hash function designed in 2014 by South Korea to provide integrity in general-purpose software environments such as PCs and smart devices. LSH is one of the cryptographic algorithms approved by the Korean Cryptographic Module Validation Program (KCMVP).

LSH (hash function) — main illustration
LSH (hash function) — illustration

Key takeaways

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

Reference excerpt

LSH is a cryptographic hash function designed in 2014 by South Korea to provide integrity in general-purpose software environments such as PCs and smart devices. LSH is one of the cryptographic algorithms approved by the Korean Cryptographic Module Validation Program (KCMVP). And it is the national standard of South Korea (KS X 3262).

Specification The overall structure of the hash function LSH is shown in the following figure.

The hash function LSH has the wide-pipe Merkle-Damgård structure with one-zeros padding. The message hashing process of LSH consists of the following three stages.

Initialization: One-zeros padding of a given bit string message. Conversion to 32-word array message blocks from the padded bit string message. Initialization of a chaining variable with the initialization vector. Compression: Updating of chaining variables by iteration of a compression function with message blocks. Finalization: Generation of an n {\displaystyle n} -bit hash value from the final chaining variable.

The specifications of the hash function LSH are as follows.

Initialization Let m {\displaystyle m} be a given bit string message. The given m {\displaystyle m} is padded by one-zeros, i.e., the bit ‘1’ is appended to the end of m {\displaystyle m} , and the bit ‘0’s are appended until a bit length of a padded message is 32 w t {\displaystyle 32wt} , where t = ⌈ ( | m | + 1 ) / 32 w ⌉ {\displaystyle t=\lceil (|m|+1)/32w\rceil } and ⌈ x ⌉ {\displaystyle \lceil x\rceil } is the smallest integer not less than x {\displaystyle x} . Let m p = m 0 ‖ m 1 ‖ … ‖ m ( 32 w t − 1 ) {\displaystyle m_{p}=m_{0}\|m_{1}\|\ldots \|m_{(32wt-1)}} be the one-zeros-padded 32 w t {\displaystyle 32wt} -bit string of m {\displaystyle m} . Then m p {\displaystyle m_{p}} is considered as a 4 w t {\displaystyle 4wt} -byte array m a = ( m [ 0 ] , … , m [ 4 w t − 1 ] ) {\displaystyle m_{a}=(m[0],\ldots ,m[4wt-1])} , where m [ k ] = m 8 k ‖ m ( 8 k + 1 ) ‖ … ‖ m ( 8 k + 7 ) {\displaystyle m[k]=m_{8k}\|m_{(8k+1)}\|\ldots \|m_{(8k+7)}} for all 0 ≤ k ≤ ( 4 w t − 1 ) {\displaystyle 0\leq k\leq (4wt-1)} . The 4 w t {\displaystyle 4wt} -byte array m a {\displaystyle m_{a}} converts into a 32 t {\displaystyle 32t} -word array M = ( M [ 0 ] , … , M [ 32 t − 1 ] ) {\displaystyle {\textsf {M}}=(M[0],\ldots ,M[32t-1])} as follows.

M [ s ] ← m [ w s / 8 + ( w / 8 − 1 ) ] ‖ … ‖ m [ w s / 8 + 1 ] ‖ m [ w s / 8 ] {\displaystyle M[s]\leftarrow m[ws/8+(w/8-1)]\|\ldots \|m[ws/8+1]\|m[ws/8]} ( 0 ≤ s ≤ ( 32 t − 1 ) ) {\displaystyle (0\leq s\leq (32t-1))}

From the word array M {\displaystyle {\textsf {M}}} , we define the t {\displaystyle t} 32-word array message blocks { M ( i ) } i = 0 t − 1 {\displaystyle \{{\textsf {M}}^{(i)}\}_{i=0}^{t-1}} as follows.

… excerpt ends here. Continue reading the full article.

Illustrations

LSH (hash function): Compression function of LSH
Compression function of LSH
LSH (hash function): The 
  
    
      
        j
      
    
    {\displaystyle j}
  
-th step function 
  
    
      
        
          
            
              Step
            
          
          
            j
          
        
      
    
    {\displaystyle {\textrm {Step}}_{j}}
The j {\displaystyle j} -th step function Step j {\displaystyle {\textrm {Step}}_{j}}
LSH (hash function): Two-word mix function 
  
    
      
        
          
            
              Mix
            
          
          
            j
            ,
            l
          
        
        (
        X
        ,
        Y
        )
      
    
    {\displaystyle {\textrm {Mix}}_{j,l}(X,Y)}
Two-word mix function Mix j , l ( X , Y ) {\displaystyle {\textrm {Mix}}_{j,l}(X,Y)}

Worked examples

Example 1 — a first encounter with LSH (hash function)

Start with the simplest possible case. Write down what LSH (hash function) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, 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 LSH (hash function) 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 LSH (hash function) 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 LSH (hash function)

In research
LSH (hash function) appears in mathematics 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 LSH (hash function) 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
LSH (hash function) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic algorithms, Cryptographic hash functions, so understanding it makes those chapters shorter.
In everyday life
Look for LSH (hash function) 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 LSH (hash function) in 20 minutes

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

Frequently asked questions

What is LSH (hash function) in simple terms?

LSH is a cryptographic hash function designed in 2014 by South Korea to provide integrity in general-purpose software environments such as PCs and smart devices. LSH is one of the cryptographic algorithms approved by the Korean Cryptographic Module Validation Program (KCMVP).

Why does LSH (hash function) matter?

Because it connects several mathematics 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 LSH (hash function)?

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 LSH (hash function).

Tags

  • Cryptographic algorithms
  • Cryptographic hash functions

Keep exploring