-
Notifications
You must be signed in to change notification settings - Fork 36
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
Provide hash functions in addition to HMAC functions #18
Comments
I'm open to it. What's your proposed behavior? If a user specifies a |
Yeah @jordansissel, I would do like you suggested. Another option would be using different |
An empty I've always wondered why With the apparent deprecation of checksum, I think fingerprint should at least be able to create compatible hashes. |
Exactly @atnak, I've run exactly into that trap the first time I used this plugin. I had to check out the code in order to better understand the documentation. |
I do also run into same trap with I also agree with @atnak that changing algorithm when @jordansissel, @adepasquale IMO, as SHA-256, SHA1, etc are just plain hash functions, better algorithm naming would be to leave current names as plain hash functions and follow commonly used names for HMAC: |
@IuriiSergiichuk I agree with you about the bettern naming, but as this will break existing configurations I think it would be better to use
@jordansissel Any more thoughts about the issue? Can I send you a pull request? |
I just re-discovered this ... Spoke briefly with @suyograo on this subject, and was about to log the issue (till I found this one). Basically, rather then changing the configuration names, simply use HMAC if the key is present, Digest otherwise. While not as explicit, it can be implemented passively. For all but the MURMUR3 hash algorithims (SHA1, SHA256, SHA384, SHA512, MD5), a key is required. If not provided, the following error will occur upon startup: Cannot register filter fingerprint plugin. The error reported is: We should allow for the absense of of the key, yet still support the hashing algorithms. For example, when a key is provided, the HMAC-SHA1 will be used, and when a key is not provided, simply use SHA1. I don't believe that there is any performance difference using the keyed version or not. However, if the filter is used soley for collision free uniqueness, as opposed to as a means of cyprotgraphic signature, then a key for the hash is an unecessary configuration option. Also, we should change the error to refrain from the wording 'encryption' key, in favor of 'cryptographic' or 'HMAC' or 'signature' key since hashing is not encryption. |
Opened a PR to fix this: #37 |
This has been released in To update run the following command:
Thanks again @praseodym ! |
Hello,
any particular reason why you're using HMAC functions (which need a key) and do not offer the possibility of using a plain hash functions?
In other words, would you be interested in a pull request that offers
OpenSSL::Digest
in addition toOpenSSL::HMAC
? 😄The text was updated successfully, but these errors were encountered: