/**
 * @file tees_kdf.h
 * @brief GP-like KDF interface defition
 * @author Iaroslav Makarchuk (i.makarchuk@samsung.com)
 * @date Created Oct 3, 2016
 * @par In Samsung Ukraine R&D Center (SURC) under a contract between
 * @par LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine) and
 * @par "Samsung Elecrtronics Co", Ltd (Seoul, Republic of Korea)
 * @par Copyright: (c) Samsung Electronics Co, Ltd 2015. All rights reserved.
 *
 * This software is proprietary of Samsung Electronics.
 * No part of this software, either material or conceptual may be copied
 * or distributed, transmitted, transcribed, stored in a retrieval system
 * or translated into any human or computer language in any form by any means,
 * electronic, mechanical, manual or otherwise, or disclosed to third parties
 * without the express written permission of Samsung Electronics.
 *
 * The file was taken from tzsl repo and modified for Multibuild project's
 * needs.
 */


#ifndef _TEES_KDF_H
#define _TEES_KDF_H

#include <tee_internal_api.h>

/*
 * Description
 * Key Derivation Function(KDF) based on device key
 * Internal implementation of KDF depends on the chipset
 *
 * label            label (see KDF descryption)
 * label_len        label length in bytes
 * context          context (see KDF descryption)
 * context_len      context length in bytes
 * output_key       buffer for derived key
 * output_key_len   required derived key length in bytes
 *
 * \return          TEE_SUCCESS or one of TEE_ERROR_XXXX.
*/

#ifdef  __cplusplus
extern "C" {
#endif

enum tees_function_id {
    ID_TEES_DeriveKeyKDF = 0x001,
};

TEE_Result TEES_DeriveKeyKDF(
		const void* lable, uint32_t lableLen,
		const void* context, uint32_t contextLen,
		uint32_t outputKeyLen, TEE_ObjectHandle object);

#ifdef  __cplusplus
}
#endif

#endif //_TEES_KDF_H
/** @}*/
