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

[WIP] Documentation Improvements and Implementation Guide #59

Merged
merged 5 commits into from
Mar 18, 2018

Conversation

paragonie-scott
Copy link
Member

Unfinished, but should shore up all of our documentation loose ends (except a formal RFC):

Closes #9, #27, #29, #53, #54 upon merge.

@@ -19,6 +19,12 @@ to assist in cross-platform library development.
* If there are only two versions, that means `v1` and `v2`.
* If a future post-quantum `v3` is defined, `v1` should no longer be accepted.
* If an additional version `v4` is defined, `v2` should no longer be accepted.
5. New versions will be decided and formalized by the PASETO developers.
* User-defined homemade protocols are discouraged. If implementors wish to break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README indicates that the protocol and the payload are in separate parts. Does this mean that we are still valid for v2/v1 if we make our payload a Protobuf or msgpack? If we have to use a new protocol, most parsers won't know what to do cryptographically even if we use the lower-level decryption methods, as the version is used as a key to determine which algorithms to use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cryptography is totally agnostic to the underlying format. If you wanted to use a non-JSON format, you can do that, but for simplicity we're aiming for JWT replacement (the 80% problem) rather than all use cases (the 99% problem).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for some context, I'm working on a new version of pypaseto that provides JSON encoding/decoding and limited claims validation. Part of my current function allows someone to specify an encoder object that has methods for encoding/decoding if they want to replace the JSON inside. As long as their encoder/decoder allows settings/reading an "exp" field, the "exp" field will be validated against the current time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to probably call the cryptography layer its own thing, and put it in its own section, when I write the PASETO RFC. That way you can say "we use PASETO-CRYPTO (name tentative) with Protobuf" but the shorthand "PASETO" just means "PASETO-CRYPTO with JSON payloads".


Implementations should feel free to provide a means to extract the footer from a token,
before decryption, since the footer is used in the calculation of the authentication
tag for the encrypted payload.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any recommended wording around emphasising that: when footers are extracted prior to decryption/verification of a message, then they have not been cryptographically verified.

i.e. given that we're telling users that the footer is authenticated in other parts of documentation, any recommended wording to make it abundantly clear that the footer has not been authenticated in this case.

(I mean, it's hopefully obvious – just trying eliminate any potential for confusion to arise here)

I've currently got this, but it's a little long winded – probably the more succinct the better :)

@paragonie-scott paragonie-scott merged commit 4c71bf3 into master Mar 18, 2018
@paragonie-scott paragonie-scott deleted the implementation-guide branch March 18, 2018 23:48
paragonie-security added a commit that referenced this pull request Mar 19, 2018
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 this pull request may close these issues.

4 participants