os/security/cryptoplugins/cryptospiplugins/test/dummyecchwplugin/src/pluginconfig.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoplugins/cryptospiplugins/test/dummyecchwplugin/src/pluginconfig.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,133 @@
     1.4 +/*
     1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @internalComponent
    1.25 + @released
    1.26 + */
    1.27 +#ifndef CCRYPTOAPI_DUMMYECCHWPLUGINCONFIG_H
    1.28 +#define CCRYPTOAPI_DUMMYECCHWPLUGINCONFIG_H
    1.29 +
    1.30 +#include <cryptospi/cryptoparams.h>
    1.31 +#include <e32cmn.h>
    1.32 +#include <cryptospi/romlit.h>
    1.33 +#include "cryptospi/cryptospidef.h"
    1.34 +
    1.35 +namespace DummyEccHwCrypto
    1.36 +    {
    1.37 +    using namespace CryptoSpi;
    1.38 +    /**
    1.39 +     Creator Name
    1.40 +     */
    1.41 +    _ROMLIT16(KNokia, "Nokia");
    1.42 +    /**
    1.43 +     implementation Name
    1.44 +     */
    1.45 +    _ROMLIT16(KEccCipherDescription, "Ecc");
    1.46 +    _ROMLIT16(KEccSignerDescription, "EccSigner");
    1.47 +
    1.48 +    /**
    1.49 +     ECC Cipher Characteristics
    1.50 +     */
    1.51 +    static const TInt32 KCryptoPluginEccCipher = 0xA000D697;
    1.52 +    static const TUid KCryptoPluginEccCipherUid =
    1.53 +        {
    1.54 +        KCryptoPluginEccCipher
    1.55 +        };
    1.56 +    static const TInt32 KECCCipherPaddingModes[] =
    1.57 +        {
    1.58 +        KPaddingModeNone
    1.59 +        };
    1.60 +
    1.61 +    static const TAsymmetricCipherCharacteristics KECC_1 =
    1.62 +        {
    1.63 +        KAsymmetricCipherInterface, /* iInterfaceUID */
    1.64 +        KAlgorithmCipherEcc, /* iAlgorithmUID */
    1.65 +        KCryptoPluginEccCipher, /* iImplementationUID */
    1.66 +        &KNokia, /* iCreatorName */
    1.67 +        EFalse, /* iIsFIPSApproved */
    1.68 +        ETrue, /* iIsHardwareSupported */
    1.69 +        6, /* iMaxConcurrencySupported */
    1.70 +        &KEccCipherDescription, /* iAlgorithmName */
    1.71 +        100, /* iLatency */
    1.72 +        90, /* iThroughput */
    1.73 +        360, /* iMaximumKeyLength */
    1.74 +        KECCCipherPaddingModes, /* iSupportedPaddingModes */
    1.75 +        sizeof(KECCCipherPaddingModes) / sizeof(KECCCipherPaddingModes[0]), /* iPaddingModeNum */
    1.76 +        3
    1.77 +        /* iKeySupportMode */
    1.78 +        };
    1.79 +
    1.80 +    /**
    1.81 +     ECC Signer Characteristics
    1.82 +     */
    1.83 +    static const TInt32 KCryptoPluginEccSigner = 0xA000D698;
    1.84 +    static const TUid KCryptoPluginEccSignerUid =
    1.85 +        {
    1.86 +        KCryptoPluginEccSigner
    1.87 +        };
    1.88 +    static const TInt32 KECCSignerPaddingModes[] =
    1.89 +        {
    1.90 +        KPaddingModeNone
    1.91 +        };
    1.92 +
    1.93 +    static const TAsymmetricSignatureCharacteristics KECCSigner_1 =
    1.94 +        {
    1.95 +        KSignerInterface, /* iInterfaceUID */
    1.96 +        KAlgorithmSignerEcc, /* iAlgorithmUID */
    1.97 +        KCryptoPluginEccSigner, /* iImplementationUID */
    1.98 +        &KNokia, /* iCreatorName */
    1.99 +        EFalse, /* iIsFIPSApproved */
   1.100 +        ETrue, /* iIsHardwareSupported */
   1.101 +        6, /* iMaxConcurrencySupported */
   1.102 +        &KEccSignerDescription, /* iAlgorithmName */
   1.103 +        100, /* iLatency */
   1.104 +        90, /* iThroughput */
   1.105 +        360, /* iMaximumKeyLength */
   1.106 +        KECCCipherPaddingModes, /* iSupportedPaddingModes */
   1.107 +        sizeof(KECCCipherPaddingModes) / sizeof(KECCCipherPaddingModes[0]), /* iPaddingModeNum */
   1.108 +        3
   1.109 +        /* iKeySupportMode */
   1.110 +        };
   1.111 +
   1.112 +    /**
   1.113 +     For each crypto algorithm type implemented in this plugin list the characteristics
   1.114 +     */
   1.115 +
   1.116 +    /**
   1.117 +     Asymmetric Cipher implementation characteristic table
   1.118 +     */
   1.119 +    static const TAsymmetricCipherCharacteristics
   1.120 +            * const KAsymmetricCipherCharacteristics[] =
   1.121 +                {
   1.122 +                &KECC_1
   1.123 +                };
   1.124 +
   1.125 +    /**
   1.126 +     Signer implementation characteristic table
   1.127 +     */
   1.128 +    static const TAsymmetricSignatureCharacteristics
   1.129 +            * const KSignerCharacteristics[] =
   1.130 +                {
   1.131 +                &KECCSigner_1
   1.132 +                };
   1.133 +
   1.134 +    }
   1.135 +
   1.136 +#endif //CCRYPTOAPI_DUMMYECCHWPLUGINCONFIG_H