2 * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
17 * @file crypto-params.h
18 * @author Lukasz Kostyra (l.kostyra@samsung.com)
29 static const size_t DEFAULT_AES_IV_LEN = 16; // max acceptable size of IV
30 static const int DEFAULT_AES_GCM_TAG_LEN_BYTES = 16; // length of AES GCM tag
31 static const int DEFAULT_AES_GCM_TAG_LEN_BITS = DEFAULT_AES_GCM_TAG_LEN_BYTES * 8;
32 static const int DERIVED_KEY_LENGTH = 16; // length of AES key derived from password in bytes
33 static const int DERIVED_KEY_LENGTH_BITS = DERIVED_KEY_LENGTH * 8; // as above, in bits
34 static const int DERIVED_KEY_ITERATIONS = 1024; // iteration count used to derive key