[[wp:GOST (block cipher)|GOST 28147-89]] is a standard symmetric encryption based on a [[wp:Feistel cipher|Feistel network]].


The structure of the algorithm consists of three levels:
# &nbsp; encryption modes - simple replacement, application range, imposing a range of feedback and authentication code generation;
# &nbsp; cycles - 32-З, 32-Р and 16-З, is a repetition of the main step;
# &nbsp; ''main step'', a function that takes a 64-bit block of text and one of the eight 32-bit encryption key elements, and uses the replacement table (8x16 matrix of 4-bit values), and returns encrypted block.


;Task:
Implement the main step of this encryption algorithm.
<br><br>
