mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-28 23:09:36 -04:00
Generate random salt for key derivation on init (#309)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
e0ce2e8a51
commit
9a3bd38912
25 changed files with 342 additions and 317 deletions
|
@ -25,8 +25,6 @@ const (
|
|||
)
|
||||
|
||||
// DeriveKey derives a key from a secret.
|
||||
//
|
||||
// TODO: decide on a secure key derivation function.
|
||||
func DeriveKey(secret, salt, info []byte, length uint) ([]byte, error) {
|
||||
hkdf := hkdf.New(sha256.New, secret, salt, info)
|
||||
key := make([]byte, length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue