1 /* 2 * WPA Supplicant - Aidl interface to access macsec PSK 3 * Copyright (c) 2023, Google Inc. All rights reserved. 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef WPA_SUPPLICANT_PAE_AIDL_PSK_H 10 #define WPA_SUPPLICANT_PAE_AIDL_PSK_H 11 12 #ifdef _cplusplus 13 extern "C" 14 { 15 #endif // _cplusplus 16 17 /* cak, kek, ick are all reference index only for HAL, not real key, the 18 * HAL will use the actual key */ 19 int aidl_psk_init(); 20 int __must_check aidl_psk_aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, 21 u8 *cipher); 22 int __must_check aidl_psk_aes_unwrap(const u8 *kek, size_t kek_len, int n, 23 const u8 *cipher, u8 *plain); 24 int aidl_psk_icv_hash(const u8 *ick, size_t ick_bytes, const u8 *msg, 25 size_t msg_bytes, u8 *icv); 26 int aidl_psk_sak_aes_cmac(const u8 *cak, size_t cak_bytes, const u8 *ctx, 27 size_t ctx_bytes, u8 *sak, size_t sak_bytes); 28 29 #ifdef _cplusplus 30 } 31 #endif // _cplusplus 32 33 #endif // WPA_SUPPLICANT_PAE_AIDL_PSK_H 34