You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- i need it to be fast as the overhead of an api key should be minimalpiotrek– piotrek2019-05-10 17:35:56 +00:00Commented May 10, 2019 at 17:35
- I see. Actually, I just updated my answer. Since your input is 128 bit keys rather than passwords the threat of offline cracking is not as likely. You're hashing it server side tho?hft– hft2019-05-10 17:37:10 +00:00Commented May 10, 2019 at 17:37
- 2Small pedantic correction: PBKDF2 is doing multiple rounds of a hashing algorithm like SHA256... bcrypt is similar, but it uses the blowfish cypher, rather than hashing algorithms. (Such details only matter if you're trying to pick which key stretching algorithm to use, though, and in OP's case, doesn't matter at all since they don't need to stretch their keys to resist offline cracking.)Ghedipunk– Ghedipunk2019-05-10 19:39:37 +00:00Commented May 10, 2019 at 19:39
- 3Everything between the first paragraph and the last two sentences is somewhere between misleading and just bad advice. For a securely-generated 128-bit random key, you should not use multiple rounds of hashing or anything like bcrypt; the entropy of the input is so high that brute-forcing it is already impossible (practically speaking). Adding cost is pure negative. In fact, from a security perspective, SHA1 would probably be OK if it weren't for the fact that it'll cause any competent static analysis tool to yell at you.CBHacking– CBHacking2019-05-10 20:31:09 +00:00Commented May 10, 2019 at 20:31
- You don't need a KDF if the key is a "generated key" and not a password... @CBHacking is correct.forest– forest2019-05-11 01:51:05 +00:00Commented May 11, 2019 at 1:51
| Show 1 more comment
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. web-application), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you