xref: /aosp_15_r20/external/tink/cc/aead/CMakeLists.txt (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1tink_module(aead)
2
3add_subdirectory(internal)
4
5tink_cc_library(
6  NAME aead_wrapper
7  SRCS
8    aead_wrapper.cc
9    aead_wrapper.h
10  DEPS
11    absl::memory
12    absl::status
13    absl::strings
14    tink::core::aead
15    tink::core::crypto_format
16    tink::core::primitive_set
17    tink::core::primitive_wrapper
18    tink::internal::monitoring_util
19    tink::internal::registry_impl
20    tink::internal::util
21    tink::monitoring::monitoring
22    tink::util::status
23    tink::util::statusor
24)
25
26tink_cc_library(
27  NAME cord_aead
28  SRCS
29    cord_aead.h
30  DEPS
31    absl::cord
32    tink::util::statusor
33)
34
35tink_cc_library(
36  NAME cord_aead_wrapper
37  SRCS
38    cord_aead_wrapper.cc
39    cord_aead_wrapper.h
40  DEPS
41    tink::aead::cord_aead
42    absl::status
43    absl::cord
44    tink::core::crypto_format
45    tink::core::primitive_set
46    tink::core::primitive_wrapper
47    tink::util::status
48    tink::util::statusor
49)
50
51tink_cc_library(
52  NAME aead_config
53  SRCS
54    aead_config.cc
55    aead_config.h
56  DEPS
57    tink::aead::aead_wrapper
58    tink::aead::aes_ctr_hmac_aead_key_manager
59    tink::aead::aes_eax_key_manager
60    tink::aead::aes_gcm_key_manager
61    tink::aead::aes_gcm_proto_serialization
62    tink::aead::aes_gcm_siv_key_manager
63    tink::aead::kms_aead_key_manager
64    tink::aead::kms_envelope_aead_key_manager
65    tink::aead::xchacha20_poly1305_key_manager
66    absl::core_headers
67    absl::memory
68    absl::status
69    tink::core::registry
70    tink::config::tink_fips
71    tink::mac::mac_config
72    tink::util::status
73    tink::proto::config_cc_proto
74)
75
76tink_cc_library(
77  NAME aead_factory
78  SRCS
79    aead_factory.cc
80    aead_factory.h
81  DEPS
82    tink::aead::aead_wrapper
83    absl::core_headers
84    absl::memory
85    tink::core::aead
86    tink::core::key_manager
87    tink::core::keyset_handle
88    tink::core::registry
89    tink::util::status
90    tink::util::statusor
91)
92
93tink_cc_library(
94  NAME aead_key_templates
95  SRCS
96    aead_key_templates.cc
97    aead_key_templates.h
98  DEPS
99    absl::strings
100    tink::proto::aes_ctr_cc_proto
101    tink::proto::aes_ctr_hmac_aead_cc_proto
102    tink::proto::aes_eax_cc_proto
103    tink::proto::aes_gcm_cc_proto
104    tink::proto::aes_gcm_siv_cc_proto
105    tink::proto::common_cc_proto
106    tink::proto::hmac_cc_proto
107    tink::proto::kms_envelope_cc_proto
108    tink::proto::tink_cc_proto
109)
110
111tink_cc_library(
112  NAME aes_eax_key_manager
113  SRCS
114    aes_eax_key_manager.h
115  DEPS
116    absl::memory
117    absl::status
118    absl::strings
119    tink::core::aead
120    tink::core::key_type_manager
121    tink::core::template_util
122    tink::subtle::aes_eax_boringssl
123    tink::subtle::random
124    tink::util::constants
125    tink::util::secret_data
126    tink::util::status
127    tink::util::statusor
128    tink::util::validation
129    tink::proto::aes_eax_cc_proto
130    tink::proto::tink_cc_proto
131)
132
133tink_cc_library(
134  NAME aes_gcm_key_manager
135  SRCS
136    aes_gcm_key_manager.h
137  DEPS
138    tink::aead::cord_aead
139    absl::memory
140    absl::status
141    absl::strings
142    tink::core::aead
143    tink::core::key_type_manager
144    tink::core::template_util
145    tink::core::input_stream
146    tink::aead::internal::cord_aes_gcm_boringssl
147    tink::internal::fips_utils
148    tink::subtle::aes_gcm_boringssl
149    tink::subtle::random
150    tink::util::constants
151    tink::util::input_stream_util
152    tink::util::secret_data
153    tink::util::status
154    tink::util::statusor
155    tink::util::validation
156    tink::proto::aes_gcm_cc_proto
157    tink::proto::tink_cc_proto
158)
159
160tink_cc_library(
161  NAME aes_gcm_siv_key_manager
162  SRCS
163    aes_gcm_siv_key_manager.h
164  DEPS
165    absl::memory
166    absl::strings
167    tink::core::aead
168    tink::core::key_type_manager
169    tink::core::template_util
170    tink::subtle::aes_gcm_siv_boringssl
171    tink::subtle::random
172    tink::util::constants
173    tink::util::secret_data
174    tink::util::status
175    tink::util::statusor
176    tink::util::validation
177    tink::proto::aes_gcm_siv_cc_proto
178    tink::proto::tink_cc_proto
179)
180
181tink_cc_library(
182  NAME aes_ctr_hmac_aead_key_manager
183  SRCS
184    aes_ctr_hmac_aead_key_manager.cc
185    aes_ctr_hmac_aead_key_manager.h
186  DEPS
187    absl::memory
188    absl::status
189    absl::statusor
190    absl::strings
191    tink::core::aead
192    tink::core::key_type_manager
193    tink::core::template_util
194    tink::core::mac
195    tink::internal::fips_utils
196    tink::mac::hmac_key_manager
197    tink::subtle::aes_ctr_boringssl
198    tink::subtle::encrypt_then_authenticate
199    tink::subtle::ind_cpa_cipher
200    tink::subtle::random
201    tink::util::constants
202    tink::util::enums
203    tink::util::input_stream_util
204    tink::util::secret_data
205    tink::util::status
206    tink::util::statusor
207    tink::util::validation
208    tink::proto::aes_ctr_cc_proto
209    tink::proto::aes_ctr_hmac_aead_cc_proto
210    tink::proto::common_cc_proto
211    tink::proto::hmac_cc_proto
212    tink::proto::tink_cc_proto
213)
214
215tink_cc_library(
216  NAME xchacha20_poly1305_key_manager
217  SRCS
218    xchacha20_poly1305_key_manager.h
219  DEPS
220    absl::memory
221    absl::status
222    absl::strings
223    tink::core::aead
224    tink::core::key_type_manager
225    tink::core::template_util
226    tink::core::input_stream
227    tink::subtle::subtle
228    tink::subtle::xchacha20_poly1305_boringssl
229    tink::util::constants
230    tink::util::input_stream_util
231    tink::util::secret_data
232    tink::util::status
233    tink::util::statusor
234    tink::util::validation
235    tink::proto::tink_cc_proto
236    tink::proto::xchacha20_poly1305_cc_proto
237)
238
239tink_cc_library(
240  NAME kms_aead_key_manager
241  SRCS
242    kms_aead_key_manager.h
243  DEPS
244    absl::memory
245    absl::status
246    absl::strings
247    tink::core::aead
248    tink::core::key_type_manager
249    tink::core::template_util
250    tink::core::kms_client
251    tink::core::kms_clients
252    tink::util::constants
253    tink::util::status
254    tink::util::statusor
255    tink::util::validation
256    tink::proto::kms_aead_cc_proto
257    tink::proto::tink_cc_proto
258)
259
260tink_cc_library(
261  NAME kms_envelope_aead
262  SRCS
263    kms_envelope_aead.cc
264    kms_envelope_aead.h
265  DEPS
266    absl::endian
267    absl::status
268    absl::strings
269    tink::core::aead
270    tink::core::registry
271    tink::aead::internal::aead_util
272    tink::util::status
273    tink::util::statusor
274    tink::proto::tink_cc_proto
275)
276
277tink_cc_library(
278  NAME kms_envelope_aead_key_manager
279  SRCS
280    kms_envelope_aead_key_manager.cc
281    kms_envelope_aead_key_manager.h
282  DEPS
283    tink::aead::kms_envelope_aead
284    absl::memory
285    absl::status
286    absl::strings
287    tink::core::aead
288    tink::core::key_type_manager
289    tink::core::template_util
290    tink::core::kms_client
291    tink::core::kms_clients
292    tink::aead::internal::aead_util
293    tink::internal::fips_utils
294    tink::util::constants
295    tink::util::status
296    tink::util::statusor
297    tink::util::validation
298    tink::proto::kms_envelope_cc_proto
299    tink::proto::tink_cc_proto
300)
301
302tink_cc_library(
303  NAME mock_aead
304  SRCS
305    mock_aead.h
306  DEPS
307    gmock
308    absl::strings
309    tink::core::aead
310    tink::util::statusor
311  TESTONLY
312)
313
314tink_cc_library(
315  NAME failing_aead
316  SRCS
317    failing_aead.cc
318    failing_aead.h
319  DEPS
320    absl::strings
321    tink::core::aead
322  TESTONLY
323)
324
325tink_cc_library(
326  NAME aead_parameters
327  SRCS
328    aead_parameters.h
329  DEPS
330    tink::core::parameters
331)
332
333tink_cc_library(
334  NAME aead_key
335  SRCS
336    aead_key.h
337  DEPS
338    tink::aead::aead_parameters
339    absl::strings
340    tink::core::key
341)
342
343tink_cc_library(
344  NAME aes_gcm_parameters
345  SRCS
346    aes_gcm_parameters.cc
347    aes_gcm_parameters.h
348  DEPS
349    tink::aead::aead_parameters
350    absl::strings
351    tink::util::status
352    tink::util::statusor
353)
354
355tink_cc_library(
356  NAME aes_gcm_key
357  SRCS
358    aes_gcm_key.cc
359    aes_gcm_key.h
360  DEPS
361    tink::aead::aead_key
362    tink::aead::aes_gcm_parameters
363    absl::strings
364    absl::optional
365    tink::core::partial_key_access_token
366    tink::core::restricted_data
367    tink::subtle::subtle_util
368    tink::util::status
369    tink::util::statusor
370)
371
372tink_cc_library(
373  NAME aes_gcm_proto_serialization
374  SRCS
375    aes_gcm_proto_serialization.cc
376    aes_gcm_proto_serialization.h
377  DEPS
378    tink::aead::aes_gcm_key
379    tink::aead::aes_gcm_parameters
380    absl::status
381    absl::optional
382    tink::core::partial_key_access
383    tink::core::restricted_data
384    tink::core::secret_key_access_token
385    tink::internal::key_parser
386    tink::internal::key_serializer
387    tink::internal::mutable_serialization_registry
388    tink::internal::parameters_parser
389    tink::internal::parameters_serializer
390    tink::internal::proto_key_serialization
391    tink::internal::proto_parameters_serialization
392    tink::util::status
393    tink::util::statusor
394    tink::proto::aes_gcm_cc_proto
395    tink::proto::tink_cc_proto
396)
397
398# tests
399
400tink_cc_test(
401  NAME aead_wrapper_test
402  SRCS
403    aead_wrapper_test.cc
404  DEPS
405    tink::aead::aead_wrapper
406    tink::aead::mock_aead
407    gmock
408    absl::flat_hash_map
409    absl::memory
410    absl::status
411    absl::statusor
412    absl::strings
413    tink::core::aead
414    tink::core::crypto_format
415    tink::core::primitive_set
416    tink::core::registry
417    tink::internal::registry_impl
418    tink::monitoring::monitoring
419    tink::monitoring::monitoring_client_mocks
420    tink::util::status
421    tink::util::statusor
422    tink::util::test_matchers
423    tink::util::test_util
424    tink::proto::tink_cc_proto
425)
426
427tink_cc_test(
428  NAME aead_config_test
429  SRCS
430    aead_config_test.cc
431  DEPS
432    tink::aead::aead_config
433    tink::aead::aead_key_templates
434    tink::aead::aes_gcm_key
435    tink::aead::aes_gcm_key_manager
436    tink::aead::aes_gcm_parameters
437    gmock
438    absl::memory
439    absl::status
440    tink::core::aead
441    tink::core::insecure_secret_key_access
442    tink::core::keyset_handle
443    tink::core::partial_key_access
444    tink::core::primitive_set
445    tink::core::registry
446    tink::config::tink_fips
447    tink::internal::fips_utils
448    tink::internal::mutable_serialization_registry
449    tink::internal::proto_key_serialization
450    tink::internal::proto_parameters_serialization
451    tink::util::status
452    tink::util::statusor
453    tink::util::test_matchers
454    tink::proto::tink_cc_proto
455)
456
457tink_cc_test(
458  NAME aead_factory_test
459  SRCS
460    aead_factory_test.cc
461  DEPS
462    tink::aead::aead_config
463    tink::aead::aead_factory
464    tink::aead::aes_gcm_key_manager
465    gmock
466    absl::status
467    absl::strings
468    tink::core::aead
469    tink::core::crypto_format
470    tink::core::keyset_handle
471    tink::internal::key_info
472    tink::util::status
473    tink::util::statusor
474    tink::util::test_keyset_handle
475    tink::util::test_util
476    tink::proto::aes_gcm_cc_proto
477    tink::proto::tink_cc_proto
478)
479
480tink_cc_test(
481  NAME aead_key_templates_test
482  SRCS
483    aead_key_templates_test.cc
484  DEPS
485    tink::aead::aead_config
486    tink::aead::aead_key_templates
487    tink::aead::aes_ctr_hmac_aead_key_manager
488    tink::aead::aes_eax_key_manager
489    tink::aead::aes_gcm_key_manager
490    tink::aead::aes_gcm_siv_key_manager
491    tink::aead::kms_envelope_aead_key_manager
492    tink::aead::xchacha20_poly1305_key_manager
493    gmock
494    absl::status
495    absl::statusor
496    tink::core::aead
497    tink::core::key_manager_impl
498    tink::core::key_manager
499    tink::core::keyset_handle
500    tink::subtle::aead_test_util
501    tink::util::fake_kms_client
502    tink::util::status
503    tink::util::test_matchers
504    tink::proto::aes_ctr_cc_proto
505    tink::proto::aes_ctr_hmac_aead_cc_proto
506    tink::proto::aes_eax_cc_proto
507    tink::proto::aes_gcm_cc_proto
508    tink::proto::aes_gcm_siv_cc_proto
509    tink::proto::common_cc_proto
510    tink::proto::hmac_cc_proto
511    tink::proto::kms_envelope_cc_proto
512    tink::proto::tink_cc_proto
513    tink::proto::xchacha20_poly1305_cc_proto
514)
515
516tink_cc_test(
517  NAME aes_eax_key_manager_test
518  SRCS
519    aes_eax_key_manager_test.cc
520  DEPS
521    tink::aead::aes_eax_key_manager
522    gmock
523    tink::core::aead
524    tink::subtle::aead_test_util
525    tink::subtle::aes_eax_boringssl
526    tink::util::secret_data
527    tink::util::status
528    tink::util::statusor
529    tink::util::test_matchers
530    tink::proto::aes_eax_cc_proto
531    tink::proto::tink_cc_proto
532)
533
534tink_cc_test(
535  NAME aes_gcm_key_manager_test
536  SRCS
537    aes_gcm_key_manager_test.cc
538  DEPS
539    tink::aead::aes_gcm_key_manager
540    tink::aead::cord_aead
541    gmock
542    absl::memory
543    absl::status
544    tink::core::aead
545    tink::aead::internal::cord_aes_gcm_boringssl
546    tink::subtle::aead_test_util
547    tink::subtle::aes_gcm_boringssl
548    tink::util::istream_input_stream
549    tink::util::secret_data
550    tink::util::status
551    tink::util::statusor
552    tink::util::test_matchers
553    tink::proto::aes_gcm_cc_proto
554    tink::proto::tink_cc_proto
555)
556
557tink_cc_test(
558  NAME aes_gcm_siv_key_manager_test
559  SRCS
560    aes_gcm_siv_key_manager_test.cc
561  DEPS
562    tink::aead::aes_gcm_siv_key_manager
563    gmock
564    absl::status
565    tink::core::aead
566    tink::internal::ssl_util
567    tink::subtle::aead_test_util
568    tink::subtle::aes_gcm_siv_boringssl
569    tink::util::secret_data
570    tink::util::status
571    tink::util::statusor
572    tink::util::test_matchers
573    tink::proto::aes_gcm_siv_cc_proto
574    tink::proto::tink_cc_proto
575)
576
577tink_cc_test(
578  NAME aes_ctr_hmac_aead_key_manager_test
579  SRCS
580    aes_ctr_hmac_aead_key_manager_test.cc
581  DEPS
582    tink::aead::aes_ctr_hmac_aead_key_manager
583    gmock
584    absl::status
585    tink::core::aead
586    tink::subtle::subtle
587    tink::subtle::aead_test_util
588    tink::subtle::aes_ctr_boringssl
589    tink::util::enums
590    tink::util::istream_input_stream
591    tink::util::secret_data
592    tink::util::status
593    tink::util::statusor
594    tink::util::test_matchers
595    tink::proto::aes_ctr_cc_proto
596    tink::proto::aes_ctr_hmac_aead_cc_proto
597    tink::proto::common_cc_proto
598    tink::proto::hmac_cc_proto
599    tink::proto::tink_cc_proto
600)
601
602tink_cc_test(
603  NAME xchacha20_poly1305_key_manager_test
604  SRCS
605    xchacha20_poly1305_key_manager_test.cc
606  DEPS
607    tink::aead::xchacha20_poly1305_key_manager
608    gmock
609    absl::memory
610    absl::status
611    tink::core::aead
612    tink::internal::ssl_util
613    tink::subtle::aead_test_util
614    tink::subtle::xchacha20_poly1305_boringssl
615    tink::util::istream_input_stream
616    tink::util::secret_data
617    tink::util::status
618    tink::util::statusor
619    tink::util::test_matchers
620    tink::proto::tink_cc_proto
621    tink::proto::xchacha20_poly1305_cc_proto
622)
623
624tink_cc_test(
625  NAME kms_aead_key_manager_test
626  SRCS
627    kms_aead_key_manager_test.cc
628  DEPS
629    tink::aead::kms_aead_key_manager
630    gmock
631    absl::memory
632    absl::status
633    tink::core::aead
634    tink::core::kms_client
635    tink::core::kms_clients
636    tink::subtle::aead_test_util
637    tink::util::status
638    tink::util::statusor
639    tink::util::test_matchers
640    tink::util::test_util
641    tink::proto::kms_aead_cc_proto
642    tink::proto::tink_cc_proto
643)
644
645tink_cc_test(
646  NAME kms_envelope_aead_test
647  SRCS
648    kms_envelope_aead_test.cc
649  DEPS
650    tink::aead::aead_config
651    tink::aead::aead_key_templates
652    tink::aead::kms_envelope_aead
653    gmock
654    absl::endian
655    absl::memory
656    absl::status
657    absl::strings
658    tink::core::aead
659    tink::core::keyset_handle
660    tink::core::registry
661    tink::internal::ssl_util
662    tink::mac::mac_key_templates
663    tink::util::fake_kms_client
664    tink::util::status
665    tink::util::statusor
666    tink::util::test_matchers
667    tink::util::test_util
668    tink::proto::aes_gcm_cc_proto
669)
670
671tink_cc_test(
672  NAME kms_envelope_aead_key_manager_test
673  SRCS
674    kms_envelope_aead_key_manager_test.cc
675  DEPS
676    tink::aead::aead_config
677    tink::aead::aead_key_templates
678    tink::aead::aes_eax_key_manager
679    tink::aead::kms_envelope_aead
680    tink::aead::kms_envelope_aead_key_manager
681    gmock
682    absl::memory
683    absl::status
684    tink::core::aead
685    tink::core::kms_client
686    tink::core::kms_clients
687    tink::core::registry
688    tink::mac::mac_key_templates
689    tink::subtle::aead_test_util
690    tink::util::fake_kms_client
691    tink::util::status
692    tink::util::statusor
693    tink::util::test_matchers
694    tink::util::test_util
695    tink::proto::kms_envelope_cc_proto
696    tink::proto::tink_cc_proto
697)
698
699tink_cc_test(
700  NAME cord_aead_wrapper_test
701  SRCS
702    cord_aead_wrapper_test.cc
703  DEPS
704    tink::aead::cord_aead
705    tink::aead::cord_aead_wrapper
706    gmock
707    absl::memory
708    absl::status
709    absl::strings
710    absl::cord
711    tink::core::primitive_set
712    tink::util::status
713    tink::util::test_matchers
714    tink::util::test_util
715    tink::proto::tink_cc_proto
716)
717
718tink_cc_test(
719  NAME failing_aead_test
720  SRCS
721    failing_aead_test.cc
722  DEPS
723    tink::aead::failing_aead
724    gmock
725    absl::status
726    tink::util::test_matchers
727)
728
729tink_cc_test(
730  NAME aes_gcm_parameters_test
731  SRCS
732    aes_gcm_parameters_test.cc
733  DEPS
734    tink::aead::aes_gcm_parameters
735    gmock
736    tink::util::statusor
737    tink::util::test_matchers
738)
739
740tink_cc_test(
741  NAME aes_gcm_key_test
742  SRCS
743    aes_gcm_key_test.cc
744  DEPS
745    tink::aead::aes_gcm_key
746    tink::aead::aes_gcm_parameters
747    gmock
748    absl::optional
749    tink::core::partial_key_access
750    tink::core::restricted_data
751    tink::util::statusor
752    tink::util::test_matchers
753)
754
755tink_cc_test(
756  NAME aes_gcm_proto_serialization_test
757  SRCS
758    aes_gcm_proto_serialization_test.cc
759  DEPS
760    tink::aead::aes_gcm_key
761    tink::aead::aes_gcm_parameters
762    tink::aead::aes_gcm_proto_serialization
763    gmock
764    tink::core::insecure_secret_key_access
765    tink::core::partial_key_access
766    tink::core::restricted_data
767    tink::internal::mutable_serialization_registry
768    tink::internal::proto_key_serialization
769    tink::internal::proto_parameters_serialization
770    tink::subtle::random
771    tink::util::test_matchers
772    tink::proto::aes_gcm_cc_proto
773    tink::proto::tink_cc_proto
774)
775