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

Update SHA1 text to allow for better hashing mechanisms #4

Closed
aaronpk opened this issue Sep 23, 2016 · 3 comments
Closed

Update SHA1 text to allow for better hashing mechanisms #4

aaronpk opened this issue Sep 23, 2016 · 3 comments

Comments

@aaronpk
Copy link
Member

aaronpk commented Sep 23, 2016

Here is what the WebCryptoAPI has done, we should probably use text like this:

https://www.w3.org/TR/WebCryptoAPI/#sha

@julien51
Copy link
Collaborator

Thanks! I'll use that.

@aaronpk
Copy link
Member Author

aaronpk commented Sep 23, 2016

It sounds like we'll need to change the text to explicitly allow alternative hashing algorithms to be used, where the key name of the signature corresponds to the hashing algorithm being used. Since it's a key name, there needs to be an explicit list of allowed hashes, otherwise it would be impossible to know which one is being used.

@aaronpk
Copy link
Member Author

aaronpk commented Sep 23, 2016

Proposed new text:

"The X-Hub-Signature header's value must be in the form method=signature where method is one of the recognized algorithm names and signature is the hexadecimal representation of the signature. The signature MUST be computed using the HMAC algorithm [RFC6151] with the request body as the data and the hub.secret as the key."

(It looks like RFC2104 was replaced by RFC6151)

Then add a new section:

Recognized Algorithm Names

The following algorithms are added as recognized algorithm names, as specified by [FIPS PUB 180-4]:

  • "sha1"
    • The SHA-1 algorithm as specified in Section 6.1 of [FIPS PUB 180-4]
  • "sha256"
    • The SHA-256 algorithm as specified in Section 6.2
  • "sha384"
    • The SHA-384 algorithm as specified in Section 6.5
  • "sha512"
    • The SHA-512 algorithm as specified in Section 6.4

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

No branches or pull requests

2 participants