Previously, i’ve coded GOST cipher on PIC16F84. You knew that each of ciphering and deciphering proces takes 5800 cycles. In order to enhance process throughput. I ported the code into PIC16F877. Here i concatenated SBOX1 to SBOX2, and so on. However, this posting is dedicated to anyone who is searching for implementation of cipher function especially GOST cipher in microcontroller such PIC16F877.
So here we need to allocate 4 x 256 bytes of program just for SBOX lookup table. After concatenating the SBOX, the throughput of ciphering and deciphering process was increasing. Each of them just takes approximately 4200 cycles. Which is a little bit faster than previous faster. To gain more speed, you can modify the algorithm or just replace with higher microcontroller that has better instruction on addition.
Later on, you also can try to port this code into another platform such AVR or ever 8051🙂 . If you find better result, please let me know.