Commit Graph
6 Commits
Author SHA1 Message Date
Filippo Valsorda e84da03127 hkdf: add Extract and Expand
RFC 5869, Section 3.3 suggests it might be sometimes appropriate to use
Expand without Extract, and it is reasonable to reuse (secret, salt)
with different info values, in which case the Extract can be performed
once as an optimization.

TLS 1.3 also needs direct access to both Extract and Expand.

pseudorandomKey is ugly to look at, but that's intentional, as it
signals that this should have non-obvious properties to the user. The
docs will make it clear it's not the thing you should use in most cases.

Fixes golang/go#28237

Change-Id: Ib43ae8cdde0663aa4752172c39aadfb0e1c35f10
Reviewed-on: https://go-review.googlesource.com/c/144398
Reviewed-by: Adam Langley <agl@golang.org>
2018-10-25 21:37:31 +00:00
Filippo Valsorda d2c3f1d8b9 hkdf: improve example
Change-Id: I540c699baf1f7cbf27da458961d581773f442864
Reviewed-on: https://go-review.googlesource.com/c/144397
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2018-10-25 21:28:55 +00:00
David Symonds 1fbbd62cfe crypto: add import comments.
Change-Id: I33240faf1b8620d0cd600de661928d8e422ebdbc
Reviewed-on: https://go-review.googlesource.com/1235
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 23:26:36 +00:00
Andrew Gerrand a73c6bbfc5 go.crypto: use golang.org/x/... import paths
LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/167190043
2014-11-10 08:50:25 +11:00
Dmitry Chestnykh ce1cf546ac go.crypto/hkdf: get rid of appends
LGTM=agl
R=golang-codereviews, bradfitz, agl
CC=golang-codereviews
https://golang.org/cl/95370044
2014-05-25 13:56:25 -07:00
Péter Szilágyi f82d56354e go.crypto/hkdf: implement hash-based, key derivation.
Detailed description in RFC 5869.

LGTM=agl
R=agl, minux.ma
CC=golang-codereviews
https://golang.org/cl/7474049
2014-02-12 14:08:25 -05:00