Skip to content

Commit

Permalink
Use ctype = STRING_PIECE on all key_values
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 633521257
Change-Id: Ic22f98cdd4c863e678e28f73029111f43a12e090
  • Loading branch information
happyCoder92 authored and copybara-github committed May 14, 2024
1 parent 3b8e748 commit c2fabfc
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion proto/aes_cmac.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ message AesCmacParams {
// key_type: type.googleapis.com/google.crypto.tink.AesCmacKey
message AesCmacKey {
uint32 version = 1;
bytes key_value = 2;
bytes key_value = 2; // Placeholder for ctype.
AesCmacParams params = 3;
}

Expand Down
2 changes: 1 addition & 1 deletion proto/aes_cmac_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ option go_package = "github.com/tink-crypto/tink-go/v2/proto/aes_cmac_prf_go_pro
// key_type: type.googleapis.com/google.crypto.tink.AesCmacPrfKey
message AesCmacPrfKey {
uint32 version = 1;
bytes key_value = 2;
bytes key_value = 2; // Placeholder for ctype.
}

message AesCmacPrfKeyFormat {
Expand Down
2 changes: 1 addition & 1 deletion proto/aes_ctr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ message AesCtrKeyFormat {
message AesCtrKey {
uint32 version = 1;
AesCtrParams params = 2;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}
2 changes: 1 addition & 1 deletion proto/aes_ctr_hmac_streaming.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ message AesCtrHmacStreamingKeyFormat {
message AesCtrHmacStreamingKey {
uint32 version = 1;
AesCtrHmacStreamingParams params = 2;
bytes key_value = 3; // the main key, aka. "ikm", input key material
bytes key_value = 3; // Placeholder for ctype. // the main key, aka. "ikm", input key material
}
2 changes: 1 addition & 1 deletion proto/aes_gcm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ message AesGcmKeyFormat {

message AesGcmKey {
uint32 version = 1;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}
2 changes: 1 addition & 1 deletion proto/aes_gcm_hkdf_streaming.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ message AesGcmHkdfStreamingKeyFormat {
message AesGcmHkdfStreamingKey {
uint32 version = 1;
AesGcmHkdfStreamingParams params = 2;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}
2 changes: 1 addition & 1 deletion proto/aes_gcm_siv.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ message AesGcmSivKeyFormat {
// key_type: type.googleapis.com/google.crypto.tink.AesGcmSivKey
message AesGcmSivKey {
uint32 version = 1;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}
2 changes: 1 addition & 1 deletion proto/aes_siv.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ message AesSivKeyFormat {
message AesSivKey {
uint32 version = 1;
// First half is AES-CTR key, second is AES-SIV.
bytes key_value = 2;
bytes key_value = 2; // Placeholder for ctype.
}
2 changes: 1 addition & 1 deletion proto/chacha20_poly1305.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ message ChaCha20Poly1305KeyFormat {}
// at https://tools.ietf.org/html/rfc7539#section-2.8.
message ChaCha20Poly1305Key {
uint32 version = 1;
bytes key_value = 2;
bytes key_value = 2; // Placeholder for ctype.
}
2 changes: 1 addition & 1 deletion proto/ecdsa.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ message EcdsaPrivateKey {
EcdsaPublicKey public_key = 2;
// Unsigned big integer in bigendian representation.
// Required.
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}

message EcdsaKeyFormat {
Expand Down
2 changes: 1 addition & 1 deletion proto/ecies_aead_hkdf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ message EciesAeadHkdfPrivateKey {
EciesAeadHkdfPublicKey public_key = 2;

// Required.
bytes key_value = 3; // Big integer in bigendian representation.
bytes key_value = 3; // Placeholder for ctype. // Big integer in bigendian representation.
}

message EciesAeadHkdfKeyFormat {
Expand Down
4 changes: 2 additions & 2 deletions proto/ed25519.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ message Ed25519PublicKey {
// The public key is 32 bytes, encoded according to
// https://tools.ietf.org/html/rfc8032#section-5.1.2.
// Required.
bytes key_value = 2;
bytes key_value = 2; // Placeholder for ctype.
}

// key_type: type.googleapis.com/google.crypto.tink.Ed25519PrivateKey
Expand All @@ -46,7 +46,7 @@ message Ed25519PrivateKey {
// The private key is 32 bytes of cryptographically secure random data.
// See https://tools.ietf.org/html/rfc8032#section-5.1.5.
// Required.
bytes key_value = 2;
bytes key_value = 2; // Placeholder for ctype.
// The corresponding public key.
Ed25519PublicKey public_key = 3;
}
2 changes: 1 addition & 1 deletion proto/hkdf_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ message HkdfPrfParams {
message HkdfPrfKey {
uint32 version = 1;
HkdfPrfParams params = 2;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}

message HkdfPrfKeyFormat {
Expand Down
2 changes: 1 addition & 1 deletion proto/hmac.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ message HmacParams {
message HmacKey {
uint32 version = 1;
HmacParams params = 2;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}

message HmacKeyFormat {
Expand Down
2 changes: 1 addition & 1 deletion proto/hmac_prf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ message HmacPrfParams {
message HmacPrfKey {
uint32 version = 1;
HmacPrfParams params = 2;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}

message HmacPrfKeyFormat {
Expand Down
2 changes: 1 addition & 1 deletion proto/jwt_ecdsa.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ message JwtEcdsaPrivateKey {
uint32 version = 1;
JwtEcdsaPublicKey public_key = 2;
// Unsigned big integer in bigendian representation.
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}

message JwtEcdsaKeyFormat {
Expand Down
2 changes: 1 addition & 1 deletion proto/jwt_hmac.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum JwtHmacAlgorithm {
message JwtHmacKey {
uint32 version = 1;
JwtHmacAlgorithm algorithm = 2;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.

// Optional, custom kid header value to be used with "RAW" keys.
// "TINK" keys with this value set will be rejected.
Expand Down
2 changes: 1 addition & 1 deletion proto/xchacha20_poly1305.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ message XChaCha20Poly1305KeyFormat {
// key_type: type.googleapis.com/google.crypto.tink.XChaCha20Poly1305Key
message XChaCha20Poly1305Key {
uint32 version = 1;
bytes key_value = 3;
bytes key_value = 3; // Placeholder for ctype.
}

0 comments on commit c2fabfc

Please sign in to comment.