S2OPC OPCUA Toolkit
sopc_crypto_provider.h
Go to the documentation of this file.
1 /*
2  * Licensed to Systerel under one or more contributor license
3  * agreements. See the NOTICE file distributed with this work
4  * for additional information regarding copyright ownership.
5  * Systerel licenses this file to you under the Apache
6  * License, Version 2.0 (the "License"); you may not use this
7  * file except in compliance with the License. You may obtain
8  * a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
26 #ifndef SOPC_CRYPTO_PROVIDER_H_
27 #define SOPC_CRYPTO_PROVIDER_H_
28 
29 #include "sopc_crypto_decl.h"
30 #include "sopc_key_manager.h"
31 #include "sopc_key_sets.h"
32 #include "sopc_pki.h"
33 #include "sopc_secret_buffer.h"
34 
35 #include "sopc_enums.h"
36 
46 {
66 };
67 
68 /* ------------------------------------------------------------------------------------------------
69  * CryptoProvider
70  * ------------------------------------------------------------------------------------------------
71  */
72 
88 
104 
111 
120 
129 
136 
143 
144 /* ------------------------------------------------------------------------------------------------
145  * CryptoProvider get-length & uris operations
146  * ------------------------------------------------------------------------------------------------
147  */
148 
164  uint32_t* pLength);
165 
182  uint32_t lengthIn,
183  uint32_t* pLengthOut);
184 
201  uint32_t lengthIn,
202  uint32_t* pLengthOut);
203 
219  uint32_t* pLength);
220 
234  uint32_t* pLength);
235 
257  uint32_t* pCipherTextBlockSize,
258  uint32_t* pPlainTextBlockSize);
259 
273  uint32_t* pLenNonce);
274 
292  uint32_t* pSymmCryptoKeyLength,
293  uint32_t* pSymmSignKeyLength,
294  uint32_t* pSymmInitVectorLength);
295 
315  const SOPC_AsymmetricKey* pKey,
316  uint32_t* pLenKeyBits);
317 
335  const SOPC_AsymmetricKey* pKey,
336  uint32_t* pLenKeyBytes);
337 
346  uint32_t* length);
347 
356  uint32_t* length);
357 
377  const SOPC_AsymmetricKey* pKey,
378  uint32_t* pCipherTextBlockSize,
379  uint32_t* pPlainTextBlockSize);
380 
398  const SOPC_AsymmetricKey* pKey,
399  uint32_t* pLenMsg);
400 
417  const SOPC_AsymmetricKey* pKey,
418  uint32_t* pLenMsg);
419 
437  const SOPC_AsymmetricKey* pKey,
438  uint32_t lengthIn,
439  uint32_t* pLengthOut);
440 
459  const SOPC_AsymmetricKey* pKey,
460  uint32_t lengthIn,
461  uint32_t* pLengthOut);
462 
479  const SOPC_AsymmetricKey* pKey,
480  uint32_t* pLength);
481 
492 
506  uint32_t* pLength);
507 
524 
541  uint32_t* pLength);
542 
543 /* ------------------------------------------------------------------------------------------------
544  * Symmetric cryptography
545  * ------------------------------------------------------------------------------------------------
546  */
547 
576  const uint8_t* pInput,
577  uint32_t lenPlainText,
578  SOPC_SecretBuffer* pKey,
579  SOPC_SecretBuffer* pIV,
580  uint8_t* pOutput,
581  uint32_t lenOutput);
582 
613  const uint8_t* pInput,
614  uint32_t lenCipherText,
615  SOPC_SecretBuffer* pKey,
616  SOPC_SecretBuffer* pIV,
617  uint8_t* pOutput,
618  uint32_t lenOutput);
619 
653  const uint8_t* pInput,
654  uint32_t lenInput,
655  SOPC_SecretBuffer* pKey,
656  SOPC_SecretBuffer* pKeyNonce,
657  const SOPC_ExposedBuffer* pRandom,
658  uint32_t lenRandom,
659  uint32_t uSequenceNumber,
660  uint8_t* pOutput,
661  uint32_t lenOutput);
662 
690  const uint8_t* pInput,
691  uint32_t lenInput,
692  SOPC_SecretBuffer* pKey,
693  uint8_t* pOutput,
694  uint32_t lenOutput);
695 
724  const uint8_t* pInput,
725  uint32_t lenInput,
726  SOPC_SecretBuffer* pKey,
727  const uint8_t* pSignature,
728  uint32_t lenOutput);
729 
730 /* ------------------------------------------------------------------------------------------------
731  * Random and pseudo-random functionalities
732  * ------------------------------------------------------------------------------------------------
733  */
734 
757  uint32_t nBytes,
758  SOPC_ExposedBuffer** ppBuffer);
759 
779  SOPC_SecretBuffer** ppNonce);
780 
796 
806  const SOPC_ExposedBuffer* pSecret,
807  uint32_t lenSecret,
808  const SOPC_ExposedBuffer* pSeed,
809  uint32_t lenSeed,
810  SOPC_ExposedBuffer* pOutput,
811  uint32_t lenOutput);
812 
838  const SOPC_ExposedBuffer* pClientNonce,
839  uint32_t lenClientNonce,
840  const SOPC_ExposedBuffer* pServerNonce,
841  uint32_t lenServerNonce,
842  SOPC_SC_SecurityKeySet* pClientKeySet,
843  SOPC_SC_SecurityKeySet* pServerKeySet);
844 
868  SOPC_SecretBuffer* pClientNonce,
869  const SOPC_ExposedBuffer* pServerNonce,
870  uint32_t lenServerNonce,
871  SOPC_SC_SecurityKeySet* pClientKeySet,
872  SOPC_SC_SecurityKeySet* pServerKeySet);
873 
897  const SOPC_ExposedBuffer* pClientNonce,
898  uint32_t lenClientNonce,
899  SOPC_SecretBuffer* pServerNonce,
900  SOPC_SC_SecurityKeySet* pClientKeySet,
901  SOPC_SC_SecurityKeySet* pServerKeySet);
902 
903 /* ------------------------------------------------------------------------------------------------
904  * Asymmetric cryptography
905  * ------------------------------------------------------------------------------------------------
906  */
907 
939  const uint8_t* pInput,
940  uint32_t lenInput,
941  const SOPC_AsymmetricKey* pKey,
942  uint8_t* pOutput,
943  uint32_t lenOutput,
944  const char** errorReason);
945 
979  const uint8_t* pInput,
980  uint32_t lenInput,
981  const SOPC_AsymmetricKey* pKey,
982  uint8_t* pOutput,
983  uint32_t lenOutput,
984  uint32_t* pLenWritten,
985  const char** errorReason);
986 
1024  const uint8_t* pInput,
1025  uint32_t lenInput,
1026  const SOPC_AsymmetricKey* pKeyPrivateLocal,
1027  uint8_t* pSignature,
1028  uint32_t lenSignature,
1029  const char** errorReason);
1030 
1064  const uint8_t* pInput,
1065  uint32_t lenInput,
1066  const SOPC_AsymmetricKey* pKeyRemotePublic,
1067  const uint8_t* pSignature,
1068  uint32_t lenSignature,
1069  const char** errorReason);
1070 
1071 /* ------------------------------------------------------------------------------------------------
1072  * Certificate validation
1073  * ------------------------------------------------------------------------------------------------
1074  */
1075 
1100  const SOPC_PKIProvider* pPKI,
1101  const SOPC_CertificateList* pCert,
1102  uint32_t* error);
1103 
1104 #endif /* SOPC_CRYPTO_PROVIDER_H_ */
SOPC_CryptoProvider_PubSubGetLength_MessageRandom
SOPC_ReturnStatus SOPC_CryptoProvider_PubSubGetLength_MessageRandom(const SOPC_CryptoProvider *pProvider, uint32_t *pLength)
Writes the length in bytes in pLength of the random bytes used for PubSub encryption/decryption.
SOPC_CryptoProvider_GetProfileServices
const SOPC_CryptoProfile * SOPC_CryptoProvider_GetProfileServices(const SOPC_CryptoProvider *pProvider)
Returns the non NULL client-server crypto profile but returns NULL if the PubSub profile is non NULL.
SOPC_CryptoProvider_DeriveGetLengths
SOPC_ReturnStatus SOPC_CryptoProvider_DeriveGetLengths(const SOPC_CryptoProvider *pProvider, uint32_t *pSymmCryptoKeyLength, uint32_t *pSymmSignKeyLength, uint32_t *pSymmInitVectorLength)
Provides the lengths in bytes of the secrets derived from the nonce exchange.
sopc_pki.h
Defines the common interface that a PKI should provide. This is a minimal interface,...
SOPC_CryptoProvider_AsymmetricGetLength_MsgCipherText
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_MsgCipherText(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t *pLenMsg)
Provides the length in bytes of a ciphered message to be decrypted with a single asymmetric decryptio...
SOPC_CryptoProvider::pCryptolibContext
SOPC_CryptolibContext * pCryptolibContext
Definition: sopc_crypto_provider.h:65
SOPC_CryptoProvider_DeriveKeySets
SOPC_ReturnStatus SOPC_CryptoProvider_DeriveKeySets(const SOPC_CryptoProvider *pProvider, const SOPC_ExposedBuffer *pClientNonce, uint32_t lenClientNonce, const SOPC_ExposedBuffer *pServerNonce, uint32_t lenServerNonce, SOPC_SC_SecurityKeySet *pClientKeySet, SOPC_SC_SecurityKeySet *pServerKeySet)
Derive pseudo-random key sets from the randomly generated and shared secrets.
SOPC_CryptoProvider_GetProfilePubSub
const SOPC_CryptoProfile_PubSub * SOPC_CryptoProvider_GetProfilePubSub(const SOPC_CryptoProvider *pProvider)
Returns the non NULL PubSub crypto profile but returns NULL if the client-server profile is non NULL.
SOPC_CertificateList
The signed public key representation, or a chained list of such keys.
Definition: key_manager_lib.h:63
SOPC_CryptoProvider_AsymmetricEncrypt
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricEncrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_AsymmetricKey *pKey, uint8_t *pOutput, uint32_t lenOutput, const char **errorReason)
Encrypts a payload pInput of lenInput bytes.
SOPC_PKIProvider
The PKIProvider object defines the common interface for the Public Key Infrastructure.
Definition: sopc_pki.h:71
SOPC_CryptoProvider::pProfilePubSub
const SOPC_CryptoProfile_PubSub *const pProfilePubSub
Definition: sopc_crypto_provider.h:60
sopc_key_manager.h
The SOPC_KeyManager provides an API for Asymmetric Key Management such as loading signed public keys ...
SOPC_CryptoProvider_Create
SOPC_CryptoProvider * SOPC_CryptoProvider_Create(const char *uri)
Creates an initialized SOPC_CryptoProvider context for a client-server connection from a string conta...
SOPC_CryptoProvider_DerivePseudoRandomData
SOPC_ReturnStatus SOPC_CryptoProvider_DerivePseudoRandomData(const SOPC_CryptoProvider *pProvider, const SOPC_ExposedBuffer *pSecret, uint32_t lenSecret, const SOPC_ExposedBuffer *pSeed, uint32_t lenSeed, SOPC_ExposedBuffer *pOutput, uint32_t lenOutput)
Derives pseudo-random data from the randomly generated and shared secrets.
SOPC_CryptoProvider_GenerateRandomID
SOPC_ReturnStatus SOPC_CryptoProvider_GenerateRandomID(const SOPC_CryptoProvider *pProvider, uint32_t *pID)
Generates 4 bytes of truly random data.
SOPC_CryptoProvider_AsymmetricGetLength_MsgPlainText
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_MsgPlainText(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t *pLenMsg)
Provides the maximum length in bytes of a message to be encrypted with a single asymmetric encryption...
SOPC_CryptoProvider_SymmetricGetLength_Signature
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_Signature(const SOPC_CryptoProvider *pProvider, uint32_t *pLength)
Provides the length in bytes of the symmetric signature message.
SOPC_CryptoProvider_AsymmetricDecrypt
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricDecrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_AsymmetricKey *pKey, uint8_t *pOutput, uint32_t lenOutput, uint32_t *pLenWritten, const char **errorReason)
Decrypts a payload pInput of lenInput bytes.
SOPC_CryptoProvider_AsymmetricGetLength_KeyBits
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_KeyBits(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t *pLenKeyBits)
Writes the length in bits in pLenKeyBits of the asymmetric key pKey.
sopc_crypto_decl.h
Defines the common declarations for the cryptographic objects.
SOPC_CryptoProvider_GenerateRandomBytes
SOPC_ReturnStatus SOPC_CryptoProvider_GenerateRandomBytes(const SOPC_CryptoProvider *pProvider, uint32_t nBytes, SOPC_ExposedBuffer **ppBuffer)
Generates truly random data of arbitrary length.
SOPC_CryptoProvider_Deinit
SOPC_ReturnStatus SOPC_CryptoProvider_Deinit(SOPC_CryptoProvider *pCryptoProvider)
Deinitializes a SOPC_CryptoProvider context (this process is specific to the chosen cryptographic lib...
sopc_enums.h
SOPC_CryptolibContext
Definition: crypto_provider_lib.h:32
SOPC_CryptoProvider
The SOPC_CryptoProvider context.
Definition: sopc_crypto_provider.h:46
SOPC_CryptoProvider_AsymmetricGetLength_Encryption
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_Encryption(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t lengthIn, uint32_t *pLengthOut)
Calculates the size of the required output buffer to cipher lengthIn bytes through asymmetric encrypt...
SOPC_CryptoProvider_SymmetricVerify
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricVerify(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, SOPC_SecretBuffer *pKey, const uint8_t *pSignature, uint32_t lenOutput)
Verifies the signature pSignature of the payload pInput of lenInput bytes.
SOPC_CryptoProvider_SymmetricDecrypt
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricDecrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenCipherText, SOPC_SecretBuffer *pKey, SOPC_SecretBuffer *pIV, uint8_t *pOutput, uint32_t lenOutput)
Decrypts a payload pInput of lenPlainText bytes into a padded deciphered payload pOutput.
SOPC_CryptoProvider_AsymmetricGetLength_KeyBytes
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_KeyBytes(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t *pLenKeyBytes)
Writes the length in bytes in pLenKeyBytes of the asymmetric key pKey.
SOPC_CryptoProvider_GenerateSecureChannelNonce
SOPC_ReturnStatus SOPC_CryptoProvider_GenerateSecureChannelNonce(const SOPC_CryptoProvider *pProvider, SOPC_SecretBuffer **ppNonce)
Generates a single truly random nonce for the SecureChannel creation.
SOPC_CryptoProvider_AsymmetricGetLength_OAEPHashLength
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_OAEPHashLength(const SOPC_CryptoProvider *pProvider, uint32_t *length)
Provides the length of the hash used for OAEP encryption/decryption.
SOPC_CryptoProvider_AsymmetricGetLength_PSSHashLength
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_PSSHashLength(const SOPC_CryptoProvider *pProvider, uint32_t *length)
Provides the length of the hash used for PSS signature/verification.
SOPC_CryptoProvider_DeriveKeySetsServer
SOPC_ReturnStatus SOPC_CryptoProvider_DeriveKeySetsServer(const SOPC_CryptoProvider *pProvider, const SOPC_ExposedBuffer *pClientNonce, uint32_t lenClientNonce, SOPC_SecretBuffer *pServerNonce, SOPC_SC_SecurityKeySet *pClientKeySet, SOPC_SC_SecurityKeySet *pServerKeySet)
Derive pseudo-random key sets from the randomly generated and shared secrets.
SOPC_CryptoProvider_SymmetricSign
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricSign(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, SOPC_SecretBuffer *pKey, uint8_t *pOutput, uint32_t lenOutput)
Signs a payload pInput of lenInput bytes, writes the signature in pOutput of lenOutput bytes.
SOPC_CryptoProvider_Init
SOPC_ReturnStatus SOPC_CryptoProvider_Init(SOPC_CryptoProvider *pCryptoProvider)
Initializes a SOPC_CryptoProvider context. Called by SOPC_CryptoProvider_Create() upon context creati...
SOPC_CryptoProvider_SymmetricEncrypt
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricEncrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenPlainText, SOPC_SecretBuffer *pKey, SOPC_SecretBuffer *pIV, uint8_t *pOutput, uint32_t lenOutput)
Encrypts a padded payload pInput of lenPlainText bytes.
SOPC_CryptoProvider_SymmetricGetLength_SecureChannelNonce
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_SecureChannelNonce(const SOPC_CryptoProvider *pProvider, uint32_t *pLenNonce)
Provides the length in bytes of the SecureChannel nonces used in the symmetric encryption process.
SOPC_CryptoProvider_PubSubCrypt
SOPC_ReturnStatus SOPC_CryptoProvider_PubSubCrypt(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, SOPC_SecretBuffer *pKey, SOPC_SecretBuffer *pKeyNonce, const SOPC_ExposedBuffer *pRandom, uint32_t lenRandom, uint32_t uSequenceNumber, uint8_t *pOutput, uint32_t lenOutput)
Encrypts or Decrypts a payload pInput of lenInput bytes.
SOPC_CryptoProvider_SymmetricGetLength_CryptoKey
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_CryptoKey(const SOPC_CryptoProvider *pProvider, uint32_t *pLength)
Writes the length in bytes in pLength of the key used for symmetric encryption/decryption.
SOPC_CryptoProvider_Free
void SOPC_CryptoProvider_Free(SOPC_CryptoProvider *pCryptoProvider)
Frees a SOPC_CryptoProvider created with SOPC_CryptoProvider_Create().
SOPC_CryptoProvider_CreatePubSub
SOPC_CryptoProvider * SOPC_CryptoProvider_CreatePubSub(const char *uri)
Creates an initialized SOPC_CryptoProvider context for PubSub exchanges from a string containing the ...
SOPC_CryptoProvider_SymmetricGetLength_Decryption
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_Decryption(const SOPC_CryptoProvider *pProvider, uint32_t lengthIn, uint32_t *pLengthOut)
Writes the length in bytes in pLengthOut of a decrypted message of lengthIn bytes.
SOPC_CryptoProvider_AsymmetricVerify
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricVerify(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_AsymmetricKey *pKeyRemotePublic, const uint8_t *pSignature, uint32_t lenSignature, const char **errorReason)
Verifies the signature pSignature of a payload pInput of lenInput bytes.
SOPC_CryptoProvider_DeriveKeySetsClient
SOPC_ReturnStatus SOPC_CryptoProvider_DeriveKeySetsClient(const SOPC_CryptoProvider *pProvider, SOPC_SecretBuffer *pClientNonce, const SOPC_ExposedBuffer *pServerNonce, uint32_t lenServerNonce, SOPC_SC_SecurityKeySet *pClientKeySet, SOPC_SC_SecurityKeySet *pServerKeySet)
Derive pseudo-random key sets from the randomly generated and shared secrets.
SOPC_CryptoProvider_PubSubGetLength_KeyNonce
SOPC_ReturnStatus SOPC_CryptoProvider_PubSubGetLength_KeyNonce(const SOPC_CryptoProvider *pProvider, uint32_t *pLength)
Writes the length in bytes in pLength of the key nonce used for PubSub encryption/decryption.
SOPC_CryptoProvider_AsymmetricGetLength_Decryption
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_Decryption(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t lengthIn, uint32_t *pLengthOut)
Calculates the size of the required output buffer to decipher lengthIn bytes through asymmetric decry...
sopc_key_sets.h
SOPC_AsymmetricKey
The asymmetric key representation.
Definition: key_manager_lib.h:43
SOPC_CryptoProvider::pProfile
const SOPC_CryptoProfile *const pProfile
Definition: sopc_crypto_provider.h:53
SOPC_CryptoProvider_Certificate_Validate
SOPC_ReturnStatus SOPC_CryptoProvider_Certificate_Validate(const SOPC_CryptoProvider *pProvider, const SOPC_PKIProvider *pPKI, const SOPC_CertificateList *pCert, uint32_t *error)
Validates the given Certificate pCert.
SOPC_CryptoProfile
SOPC_CryptoProfiles gather pointers to cryptographic functions of the security policies of OPC UA Ser...
Definition: sopc_crypto_profiles.h:186
SOPC_SC_SecurityKeySet
Definition: sopc_key_sets.h:26
SOPC_CryptoProfile_PubSub
SOPC_CryptoProfiles_PubSub gather pointers to cryptographic functions of the security policies of OPC...
Definition: sopc_crypto_profiles.h:211
SOPC_SecretBuffer
struct SOPC_SecretBuffer SOPC_SecretBuffer
Definition: sopc_secret_buffer.h:35
SOPC_CryptoProvider_AsymmetricGetLength_Signature
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_Signature(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t *pLength)
Calculates the size of the required output buffer to contain the asymmetric signature.
SOPC_ExposedBuffer
uint8_t SOPC_ExposedBuffer
Definition: sopc_secret_buffer.h:36
SOPC_CryptoProvider_AsymmetricGetLength_Msgs
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricGetLength_Msgs(const SOPC_CryptoProvider *pProvider, const SOPC_AsymmetricKey *pKey, uint32_t *pCipherTextBlockSize, uint32_t *pPlainTextBlockSize)
Provides the lengths in bytes of the messages used in asymmetric encryption process.
SOPC_CryptoProvider_SymmetricGetLength_Blocks
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_Blocks(const SOPC_CryptoProvider *pProvider, uint32_t *pCipherTextBlockSize, uint32_t *pPlainTextBlockSize)
Provides the lengths in bytes of the blocks used in the symmetric encryption process.
SOPC_CryptoProvider_AsymmetricSign
SOPC_ReturnStatus SOPC_CryptoProvider_AsymmetricSign(const SOPC_CryptoProvider *pProvider, const uint8_t *pInput, uint32_t lenInput, const SOPC_AsymmetricKey *pKeyPrivateLocal, uint8_t *pSignature, uint32_t lenSignature, const char **errorReason)
Signs a payload pInput of lenInput bytes.
sopc_secret_buffer.h
SecretBuffer (mangled key) and ExposedBuffer (contiguous deciphered buffered) APIs.
SOPC_CryptoProvider_AsymmetricGetUri_SignAlgorithm
const char * SOPC_CryptoProvider_AsymmetricGetUri_SignAlgorithm(const SOPC_CryptoProvider *pProvider)
Returns the URI of the AsymetricSignatureAlgorithm.
SOPC_CryptoProvider_SymmetricGetLength_SignKey
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_SignKey(const SOPC_CryptoProvider *pProvider, uint32_t *pLength)
Writes the length in bytes in pLength of the key used for symmetric signature.
SOPC_CryptoProvider_SymmetricGetLength_Encryption
SOPC_ReturnStatus SOPC_CryptoProvider_SymmetricGetLength_Encryption(const SOPC_CryptoProvider *pProvider, uint32_t lengthIn, uint32_t *pLengthOut)
Writes the length in bytes in pLengthOut of an encrypted message of lengthIn bytes.
SOPC_CryptoProvider_CertificateGetLength_Thumbprint
SOPC_ReturnStatus SOPC_CryptoProvider_CertificateGetLength_Thumbprint(const SOPC_CryptoProvider *pProvider, uint32_t *pLength)
Calculates the size of the signature of the certificates.
SOPC_ReturnStatus
SOPC_ReturnStatus
Definition: libs2opc_client.h:61