Optimized octet arithmetic by using pre-computed tables