/******************************************************************************/
/* Component Name   ICU-M Interface Library (ICUMIF)                          */
/******************************************************************************/
/* Product      : ICU-M Firmware                                              */
/******************************************************************************/
/*******************************************************************************
* Copyright(C) 2021-2023 Renesas Electronics Corporation.                       
*                                                                               
*          RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY                     
*                                                                               
* These instructions, statements, and programs are the confidential information 
* of Renesas Electronics Corporation. They must be used and modified solely for 
* the purpose for which it was furnished by Renesas Electronics Corporation.    
* All part of them must not be reproduced nor disclosed to others in any form,  
* without the prior written permission of Renesas Electronics Corporation.      
*******************************************************************************/
#if !defined(R_ICUMIF_API_PK_IMPORT_H)
#define R_ICUMIF_API_PK_IMPORT_H

/**********************************************************************************/
/* Service parameters                                                             */
/**********************************************************************************/

typedef struct ISD_PK_IMPORT
{
    union
    {
        const uint8_t          *p_modulus;
        const uint8_t          *p_pub_point_x;
        uint64_t                padding_sys64;
    } ptr1;
    union
    {
        const uint8_t          *p_pub_exp;
        const uint8_t          *p_pub_point_y;
        uint64_t                padding_sys64;
    } ptr2;
    /* added for private key value import */
    union
    {
        const uint8_t          *p_priv_exp;
        const uint8_t          *p_priv_scalar;
        uint64_t                padding_sys64;
    } ptr3;
    union
    {
        const uint8_t          *p_signature;
        uint64_t                padding_sys64;
    } ptr4;
    union
    {
        uint8_t                *p_info;
        uint64_t                padding_sys64;
    } ptr5;
    r_number_format_t       key_format;
    r_number_format_t       sig_format;
    r_key_group_t           key_group;          /* need for x.509 import */
    r_key_index_t           key_id;             /* need for x.509 import */
    r_key_group_t           sig_key_group;      /* need for x.509 import */
    r_key_index_t           sig_key_id;         /* need for x.509 import */
    r_mem_cluster_verif_t   mem_cluster_verif;  /* need for x.509 import */
    r_signature_algo_t      sig_algo;           /* need for x.509 import */
    r_hash_primitive_t      hash_primitive;     /* need for x.509 import */
    r_ecc_curve_t           curve_id;
    union
    {
        uint16_t                point_x_size_in_bits;
        uint16_t                modulus_size_in_bits;
    } size1;
    union
    {
        uint16_t                point_y_size_in_bits;
        uint16_t                pub_exp_size_in_bits;
    } size2;
    /* added for private key value import */
    union
    {
        uint16_t                priv_scalar_size_in_bits;
        uint16_t                priv_exp_size_in_bits;
    } size3;
    uint16_t                sig_size_in_bits;
    uint16_t                info_size_in_bytes;
    union
    {
        const uint8_t          *p_x509_certificate;
        uint64_t                padding_sys64;
    } ptr6;
    uint16_t                x509_certificate_size_in_bytes;
    struct
    {
        r_key_property_flags_t disable_on_debug:1;
        r_key_property_flags_t write_protected:1;
        r_key_property_flags_t  iso15118:1;
    } flags;
    uint8_t                 skip_verify;
} ISD_PK_IMPORT_t;

#endif /* R_ICUMIF_API_PK_IMPORT_H */
