#ifndef __SECURITY_SCHEME_CONTROLLER_ISSUER_H_
#define __SECURITY_SCHEME_CONTROLLER_ISSUER_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include <stdint.h>
#include <assert.h>
#include <unistd.h>

#include <openssl/rand.h>
#include <openssl/evp.h>

#include "models/issue.h"
#include "models/user.h"
#include "models/verifier.h"

#include "system.h"

#include "config/config.h"

/**
 * Generates the issuer master key.
 *
 * @param master_key the issuer master key
 * @return 0 if success else -1
 */
extern int ie_setup(issuer_master_key_t *master_key);

/**
 * Generates a unique secret key for the user and the verifier.
 *
 * @param parameters the system parameters
 * @param master_key the issuer master key
 * @param ue_identifier the user identifier
 * @param ve_identifier the verifier identifier
 * @param ue_private_key the user private key
 * @param ve_private_key the verifier private key
 * @return 0 if success else -1
 */

extern int ie_issue_U(user_identifier_t ue_identifier,user_private_key_t *ue_private_key);

extern int ie_issue_M(verifier_identifier_t ve_identifier,verifier_private_key_t *ve_private_key);
#ifdef __cplusplus
}
#endif

#endif /* __SECURITY_SCHEME_CONTROLLER_ISSUER_H_ */
