cryptoplugins/cryptospiplugins/test/dummyecchwplugin/src/pluginconfig.h
changeset 15 da2ae96f639b
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent
       
    22  @released
       
    23  */
       
    24 #ifndef CCRYPTOAPI_DUMMYECCHWPLUGINCONFIG_H
       
    25 #define CCRYPTOAPI_DUMMYECCHWPLUGINCONFIG_H
       
    26 
       
    27 #include <cryptospi/cryptoparams.h>
       
    28 #include <e32cmn.h>
       
    29 #include <cryptospi/romlit.h>
       
    30 #include "cryptospi/cryptospidef.h"
       
    31 
       
    32 namespace DummyEccHwCrypto
       
    33     {
       
    34     using namespace CryptoSpi;
       
    35     /**
       
    36      Creator Name
       
    37      */
       
    38     _ROMLIT16(KNokia, "Nokia");
       
    39     /**
       
    40      implementation Name
       
    41      */
       
    42     _ROMLIT16(KEccCipherDescription, "Ecc");
       
    43     _ROMLIT16(KEccSignerDescription, "EccSigner");
       
    44 
       
    45     /**
       
    46      ECC Cipher Characteristics
       
    47      */
       
    48     static const TInt32 KCryptoPluginEccCipher = 0xA000D697;
       
    49     static const TUid KCryptoPluginEccCipherUid =
       
    50         {
       
    51         KCryptoPluginEccCipher
       
    52         };
       
    53     static const TInt32 KECCCipherPaddingModes[] =
       
    54         {
       
    55         KPaddingModeNone
       
    56         };
       
    57 
       
    58     static const TAsymmetricCipherCharacteristics KECC_1 =
       
    59         {
       
    60         KAsymmetricCipherInterface, /* iInterfaceUID */
       
    61         KAlgorithmCipherEcc, /* iAlgorithmUID */
       
    62         KCryptoPluginEccCipher, /* iImplementationUID */
       
    63         &KNokia, /* iCreatorName */
       
    64         EFalse, /* iIsFIPSApproved */
       
    65         ETrue, /* iIsHardwareSupported */
       
    66         6, /* iMaxConcurrencySupported */
       
    67         &KEccCipherDescription, /* iAlgorithmName */
       
    68         100, /* iLatency */
       
    69         90, /* iThroughput */
       
    70         360, /* iMaximumKeyLength */
       
    71         KECCCipherPaddingModes, /* iSupportedPaddingModes */
       
    72         sizeof(KECCCipherPaddingModes) / sizeof(KECCCipherPaddingModes[0]), /* iPaddingModeNum */
       
    73         3
       
    74         /* iKeySupportMode */
       
    75         };
       
    76 
       
    77     /**
       
    78      ECC Signer Characteristics
       
    79      */
       
    80     static const TInt32 KCryptoPluginEccSigner = 0xA000D698;
       
    81     static const TUid KCryptoPluginEccSignerUid =
       
    82         {
       
    83         KCryptoPluginEccSigner
       
    84         };
       
    85     static const TInt32 KECCSignerPaddingModes[] =
       
    86         {
       
    87         KPaddingModeNone
       
    88         };
       
    89 
       
    90     static const TAsymmetricSignatureCharacteristics KECCSigner_1 =
       
    91         {
       
    92         KSignerInterface, /* iInterfaceUID */
       
    93         KAlgorithmSignerEcc, /* iAlgorithmUID */
       
    94         KCryptoPluginEccSigner, /* iImplementationUID */
       
    95         &KNokia, /* iCreatorName */
       
    96         EFalse, /* iIsFIPSApproved */
       
    97         ETrue, /* iIsHardwareSupported */
       
    98         6, /* iMaxConcurrencySupported */
       
    99         &KEccSignerDescription, /* iAlgorithmName */
       
   100         100, /* iLatency */
       
   101         90, /* iThroughput */
       
   102         360, /* iMaximumKeyLength */
       
   103         KECCCipherPaddingModes, /* iSupportedPaddingModes */
       
   104         sizeof(KECCCipherPaddingModes) / sizeof(KECCCipherPaddingModes[0]), /* iPaddingModeNum */
       
   105         3
       
   106         /* iKeySupportMode */
       
   107         };
       
   108 
       
   109     /**
       
   110      For each crypto algorithm type implemented in this plugin list the characteristics
       
   111      */
       
   112 
       
   113     /**
       
   114      Asymmetric Cipher implementation characteristic table
       
   115      */
       
   116     static const TAsymmetricCipherCharacteristics
       
   117             * const KAsymmetricCipherCharacteristics[] =
       
   118                 {
       
   119                 &KECC_1
       
   120                 };
       
   121 
       
   122     /**
       
   123      Signer implementation characteristic table
       
   124      */
       
   125     static const TAsymmetricSignatureCharacteristics
       
   126             * const KSignerCharacteristics[] =
       
   127                 {
       
   128                 &KECCSigner_1
       
   129                 };
       
   130 
       
   131     }
       
   132 
       
   133 #endif //CCRYPTOAPI_DUMMYECCHWPLUGINCONFIG_H