Skip to content

Commit 5149f8a

Browse files
juergwcopybara-github
authored andcommitted
Add cross-language tests with KMS AEAD with Tink prefix.
In tink-crypto/tink-go#10 it was mentioned that KMS Envelope Keys can and are used with a TINK prefix. And the same is probably true for KMS AEAD keys. Add this test to make sure that all languages that currently support this are consistent. At the moment it does not work in Java. PiperOrigin-RevId: 617204124 Change-Id: I5203daf1fdea2ac883f3269e498057f679ed0ce2
1 parent 9a4e360 commit 5149f8a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

cross_language/cross_language/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ py_test(
9090
requirement("absl-py"),
9191
"@tink_py//tink:tink_python",
9292
"@tink_py//tink/aead",
93+
"@tink_py//tink/proto:kms_aead_py_pb2",
9394
"@tink_py//tink/proto:kms_envelope_py_pb2",
9495
"@tink_py//tink/proto:tink_py_pb2",
9596
"@tink_py//tink/testing:keyset_builder",

cross_language/cross_language/aead_test.py

+14
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import tink
2525
from tink import aead
2626

27+
from tink.proto import kms_aead_pb2
2728
from tink.proto import kms_envelope_pb2
2829
from tink.proto import tink_pb2
2930
from tink.testing import keyset_builder
@@ -138,6 +139,19 @@ def tearDownModule():
138139
# TODO(b/329404375): This currently fails in Java.
139140
['cc', 'go', 'python'],
140141
),
142+
'_FAKE_KMS_AEAD_WITH_TINK_PREFIX': (
143+
tink_pb2.KeyTemplate(
144+
value=kms_aead_pb2.KmsAeadKeyFormat(
145+
key_uri=_FAKE_KMS_KEY_URI,
146+
).SerializeToString(),
147+
type_url=(
148+
'type.googleapis.com/google.crypto.tink.KmsAeadKey'
149+
),
150+
output_prefix_type=tink_pb2.TINK,
151+
),
152+
# TODO(b/329404375): This currently fails in Java.
153+
['cc', 'go', 'python'],
154+
),
141155
}
142156

143157

0 commit comments

Comments
 (0)