Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind Keys to Version and Purpose #32

Open
paragonie-security opened this issue Aug 5, 2021 · 0 comments · May be fixed by #34
Open

Bind Keys to Version and Purpose #32

paragonie-security opened this issue Aug 5, 2021 · 0 comments · May be fixed by #34

Comments

@paragonie-security
Copy link

paseto/v2.go

Line 78 in f1000e3

func (*V2) Decrypt(token string, key []byte, payload, footer interface{}) error {

paseto/v2.go

Line 138 in f1000e3

func (*V2) Verify(token string, publicKey crypto.PublicKey, payload, footer interface{}) error {

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.

@aidantwoods aidantwoods linked a pull request Oct 4, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant