page_title: LSH (hash function)
section_title: Compression
hierarchical_section_title: LSH (hash function) / Specification / Compression
caption_attribution_description: English: The j-th step function of LSH 한국어: 해시 함수 LSH의 j번째 단계
context_page_description: LSH is a cryptographic hash function designed in 2014 by Republic of 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.
  And it is the national standard of Republic of Korea.
context_section_description: In this stage, the  32-word array message blocks , which are generated from a message  in the initialization stage, are compressed by iteration of compression functions.
  The compression function  has two inputs; the -th 16-word chaining variable  and the -th 32-word message block .
  And it returns the -th 16-word chaining variable .
  Here and subsequently,  denotes the set of all -word arrays for .
  The following four functions are used in a compression function:
  Message expansion function 
  Message addition function 
  Mix function 
  Word-permutation function 
  The overall structure of the compression function is shown in the following figure.
  In a compression function, the message expansion function  generates  16-word array sub-messages  from given .
  Let  be a temporary 16-word array set to the -th chaining variable .
  The -th step function  having two inputs  and  updates , i.e., .
  All step functions are proceeded in order .
  Then one more  operation by  is proceeded, and the -th chaining variable  is set to .
  The process of a compression function in detail is as follows.
  Here the -th step function  is as follows.
   
  The following figure shows the -th step function  of a compression function.
caption: The 
    
      
        
          j
        
      
      {\displaystyle j}
    
  -th step function 
    
      
        
          
            
              
                Step
              
            
            
              j
            
          
        
      
      {\displaystyle {\textrm {Step}}_{j}}
exif: {}