1// Copyright 2020 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 17package subtle_test 18 19import "github.com/google/tink/go/testutil" 20 21type macSuite struct { 22 testutil.WycheproofSuite 23 TestGroups []*macGroup `json:"testGroups"` 24} 25 26type macGroup struct { 27 testutil.WycheproofGroup 28 KeySize uint32 `json:"keySize"` 29 TagSize uint32 `json:"tagSize"` 30 Type string `json:"type"` 31 Tests []*macCase `json:"tests"` 32} 33 34type macCase struct { 35 testutil.WycheproofCase 36 Key testutil.HexBytes `json:"key"` 37 Message testutil.HexBytes `json:"msg"` 38 Tag testutil.HexBytes `json:"tag"` 39} 40 41type hkdfSuite struct { 42 testutil.WycheproofSuite 43 TestGroups []*hkdfGroup `json:"testGroups"` 44} 45 46type hkdfGroup struct { 47 testutil.WycheproofGroup 48 KeySize uint32 `json:"keySize"` 49 Type string `json:"type"` 50 Tests []*hkdfCase `json:"tests"` 51} 52 53type hkdfCase struct { 54 testutil.WycheproofCase 55 IKM testutil.HexBytes `json:"ikm"` 56 Salt testutil.HexBytes `json:"salt"` 57 Info testutil.HexBytes `json:"info"` 58 Size uint32 `json:"size"` 59 OKM testutil.HexBytes `json:"okm"` 60} 61