Skip to content

Bind Keys to Version and Purpose #6

Description

@paragonie-security

paseto-lua/paseto/v2.lua

Lines 174 to 184 in 400f2bd

function v2.generate_symmetric_key()
return paseto.generate_symmetric_key()
end
function v2.generate_asymmetric_secret_key()
return paseto.generate_asymmetric_secret_key()
end
function v2.extract_version_purpose(token)
return paseto.extract_version_purpose(token)
end

function v2.decrypt(key, token, claim_rules, footer)

function v2.verify(public_key, token, claim_rules, footer)

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions