1 /* 2 Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT 3 file at the top-level directory of this distribution. 4 5 Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 6 http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 7 <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 8 option. This file may not be copied, modified, or distributed 9 except according to those terms. 10 */ 11 12 #ifndef SUPPORTED_ALGORITHM_H 13 #define SUPPORTED_ALGORITHM_H 14 15 /*default HKDF SHA256*/ 16 enum hkdf { 17 OSCORE_SHA_256, 18 }; 19 20 enum AEAD_algorithm { 21 //AES-CCM mode 128-bit key, 64-bit tag, 13-byte nonce 22 OSCORE_AES_CCM_16_64_128 = 10, 23 }; 24 25 #define AUTH_TAG_LEN 8 26 #define NONCE_LEN 13 27 #define COMMON_IV_LEN 13 28 #define MASTER_SECRET_LEN_ 16 29 #define RECIPIENT_ID_BUFF_LEN 8 30 #define SENDER_KEY_LEN_ MASTER_SECRET_LEN_ 31 #define RECIPIENT_KEY_LEN_ MASTER_SECRET_LEN_ 32 33 #endif 34