Abstract:The uBlock algorithm has been widely used in algorithm design, side channel protection, Internet of Things applications, and cryptanalysis. Although the uBlock algorithm is suitable for high-speed implementation, the publicly available implementation rate of this algorithm is far lower than that of algorithms such as AES and SM4. Bit slicing is a common method to optimize block ciphers. However, when using bit slicing to optimize the uBlock algorithm, it faces the problem of huge memory access overhead due to insufficient register resources. In this study, a flexible bit slicing optimization method named FBS-uBlock is designed for the uBlock algorithm. It reduces the number of registers occupied by the algorithm under bit slicing, thus reducing the memory access overhead and improving the speed. After testing, the proposed optimization method can reduce the memory access instruction of uBlock-128/128, uBlock-128/256, and uBlock-256/256 algorithms by up to 71%, 71%, and 72%, respectively. The maximum encryption rates can reach 12758 Mb/s, 8944 Mb/s, and 8984 Mb/s respectively, which are 3.9, 4.2, and 3.4 times higher than the implementation rates in the design documentation.