|
const uint8_t key[paseto_v2_LOCAL_KEYBYTES], |
|
const uint8_t key[paseto_v2_LOCAL_KEYBYTES], |
See https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md
Right now, byte arrays are accepted by this API. There's no mechanism to prevent a user from using a v2 public key as a v2 local key.
It may also be a good idea to bind keys to a version, in case you want to support v4 tokens too.
libpaseto/src/paseto_v2_local.c
Line 137 in e8bc52e
libpaseto/src/paseto_v2_public.c
Line 127 in e8bc52e
See https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md
Right now, byte arrays are accepted by this API. There's no mechanism to prevent a user from using a v2 public key as a v2 local key.
It may also be a good idea to bind keys to a version, in case you want to support v4 tokens too.