Main step of GOST 28147-89: Difference between revisions

Content added Content deleted
m (→‎{{header|RPL}}: added comments)
Line 1,314: Line 1,314:
« « SWAP SLB OR » → input key cast
« « SWAP SLB OR » → input key cast
« key REVLIST cast STREAM <span style="color:grey">@ convert key into a big-endian integer</span>
« key REVLIST cast STREAM <span style="color:grey">@ convert key into a little-endian integer</span>
input 1 4 SUB REVLIST cast STREAM + <span style="color:blue">B→LIST</span> <span style="color:grey">@ same for input part 1, then add and back to list format</span>
input 1 4 SUB REVLIST cast STREAM + <span style="color:blue">B→LIST</span> <span style="color:grey">@ same for input part 1, then add and back to list format</span>
{ K21 K43 K65 K87 } SWAP B→R 1 ADD GET <span style="color:grey">@ replace bytes according to the table</span>
{ K21 K43 K65 K87 } SWAP B→R 1 ADD GET <span style="color:grey">@ replace bytes according to the table</span>
REVLIST cast STREAM <span style="color:grey">@ back to big-endian format</span>
REVLIST cast STREAM <span style="color:grey">@ back to little-endian format</span>
RLB RL RL RL <span style="color:blue">B→LIST</span> <span style="color:grey">@ roll 11 bits, back to list format</span>
RLB RL RL RL <span style="color:blue">B→LIST</span> <span style="color:grey">@ roll 11 bits, back to list format</span>
input 5 8 SUB XOR <span style="color:grey">@ add part 2</span>
input 5 8 SUB XOR <span style="color:grey">@ add part 2</span>