Clever Geek Handbook
📜 ⬆️ ⬇️

Belt

BelT is the state standard for symmetric encryption and integrity control of the Republic of Belarus. The full name of the standard is STB 34.101.31-2007 “Information technology and security. Cryptographic algorithms for encryption and integrity control. " Adopted as a preliminary standard in 2007. Introduced as the final standard in 2011.

Belt
Created by2001 year
Published2007 year
Key size256 bit
Block size128 bit
Number of roundseight
Type ofcombination of Feistel Network and en: Lai-Massey scheme

Description

BelT is a block cipher with a 256-bit key and 8 cycles of cryptographic transformations, operating with 128-bit words. Cryptographic algorithms of the standard are based on the basic encryption modes of data blocks. All algorithms of the standard are divided into 8 groups:

  • encryption algorithms in simple replacement mode ;
  • encryption algorithms in block coupling mode ;
  • gamma feedback encryption algorithms;
  • encryption algorithms in counter mode ;
  • algorithm for generating an insert;
  • algorithms for simultaneous encryption and data protection;
  • algorithms for simultaneous encryption and key protection;
  • hashing algorithm ;

The first four groups are designed to provide secure messaging. Each group includes an encryption algorithm and a secret key decryption algorithm. Parties with a shared key can organize the exchange of messages by encrypting them before sending and decrypting them upon receipt. In the modes of simple replacement and coupling of blocks, messages that contain at least one block are encrypted, and in the gamming modes with feedback and counter, messages of arbitrary length are encrypted.

The fifth algorithm is designed to control the integrity of messages using imitations - control words, which are determined using a secret key. Parties that have a shared key can organize integrity control during the exchange of messages by adding them to the insert when sending and checking the insert when receiving. Verification of the insertions additionally allows the recipient party to verify that the sending party knows the secret key, that is, verify the authenticity of the messages.

In the sixth group, the initial message is defined in two parts: open and critical. Protection algorithms are designed to control the integrity of both parts and ensure the confidentiality of the critical part. When protection is installed, an imitation of the entire message is calculated and its critical part is encrypted. When the protection is removed, the imitator is checked and, if the check was successful, the critical part is decrypted.

In the algorithms of the seventh group, the length of the message to be protected must be immediately known; these algorithms are recommended for key protection. The protected key is accompanied by an open header that contains the public attributes of the key and at the same time is a control value for integrity checking. Fixed persistent headers can be used, which serve only for integrity control. When installing security, the key is encrypted along with its header. When protection is removed, the inverse conversion is performed and the decrypted header is compared with the control one.

The eighth algorithm is designed to calculate hash values ​​- control words that are determined without using a key. Parties may arrange for integrity monitoring of messages by comparing their hash values ​​with valid control hash values. Changing a message with a high probability leads to a change in the corresponding hash value and therefore hash values ​​can be used instead of the messages themselves, for example, in electronic digital signature systems

Block Encryption

Input and Output

The input to the encryption and decryption algorithms is a blockX∈{0,one}128 {\ displaystyle X \ in \ {0,1 \} ^ {128}}   and keyθ∈{0,one}256. {\ displaystyle \ theta \ in \ {0,1 \} ^ {256}.}  

The output is a blockY∈{0,one}128 {\ displaystyle Y \ in \ {0,1 \} ^ {128}}   - result of encryption or decryption of a wordX {\ displaystyle X}   on the keyθ:Y=Fθ(X) {\ displaystyle \ theta: Y = F _ {\ theta} (X)}   orY=Fθ-one(X). {\ displaystyle Y = F _ {\ theta} ^ {- 1} (X).}  

Input data for encryption is prepared as follows:

  • WordX {\ displaystyle X}   written asX=Xone‖X2‖X3‖Xfour,Xi∈{0,one}32. {\ displaystyle X = X_ {1} \ | X_ {2} \ | X_ {3} \ | X_ {4}, X_ {i} \ in \ {0,1 \} ^ {32}.}  
  • Keyθ {\ displaystyle \ theta}   written asθ=θone‖θ2‖θ3‖θfour‖θfive‖θ6‖θ7‖θeight,θi∈{0,one}32 {\ displaystyle \ theta = \ theta _ {1} \ | \ theta _ {2} \ | \ theta _ {3} \ | \ theta _ {4} \ | \ theta _ {5} \ | \ theta _ { 6} \ | \ theta _ {7} \ | \ theta _ {8}, \ theta _ {i} \ in \ {0,1 \} ^ {32}}   , and the clock keys are determinedKone=θone,K2=θ2,K3=θ3,Kfour=θfour,Kfive=θfive,K6=θ6,K7=θ7,Keight=θeight,K9=θone,......,K56=θeight. {\ displaystyle K_ {1} = \ theta _ {1}, K_ {2} = \ theta _ {2}, K_ {3} = \ theta _ {3}, K_ {4} = \ theta _ {4} , K_ {5} = \ theta _ {5}, K_ {6} = \ theta _ {6}, K_ {7} = \ theta _ {7}, K_ {8} = \ theta _ {8}, K_ {9} = \ theta _ {1}, ......, K_ {56} = \ theta _ {8}.}  

Symbols and auxiliary transformations

ConversionGr:{0,one}32→{0,one}32 {\ displaystyle G_ {r}: \ {0,1 \} ^ {32} \ rightarrow \ {0,1 \} ^ {32}}   matches the wordu=uone∥uone∥u2∥u3∥ufour,ui∈{0,one}eight {\ displaystyle u = u_ {1} \ parallel u_ {1} \ parallel u_ {2} \ parallel u_ {3} \ parallel u_ {4}, u_ {i} \ in \ {0,1 \} ^ {8 }}   word

 
Table 1 - SubstitutionH {\ displaystyle H}  

Gr(u)=RotHir(H(uone)∥H(u2)∥H(u3)∥H(ufour)).{\ displaystyle G_ {r} (u) = RotHi ^ {r} (H (u_ {1}) \ parallel H (u_ {2}) \ parallel H (u_ {3}) \ parallel H (u_ {4} )).}  

RotHir-{\ displaystyle RotHi ^ {r} -}   cyclic left shift byr {\ displaystyle r}   bit.

H(u)-{\ displaystyle H (u) -}   the operation of replacing an 8-bit input string by substituting from table 1.

SubstitutionH:{0,one}eight→{0,one}eight {\ displaystyle H: \ {0,1 \} ^ {8} \ rightarrow \ {0,1 \} ^ {8}}   set by a fixed table. The table uses the hexadecimal representation of wordsu∈{0,one}eight. {\ displaystyle u \ in \ {0,1 \} ^ {8}.}  

⊞{\ displaystyle \ boxplus}   and⊟- {\ displaystyle \ boxminus -}   modulo addition and subtraction operations232. {\ displaystyle 2 ^ {32}.}  

Encryption

To encrypt a blockX {\ displaystyle X}   on the keyθ {\ displaystyle \ theta}   The following steps are performed:

  1. Installa←Xone,b←X2,c←X3,d←Xfour. {\ displaystyle a \ leftarrow X_ {1}, b \ leftarrow X_ {2}, c \ leftarrow X_ {3}, d \ leftarrow X_ {4}.}  
     
    Calculations oni- {\ displaystyle i-}   ohm encryption clock
  2. Fori {\ displaystyle i}   = 1,2, ..., 8 execute:
one)b←b⊕Gfive(a⊞K7i-6); {\ displaystyle b \ leftarrow b \ oplus G_ {5} (a \ boxplus K_ {7i-6});}  
2)c←c⊕G21(d⊞K7i-five); {\ displaystyle c \ leftarrow c \ oplus G_ {21} (d \ boxplus K_ {7i-5});}  
3)a←a⊟G13(b⊞K7i-four); {\ displaystyle a \ leftarrow a \ boxminus G_ {13} (b \ boxplus K_ {7i-4});}  
four)e←G21(b⊞c⊞K7i-3)⊕⟨i⟩32; {\ displaystyle e \ leftarrow G_ {21} (b \ boxplus c \ boxplus K_ {7i-3}) \ oplus \ langle i \ rangle _ {32};}  
five)b←b⊞e; {\ displaystyle b \ leftarrow b \ boxplus e;}  
6)c←c⊟e; {\ displaystyle c \ leftarrow c \ boxminus e;}  
7)d←d⊞G13(c⊞K7i-2); {\ displaystyle d \ leftarrow d \ boxplus G_ {13} (c \ boxplus K_ {7i-2});}  
eight)b←b⊕G21(a⊞K7i-one); {\ displaystyle b \ leftarrow b \ oplus G_ {21} (a \ boxplus K_ {7i-1});}  
9)c←c⊕Gfive(d⊞K7i); {\ displaystyle c \ leftarrow c \ oplus G_ {5} (d \ boxplus K_ {7i});}  
ten)a↔b; {\ displaystyle a \ leftrightarrow b;}  
eleven)c↔d; {\ displaystyle c \ leftrightarrow d;}  
12)b↔c; {\ displaystyle b \ leftrightarrow c;}  
3. InstallY←b‖d‖a‖c. {\ displaystyle Y \ leftarrow b \ | d \ | a \ | c.}  
4. ReturnY. {\ displaystyle Y.}  

Decryption

To decrypt a blockX {\ displaystyle X}   on the keyθ {\ displaystyle \ theta}   The following steps are performed:

    1. Installa←Xone,b←X2,c←X3,d←Xfour. {\ displaystyle a \ leftarrow X_ {1}, b \ leftarrow X_ {2}, c \ leftarrow X_ {3}, d \ leftarrow X_ {4}.}  
    2. Fori= {\ displaystyle i =}   8,7, ..., 1 execute:
    one)b←b⊕Gfive(a⊞K7i); {\ displaystyle b \ leftarrow b \ oplus G_ {5} (a \ boxplus K_ {7i});}  
    2)c←c⊕G21(d⊞K7i-one); {\ displaystyle c \ leftarrow c \ oplus G_ {21} (d \ boxplus K_ {7i-1});}  
    3)a←a⊟G13(b⊞K7i-2); {\ displaystyle a \ leftarrow a \ boxminus G_ {13} (b \ boxplus K_ {7i-2});}  
    four)e←G21(b⊞c⊞K7i-3)⊕⟨i⟩32; {\ displaystyle e \ leftarrow G_ {21} (b \ boxplus c \ boxplus K_ {7i-3}) \ oplus \ langle i \ rangle _ {32};}  
    five)b←b⊞e; {\ displaystyle b \ leftarrow b \ boxplus e;}  
    6)c←c⊟e; {\ displaystyle c \ leftarrow c \ boxminus e;}  
    7)d←d⊞G13(c⊞K7i-four); {\ displaystyle d \ leftarrow d \ boxplus G_ {13} (c \ boxplus K_ {7i-4});}  
    eight)b←b⊕G21(a⊞K7i-five); {\ displaystyle b \ leftarrow b \ oplus G_ {21} (a \ boxplus K_ {7i-5});}  
    9)c←c⊕Gfive(d⊞K7i-6); {\ displaystyle c \ leftarrow c \ oplus G_ {5} (d \ boxplus K_ {7i-6});}  
    ten)a↔b; {\ displaystyle a \ leftrightarrow b;}  
    eleven)c↔d; {\ displaystyle c \ leftrightarrow d;}  
    12)a↔d; {\ displaystyle a \ leftrightarrow d;}  
    3. InstallY←c‖a‖d‖b. {\ displaystyle Y \ leftarrow c \ | a \ | d \ | b.}  
    4. ReturnY. {\ displaystyle Y.}  

    Development of an imitation

    Input

    • The original message of arbitrary length, presented in the form of a bit sequenceX∈{0,one}∗ {\ displaystyle X \ in \ {0,1 \} ^ {*}}   . If aX {\ displaystyle X}   - a non-empty word, then write it in the form:X=Xone‖X2‖...‖Xn,|Xone|=|X2|=...=|Xn-one|=128,0<|Xn|≤128 {\ displaystyle {\ displaystyle X = X_ {1} \ | X_ {2} \ | ... \ | X_ {n}}, | X_ {1} | = | X_ {2} | = ... = | X_ {n-1} | = 128.0 <| X_ {n} | \ leq 128}   . IfX {\ displaystyle X}   - empty thenn=one {\ displaystyle n = 1}   and|Xone|=0 {\ displaystyle | X_ {1} | = 0}   .
    • Keyθ∈{0,one}256 {\ displaystyle \ theta \ in \ {0,1 \} ^ {256}}   - a bit sequence of length 256.

    Auxiliary Conversions and Variables

    • Conversionsϕone,ϕ2 {\ displaystyle \ phi _ {1}, \ phi _ {2}}   :{0,one}128→{0,one}128 {\ displaystyle {\ {0,1 \}} ^ {128} \ rightarrow {\ {0,1 \}} ^ {128}}   that act on the wordu=uone||u2||u3||ufour,ui∈{0,one}32 {\ displaystyle u = u_ {1} || u_ {2} || u_ {3} || u_ {4}, u_ {i} \ in \ {0,1 \} ^ {32}}   - a bit sequence of length 32. Wherein:

    ϕone(u)=u2||u3||ufour||(uone⊕u2),{\ displaystyle \ phi _ {1} (u) = u_ {2} || u_ {3} || u_ {4} || (u_ {1} \ oplus u_ {2}),}  

    ϕ2(u)=(uone⊕ufour)||uone||u2||u3.{\ displaystyle \ phi _ {2} (u) = (u_ {1} \ oplus u_ {4}) || u_ {1} || u_ {2} || u_ {3}.}  

    • Displayψ {\ displaystyle \ psi}   , which associates a bit sequence of length less than 128, a word of length 128. It operates according to the rule:

    ψ(u)=u||one||0127-|u|{\ displaystyle \ psi (u) = u || 1 || 0 ^ {127- | u |}}   .

    • Auxiliary variablesr,s∈{0,one}256 {\ displaystyle r, s \ in \ {0,1 \} ^ {256}}   - bit sequences of length 128.

    Algorithm for generating an insert

    1. Populate helper variables {\ displaystyle s}   zeros:s←0128 {\ displaystyle s \ leftarrow 0 ^ {128}}   and set the encryption results {\ displaystyle s}   on this keyθ∈{0,one}256 {\ displaystyle \ theta \ in \ {0,1 \} ^ {256}}   atr {\ displaystyle r}   :r←Fθ(s) {\ displaystyle r \ leftarrow F _ {\ theta} (s)}   .
    2. For each block of the input messagei=one,2,...,n-one {\ displaystyle i = 1,2, ..., n-1}   execute:s←Fθ(s⊕Xi) {\ displaystyle s \ leftarrow F _ {\ theta} (s \ oplus X_ {i})}   .
    3. If a|Xn|=128 {\ displaystyle | X_ {n} | = 128}   then executes←s⊕Xn⊕ϕone(r) {\ displaystyle s \ leftarrow s \ oplus X_ {n} \ oplus \ phi _ {1} (r)}   otherwises←s⊕ψ(Xn)⊕ϕ2(r) {\ displaystyle s \ leftarrow s \ oplus \ psi (X_ {n}) \ oplus \ phi _ {2} (r)}   .
    4. Write toT {\ displaystyle T}   first 64 bits of a wordFθ(s) {\ displaystyle F _ {\ theta} (s)}   :T←L64(Fθ(s)) {\ displaystyle T \ leftarrow L_ {64} (F _ {\ theta} (s))}   .
    5. ReturnT {\ displaystyle T}   .

    Hash Algorithm

    The hash algorithm is used to calculate the hash value, which can later be used to control data integrity.

    Input

    The input to the algorithm is a message of arbitrary length, presented in the form of a bit sequenceX∈{0,one}∗ {\ displaystyle X \ in \ {0,1 \} ^ {*}}   .

    The output is the wordY∈{0,one}256 {\ displaystyle Y \ in \ {0,1 \} ^ {256}}   .

    For the algorithm to work, the original bit sequence is padded with zeros so that its length is divided by 256, and is represented as follows:X=Xone||X2||...||Xd,Xi∈{0,one}256 {\ displaystyle X = X_ {1} || X_ {2} || ... || X_ {d}, X_ {i} \ in \ {0,1 \} ^ {256}}   . We will also need variabless∈{0,one}128 {\ displaystyle s \ in \ {0,1 \} ^ {128}}   andh∈{0,one}256 {\ displaystyle h \ in \ {0,1 \} ^ {256}}   .

    Auxiliary Conversions

    Let there be a wordu=uone||u2||u3||ufour,ui∈{0,one}128 {\ displaystyle u = u_ {1} || u_ {2} || u_ {3} || u_ {4}, u_ {i} \ in \ {0,1 \} ^ {128}}   .

    Define two mappings:

    σone:{0,one}512→{0,one}128,{\ displaystyle \ sigma _ {1}: {\ {0,1 \}} ^ {512} \ rightarrow {\ {0,1 \}} ^ {128},}  

    σ2:{0,one}512→{0,one}256,{\ displaystyle \ sigma _ {2}: {\ {0,1 \}} ^ {512} \ rightarrow {\ {0,1 \}} ^ {256},}  

    which act on the wordu {\ displaystyle u}   according to the rules:

    σone(u)=Fuone||u2(u3⊕ufour)⊕u3⊕ufour,{\ displaystyle \ sigma _ {1} (u) = F_ {u_ {1} || u_ {2}} (u_ {3} \ oplus u_ {4}) \ oplus u_ {3} \ oplus u_ {4} ,}  

    σ2(u)=(Fθone(uone)⊕uone)||(Fθ2(u2)⊕u2),{\ displaystyle \ sigma _ {2} (u) = (F _ {\ theta _ {1}} (u_ {1}) \ oplus u_ {1}) || (F _ {\ theta _ {2}} (u_ {2}) \ oplus u_ {2}),}  

    Whereθone=σone(u)||ufour {\ displaystyle \ theta _ {1} = \ sigma _ {1} (u) || u_ {4}}   ,θ2=(σone(u)⊕one128)||u3 {\ displaystyle \ theta _ {2} = (\ sigma _ {1} (u) \ oplus 1 ^ {128}) || u_ {3}}   .

    Hash value calculation

     
    Scheme of one iteration of the hashing algorithm

    The algorithm is performed in several stages:

    1. Fill the variables {\ displaystyle s}   zeros:s⟵0128 {\ displaystyle s \ longleftarrow 0 ^ {128}}   .
    2. To variableh {\ displaystyle h}   write the first two rows of the lookup tableH {\ displaystyle H}   moving from left to right and from top to bottom:h⟵B194BAC80A08F53B366D008E584AfiveDE48504FA9DoneBB6C7AC252E72C202FDCE0Dsixteen {\ displaystyle h \ longleftarrow B194BAC80A08F53B366D008E584A5DE48504FA9D1BB6C7AC252E72C202FDCE0D_ {16}}   .
    3. For each blockXi,i=one,d¯ {\ displaystyle X_ {i}, i = {\ overline {1, d}}}   we perform operations:
      1. s←s⊕σone(Xi‖h){\ displaystyle s \ leftarrow s \ oplus \ sigma _ {1} (X_ {i} \ | h)}   ;
      2. h←σ2(Xi||h){\ displaystyle h \ leftarrow \ sigma _ {2} (X_ {i} || h)}   .
    4. We calculateY {\ displaystyle Y}   :Y⟵σ2(⟨|X|⟩128||s||h) {\ displaystyle Y \ longleftarrow \ sigma _ {2} (\ langle | X | \ rangle _ {128} || s || h)}   .
    5. We return the received valueY {\ displaystyle Y}   , which is the hash value of the source textX {\ displaystyle X}   .

    Links

    1. http://apmi.bsu.by/assets/files/std/belt-spec27.pdf
    2. http://apmi.bsu.by/assets/files/std/belt-spec14.pdf
    Source - https://ru.wikipedia.org/w/index.php?title=BelT&oldid=100199140


    More articles:

    • Usa (Volga tributary)
    • Timofeevka (Lebedinsky District)
    • Topchii (Ukraine)
    • Casorati, Felice
    • Tovati, Eliza
    • Nickel (alloy)
    • Common Ostrich
    • McDonell, Arthur Anthony
    • Bishkin Village Council (Lebedinsky District)
    • Postal Union (magazine, Kharkov)

    All articles

    Clever Geek | 2019