Hi,
Here is a patch for this bug. The sbox function was using "b+=16" instead of "b+=4".
Also, you check test vector using :
```c uint64_t P = 0xfb623599da6e8127ull; uint64_t T = 0x477d469dec0b8762ull; uint64_t w0 = 0x84be85ce9804e94bull; uint64_t k0 = 0xec2802d4e0a488e9ull; ARMPACKey key = { .hi = w0, .lo = k0 }; uint64_t C5 = pauth_computepac(P, T, key); /* C5 should be 0xc003b93999b33765 */ ```
Hi,
Here is a patch for this bug. The sbox function was using "b+=16" instead of "b+=4".
Also, you check test vector using :
```c 127ull; 762ull; 94bull; 8e9ull;
uint64_t P = 0xfb623599da6e8
uint64_t T = 0x477d469dec0b8
uint64_t w0 = 0x84be85ce9804e
uint64_t k0 = 0xec2802d4e0a48
ARMPACKey key = { .hi = w0, .lo = k0 };
uint64_t C5 = pauth_computepac(P, T, key);
/* C5 should be 0xc003b93999b33765 */
```