Go to the documentation of this file.
27 #ifndef SOPC_CRYPTO_PROFILES_H_
28 #define SOPC_CRYPTO_PROFILES_H_
35 #include "s2opc_common_export.h"
52 #define SOPC_SecurityPolicy_Basic256Sha256_URI "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"
53 #define SOPC_SecurityPolicy_Basic256_URI "http://opcfoundation.org/UA/SecurityPolicy#Basic256"
54 #define SOPC_SecurityPolicy_None_URI "http://opcfoundation.org/UA/SecurityPolicy#None"
55 #define SOPC_SecurityPolicy_PubSub_Aes256_URI "http://opcfoundation.org/UA/SecurityPolicy#PubSub-Aes256-CTR"
56 #define SOPC_SecurityPolicy_Aes128Sha256RsaOaep_URI "http://opcfoundation.org/UA/SecurityPolicy#Aes128_Sha256_RsaOaep"
57 #define SOPC_SecurityPolicy_Aes256Sha256RsaPss_URI "http://opcfoundation.org/UA/SecurityPolicy#Aes256_Sha256_RsaPss"
59 #define SOPC_SecurityPolicy_Basic256Sha256_URI_SignAlgo "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
60 #define SOPC_SecurityPolicy_Aes128Sha256RsaOaep_URI_SignAlgo "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
61 #define SOPC_SecurityPolicy_Aes256Sha256RsaPss_URI_SignAlgo "http://opcfoundation.org/UA/security/rsa-pss-sha2-256"
62 #define SOPC_SecurityPolicy_Basic256_URI_SignAlgo "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
100 const uint8_t* pInput,
101 uint32_t lenPlainText,
107 const uint8_t* pInput,
108 uint32_t lenCipherText,
114 const uint8_t* pInput,
119 const uint8_t* pInput,
122 const uint8_t* pSignature);
134 const uint8_t* pInput,
135 uint32_t lenPlainText,
139 const uint8_t* pInput,
140 uint32_t lenCipherText,
143 uint32_t* lenWritten);
145 const uint8_t* pInput,
148 uint8_t* pSignature);
150 const uint8_t* pInput,
153 const uint8_t* pSignature);
156 const uint8_t* pInput,
161 uint32_t uSequenceNumber,
uint32_t symmLen_MessageRandom
Definition: sopc_crypto_profiles.h:77
SOPC_ReturnStatus FnSymmetricVerify(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_ExposedBuffer *pKey, const uint8_t *pSignature)
Definition: sopc_crypto_profiles.h:118
Definition: sopc_crypto_profiles.h:65
FnGenerateRandom *const pFnGenRnd
Definition: sopc_crypto_profiles.h:187
uint32_t symmLen_Signature
Definition: sopc_crypto_profiles.h:74
@ SOPC_SecurityPolicy_Last_ID
Definition: sopc_crypto_profiles.h:49
SOPC_ReturnStatus FnGenerateRandom(const SOPC_CryptoProvider *pProvider, SOPC_ExposedBuffer *pData, uint32_t lenData)
Definition: sopc_crypto_profiles.h:123
const SOPC_SecurityPolicy_Config * SOPC_SecurityPolicy_Config_Get(SOPC_SecurityPolicy_ID policyId)
FnAsymmetricEncrypt *const pFnAsymEncrypt
Definition: sopc_crypto_profiles.h:189
const SOPC_CryptoProfile_PubSub * psProfile
Definition: sopc_crypto_profiles.h:70
@ SOPC_SecurityPolicy_Aes256Sha256RsaPss_ID
Definition: sopc_crypto_profiles.h:48
const uint32_t SecurityPolicyID
Definition: sopc_crypto_profiles.h:206
struct SOPC_SecurityPolicy_Config SOPC_SecurityPolicy_Config
uint32_t certLen_Thumbprint
Definition: sopc_crypto_profiles.h:82
@ SOPC_SecurityPolicy_None_ID
Definition: sopc_crypto_profiles.h:45
@ SOPC_SecurityPolicy_Basic256_ID
Definition: sopc_crypto_profiles.h:44
FnSymmetricSign *const pFnSymmSign
Definition: sopc_crypto_profiles.h:208
SOPC_ReturnStatus FnAsymmetricEncrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenPlainText, const SOPC_AsymmetricKey *pKey, uint8_t *pOutput)
Definition: sopc_crypto_profiles.h:133
FnDerivePseudoRandomData *const pFnDeriveData
Definition: sopc_crypto_profiles.h:188
SOPC_ReturnStatus FnSymmetricDecrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenCipherText, const SOPC_ExposedBuffer *pKey, const SOPC_ExposedBuffer *pIV, uint8_t *pOutput, uint32_t lenOutput)
Definition: sopc_crypto_profiles.h:106
FnAsymmetricVerify *const pFnAsymVerify
Definition: sopc_crypto_profiles.h:192
FnSymmetricEncrypt *const pFnSymmEncrypt
Definition: sopc_crypto_profiles.h:183
Defines the common declarations for the cryptographic objects. The structures and macros defined in t...
uint32_t asymLen_KeyMinBits
Definition: sopc_crypto_profiles.h:79
const char * name
Definition: sopc_crypto_profiles.h:68
SOPC_ReturnStatus FnSymmetricEncrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenPlainText, const SOPC_ExposedBuffer *pKey, const SOPC_ExposedBuffer *pIV, uint8_t *pOutput, uint32_t lenOutput)
Definition: sopc_crypto_profiles.h:99
FnSymmetricDecrypt *const pFnSymmDecrypt
Definition: sopc_crypto_profiles.h:184
SOPC_ReturnStatus FnPubSubCrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_ExposedBuffer *pKey, const SOPC_ExposedBuffer *pKeyNonce, const SOPC_ExposedBuffer *pRandom, uint32_t uSequenceNumber, uint8_t *pOutput)
Definition: sopc_crypto_profiles.h:155
The SOPC_CryptoProvider context.
Definition: sopc_crypto_provider.h:43
FnGenerateRandom *const pFnGenRnd
Definition: sopc_crypto_profiles.h:210
FnAsymmetricDecrypt *const pFnAsymDecrypt
Definition: sopc_crypto_profiles.h:190
FnPubSubCrypt *const pFnCrypt
Definition: sopc_crypto_profiles.h:207
@ SOPC_SecurityPolicy_Invalid_ID
Definition: sopc_crypto_profiles.h:42
uint8_t secuPolicyWeight
Definition: sopc_crypto_profiles.h:71
SOPC_ReturnStatus FnAsymmetricDecrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenCipherText, const SOPC_AsymmetricKey *pKey, uint8_t *pOutput, uint32_t *lenWritten)
Definition: sopc_crypto_profiles.h:138
FnAsymmetricSign *const pFnAsymSign
Definition: sopc_crypto_profiles.h:191
const SOPC_SecurityPolicy_Config * SOPC_CryptoProfile_Get(const char *uri)
uint32_t symmLen_KeyNonce
Definition: sopc_crypto_profiles.h:76
const SOPC_CryptoProfile_PubSub * SOPC_CryptoProfile_PubSub_Get(const char *uri)
@ SOPC_SecurityPolicy_PubSub_Aes256_ID
Definition: sopc_crypto_profiles.h:46
SOPC_ReturnStatus FnAsymmetricVerify(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_AsymmetricKey *pKey, const uint8_t *pSignature)
Definition: sopc_crypto_profiles.h:149
SOPC_ReturnStatus FnSymmetricSign(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_ExposedBuffer *pKey, uint8_t *pOutput)
Definition: sopc_crypto_profiles.h:113
uint32_t asymLen_KeyMaxBits
Definition: sopc_crypto_profiles.h:80
FnSymmetricVerify *const pFnSymmVerif
Definition: sopc_crypto_profiles.h:209
const SOPC_CryptoProfile * profile
Definition: sopc_crypto_profiles.h:69
The asymmetric key representation.
Definition: key_manager_cyclone.h:42
SOPC_CryptoProfiles gather pointers to cryptographic functions of the security policies of OPC UA Ser...
Definition: sopc_crypto_profiles.h:181
@ SOPC_SecurityPolicy_Basic256Sha256_ID
Definition: sopc_crypto_profiles.h:43
SOPC_CryptoProfiles_PubSub gather pointers to cryptographic functions of the security policies of OPC...
Definition: sopc_crypto_profiles.h:205
uint32_t symmLen_Block
Definition: sopc_crypto_profiles.h:75
uint8_t SOPC_ExposedBuffer
Definition: sopc_secret_buffer.h:36
SOPC_ReturnStatus FnDerivePseudoRandomData(const SOPC_CryptoProvider *pProvider, const SOPC_ExposedBuffer *pSecret, uint32_t lenSecret, const SOPC_ExposedBuffer *pSeed, uint32_t lenSeed, SOPC_ExposedBuffer *pOutput, uint32_t lenOutput)
Definition: sopc_crypto_profiles.h:126
uint32_t symmLen_SignKey
Definition: sopc_crypto_profiles.h:73
@ SOPC_SecurityPolicy_Aes128Sha256RsaOaep_ID
Definition: sopc_crypto_profiles.h:47
SOPC_ReturnStatus FnAsymmetricSign(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_AsymmetricKey *pKey, uint8_t *pSignature)
Definition: sopc_crypto_profiles.h:144
FnSymmetricVerify *const pFnSymmVerif
Definition: sopc_crypto_profiles.h:186
uint32_t secureChannelNonceLength
Definition: sopc_crypto_profiles.h:81
uint32_t symmLen_CryptoKey
Definition: sopc_crypto_profiles.h:72
SOPC_SecurityPolicy_ID
Definition: sopc_crypto_profiles.h:41
const bool isInvalid
Definition: sopc_crypto_profiles.h:67
FnSymmetricSign *const pFnSymmSign
Definition: sopc_crypto_profiles.h:185
const char * URI_SignAlgo
Definition: sopc_crypto_profiles.h:83
const char * uri
Definition: sopc_crypto_profiles.h:66
uint32_t asymLen_OAEP_Hash
Definition: sopc_crypto_profiles.h:78
SOPC_ReturnStatus
Definition: libs2opc_client.h:64
const SOPC_SecurityPolicy_ID SecurityPolicyID
Definition: sopc_crypto_profiles.h:182