Better HN
topnewbestaskshowjobs
Log inSign up

throwaway_129

8 karma · joined Jan 14, 2019 (7y ago) · 6 submissions

Submissions

1.

What is the purpose of square bracket executable?(unix.stackexchange.com ↗)

1 points · by throwaway_129 · 7y ago · discuss

2.

Capability Immaturity Model(en.wikipedia.org ↗)

2 points · by throwaway_129 · 7y ago · discuss

3.

Microsoft open-sources its Windows calculator(theverge.com ↗)

1 points · by throwaway_129 · 7y ago · discuss

comment 7y ago · link · parent

You don't want to generate key material from a password with hkdf. From the RFC:

On the other hand, it is anticipated that some applications will not be able to use HKDF "as-is" due to specific operational requirements, or will be able to use it but without the full benefits of the scheme. One significant example is the derivation of cryptographic keys from a source of low entropy, such as a user's password. The extract step in HKDF can concentrate existing entropy but cannot amplify entropy. In the case of password-based KDFs, a main goal is to slow down dictionary attacks using two ingredients: a salt value,and the intentional slowing of the key derivation computation. HKDF naturally accommodates the use of salt; however, a slowing down mechanism is not part of this specification. Applications interested in a password-based KDF should consider whether, for example, [PKCS5] meets their needs better than HKDF.

comment 7y ago · link · parent

https://en.wikipedia.org/wiki/PBKDF2

Again, I'm not a cryptographer, and PBKDF2 is just an example. I would try to consult someone with a heavier background in the field. I've used PBKDF2 and Scrypt before, Argon2 is the newest, but also therefor least battle-tested.

https://godoc.org/golang.org/x/crypto/pbkdf2

https://godoc.org/golang.org/x/crypto/argon2

https://godoc.org/golang.org/x/crypto/scrypt

comment 7y ago · link · parent

Not a cryptographer, but a few things irked me about the secret projector encryption features:

1. Calls it AES-CBC, but it's using AES-GCM https://github.com/tumblr/k8s-secret-projector/blob/master/p...

2. Encryption key generation (edited: from a password) uses a hash function rather than using a KDF. Short hashes are padded (takes first N bytes required to hit max length, appends to end) or trimmed to the appropriate length. https://github.com/tumblr/k8s-secret-projector/blob/master/p...