1 // Copyright 2021 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 /////////////////////////////////////////////////////////////////////////////// 16 #ifndef TINK_AEAD_INTERNAL_WYCHEPROOF_AEAD_H_ 17 #define TINK_AEAD_INTERNAL_WYCHEPROOF_AEAD_H_ 18 19 #include <string> 20 #include <vector> 21 22 #include "absl/strings/string_view.h" 23 #include "tink/util/statusor.h" 24 25 namespace crypto { 26 namespace tink { 27 namespace internal { 28 29 // Struct representing a Wycheproof test vector. 30 struct WycheproofTestVector { 31 std::string comment; 32 std::string key; 33 std::string nonce; 34 std::string msg; 35 std::string ct; 36 std::string aad; 37 std::string tag; 38 std::string id; 39 std::string expected; 40 }; 41 42 // Read test vectors from the Wycheproof project that are rooted at `root`. 43 std::vector<WycheproofTestVector> ReadWycheproofTestVectors( 44 absl::string_view file_name); 45 46 } // namespace internal 47 } // namespace tink 48 } // namespace crypto 49 50 #endif // TINK_AEAD_INTERNAL_WYCHEPROOF_AEAD_H_ 51