Skip to content

Commit

Permalink
Clarify documentation about default HKDF salt value.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 507991558
  • Loading branch information
chuckx authored and copybara-github committed Feb 8, 2023
1 parent da4e3f3 commit 7948b63
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
8 changes: 6 additions & 2 deletions cc/proto/hkdf_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ option go_package = "github.com/google/tink/proto/hkdf_prf_proto";

message HkdfPrfParams {
HashType hash = 1;
// Salt, optional in RFC 5869. Using "" is equivalent to zeros of length up to
// the block length of the HMac.
// Optional.
//
// An unspecified or zero-length value is equivalent to a sequence of zeros
// (0x00) with a length equal to the output size of hash.
//
// See https://rfc-editor.org/rfc/rfc5869.
bytes salt = 2;
}

Expand Down
8 changes: 6 additions & 2 deletions java_src/proto/hkdf_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ option go_package = "github.com/google/tink/proto/hkdf_prf_proto";

message HkdfPrfParams {
HashType hash = 1;
// Salt, optional in RFC 5869. Using "" is equivalent to zeros of length up to
// the block length of the HMac.
// Optional.
//
// An unspecified or zero-length value is equivalent to a sequence of zeros
// (0x00) with a length equal to the output size of hash.
//
// See https://rfc-editor.org/rfc/rfc5869.
bytes salt = 2;
}

Expand Down
8 changes: 6 additions & 2 deletions javascript/proto/hkdf_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ option go_package = "github.com/google/tink/proto/hkdf_prf_proto";

message HkdfPrfParams {
HashType hash = 1;
// Salt, optional in RFC 5869. Using "" is equivalent to zeros of length up to
// the block length of the HMac.
// Optional.
//
// An unspecified or zero-length value is equivalent to a sequence of zeros
// (0x00) with a length equal to the output size of hash.
//
// See https://rfc-editor.org/rfc/rfc5869.
bytes salt = 2;
}

Expand Down
8 changes: 6 additions & 2 deletions proto/hkdf_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ option go_package = "github.com/google/tink/proto/hkdf_prf_proto";

message HkdfPrfParams {
HashType hash = 1;
// Salt, optional in RFC 5869. Using "" is equivalent to zeros of length up to
// the block length of the HMac.
// Optional.
//
// An unspecified or zero-length value is equivalent to a sequence of zeros
// (0x00) with a length equal to the output size of hash.
//
// See https://rfc-editor.org/rfc/rfc5869.
bytes salt = 2;
}

Expand Down
8 changes: 6 additions & 2 deletions python/tink/proto/hkdf_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ option go_package = "github.com/google/tink/proto/hkdf_prf_proto";

message HkdfPrfParams {
HashType hash = 1;
// Salt, optional in RFC 5869. Using "" is equivalent to zeros of length up to
// the block length of the HMac.
// Optional.
//
// An unspecified or zero-length value is equivalent to a sequence of zeros
// (0x00) with a length equal to the output size of hash.
//
// See https://rfc-editor.org/rfc/rfc5869.
bytes salt = 2;
}

Expand Down

0 comments on commit 7948b63

Please sign in to comment.