le_iks_ecc_interface.h
Go to the documentation of this file.
49 //--------------------------------------------------------------------------------------------------53 //--------------------------------------------------------------------------------------------------56 //--------------------------------------------------------------------------------------------------59 * Connect the current client thread to the service providing this API. Block until the service is63 * called before any other functions in this API. Normally, ConnectService is automatically called68 //--------------------------------------------------------------------------------------------------74 //--------------------------------------------------------------------------------------------------77 * Try to connect the current client thread to the service providing this API. Return with an error81 * called before any other functions in this API. Normally, ConnectService is automatically called90 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).93 //--------------------------------------------------------------------------------------------------99 //--------------------------------------------------------------------------------------------------103 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants106 //--------------------------------------------------------------------------------------------------113 //--------------------------------------------------------------------------------------------------119 * longer a connection to the service, and the functions in this API can't be used. For details, see124 //--------------------------------------------------------------------------------------------------131 //--------------------------------------------------------------------------------------------------138 * This function may be used as part of a key exchange protocol. The shared secret is unpredictable139 * (assuming the private portions of both keys are kept secret) but not uniformly distributed and145 * If the buffer is too small to hold the shared secret the shared secret will be truncated to fit.155 //--------------------------------------------------------------------------------------------------168 //--------------------------------------------------------------------------------------------------176 * bytes. Note that when the key size is 521 bits, zero-valued high-order padding bits are added to191 //--------------------------------------------------------------------------------------------------206 //--------------------------------------------------------------------------------------------------214 * bytes. Note that when the key size is 521 bits, zero-valued high-order padding bits are added to225 //--------------------------------------------------------------------------------------------------240 //--------------------------------------------------------------------------------------------------245 * Hybrid encryption combines an asymmetric encryption system with a symmetric encryption system to250 * ECIES provides hybrid encryption through a method that is more efficient than manually performing252 * generate a shared secret, the shared secret is then used to generate a symmetric key using a KDF268 //--------------------------------------------------------------------------------------------------295 //--------------------------------------------------------------------------------------------------300 * Hybrid encryption combines an asymmetric encryption system with a symmetric encryption system to305 * ECIES provides hybrid encryption through a method that is more efficient than manually performing307 * generate a shared secret, the shared secret is then used to generate a symmetric key using a KDF323 //--------------------------------------------------------------------------------------------------350 //--------------------------------------------------------------------------------------------------352 * Starts a process to encrypt and integrity protect a message with ECIES (Elliptic Curve Integrated355 * Hybrid encryption combines an asymmetric encryption system with a symmetric encryption system to388 //--------------------------------------------------------------------------------------------------403 //--------------------------------------------------------------------------------------------------416 //--------------------------------------------------------------------------------------------------431 //--------------------------------------------------------------------------------------------------436 * larger than or equal to the maximum authentication tag size then the full authentication tag is450 //--------------------------------------------------------------------------------------------------461 //--------------------------------------------------------------------------------------------------466 * Hybrid encryption combines an asymmetric encryption system with a symmetric encryption system to467 * encrypt (possibly long) messages that can only be decrypted with the holder of the private key.468 * Hybrid encryption is usually accomplished by using a symmetric encryption system to bulk encrypt471 * ECIES provides hybrid encryption through a method that is more efficient than manually performing473 * generate a shared secret, the shared secret is then used to generate a symmetric key using a KDF504 //--------------------------------------------------------------------------------------------------519 //--------------------------------------------------------------------------------------------------532 //--------------------------------------------------------------------------------------------------547 //--------------------------------------------------------------------------------------------------560 //--------------------------------------------------------------------------------------------------void le_iks_ecc_DisconnectService(void)le_result_t le_iks_ecc_Ecdsa_GenSig(uint64_t keyRef, const uint8_t *digestPtr, size_t digestSize, uint8_t *signaturePtr, size_t *signatureSizePtr)void le_iks_ecc_ConnectService(void)le_result_t le_iks_ecc_Ecies_Encrypt(uint64_t session, const uint8_t *plaintextChunkPtr, size_t plaintextChunkSize, uint8_t *ciphertextChunkPtr, size_t *ciphertextChunkSizePtr)le_result_t le_iks_ecc_Ecies_DoneEncrypt(uint64_t session, uint8_t *tagPtr, size_t *tagSizePtr)le_result_t le_iks_ecc_Ecies_StartDecrypt(uint64_t session, const uint8_t *labelPtr, size_t labelSize, const uint8_t *ephemKeyPtr, size_t ephemKeySize)le_result_t le_iks_ecc_Ecies_DoneDecrypt(uint64_t session, const uint8_t *tagPtr, size_t tagSize)le_result_t le_iks_ecc_Ecdh_GetSharedSecret(uint64_t privKeyRef, uint64_t pubKeyRef, uint8_t *secretPtr, size_t *secretSizePtr)le_result_t le_iks_ecc_Ecies_Decrypt(uint64_t session, const uint8_t *ciphertextChunkPtr, size_t ciphertextChunkSize, uint8_t *plaintextChunkPtr, size_t *plaintextChunkSizePtr)le_result_t le_iks_ecc_Ecies_StartEncrypt(uint64_t session, const uint8_t *labelPtr, size_t labelSize, uint8_t *ephemKeyPtr, size_t *ephemKeySizePtr)le_result_t le_iks_ecc_Ecies_EncryptPacket(uint64_t keyRef, const uint8_t *labelPtr, size_t labelSize, const uint8_t *plaintextPtr, size_t plaintextSize, uint8_t *ciphertextPtr, size_t *ciphertextSizePtr, uint8_t *ephemKeyPtr, size_t *ephemKeySizePtr, uint8_t *tagPtr, size_t *tagSizePtr)void(* le_iks_ecc_DisconnectHandler_t)(void *)Definition: le_iks_ecc_interface.h:54le_result_t le_iks_ecc_Ecies_DecryptPacket(uint64_t keyRef, const uint8_t *labelPtr, size_t labelSize, const uint8_t *ephemKeyPtr, size_t ephemKeySize, const uint8_t *ciphertextPtr, size_t ciphertextSize, uint8_t *plaintextPtr, size_t *plaintextSizePtr, const uint8_t *tagPtr, size_t tagSize)LE_FULL_API void le_iks_ecc_SetServerDisconnectHandler(le_iks_ecc_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_iks_ecc_Ecdsa_VerifySig(uint64_t keyRef, const uint8_t *digestPtr, size_t digestSize, const uint8_t *signaturePtr, size_t signatureSize)le_result_t le_iks_ecc_TryConnectService(void)