Parallel implementation of OCB using VAES and GPUs
摘要
Authenticated encryption schemes currently offer one of the greatest advantages in data encryption. Evaluating their capabilities and the various versions they come in is essential. The Offset Codebook is an authenticated encryption scheme with multiple versions, depending on the masking generation function (MGF) used, yielding different outcomes depending on the context. However, some MGFs can achieve more optimal performance than others, particularly in extensive parallelism, where most MGFs exhibit weaknesses due to their dependence on the previous block. This study compares two primary MGF versions: gray code (OCB3) and AES rounds (RAOCB). OCB3 is considered the most efficient and fast way to process OCB; however, it has limitations regarding parallel data processing. OCBRA is the latest version and, despite its reduced domain, boasts the distinct advantage of no block-to-block dependence. The main objective of this comparison is to determine whether OCBRA is faster than OCB3, considering factors such as message size, where parallelism can be leveraged. We conducted experiments using messages of various sizes categorized as small, medium, and large. All versions were implemented using 512-bit vector instructions (AVX-512 and VAES), and some tests were performed using GPU acceleration. The results obtained were as follows: OCB3 achieved 0.24 cycles per byte, while OCBRA achieved 0.19 cycles per byte. Overall, OCBRA demonstrated superiority across all tested message sizes.