Ianleeclark/Paseto

Bind Keys to Version and Purpose

paragonie-security opened this issue · 0 comments

def decrypt(data, key, footer \\ "") do

@spec verify(String.t(), [binary()], String.t() | nil) :: {:ok, binary} | {:error, String.t()}

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.