37 #ifndef VIRGIL_CRYPTO_PFS_VIRGIL_PFS_H
38 #define VIRGIL_CRYPTO_PFS_VIRGIL_PFS_H
40 #include "../VirgilByteArray.h"
42 #include "VirgilPFSSession.h"
43 #include "VirgilPFSEncryptedMessage.h"
44 #include "VirgilPFSInitiatorPublicInfo.h"
45 #include "VirgilPFSInitiatorPrivateInfo.h"
46 #include "VirgilPFSResponderPublicInfo.h"
47 #include "VirgilPFSResponderPrivateInfo.h"
49 #include "../primitive/VirgilOperationRandom.h"
50 #include "../primitive/VirgilOperationHash.h"
51 #include "../primitive/VirgilOperationDH.h"
52 #include "../primitive/VirgilOperationKDF.h"
53 #include "../primitive/VirgilOperationCipher.h"
55 namespace virgil {
namespace crypto {
namespace pfs {
118 void setRandom(VirgilOperationRandom random);
124 void setDH(VirgilOperationDH dh);
130 void setKDF(VirgilOperationKDF kdf);
136 void setCipher(VirgilOperationCipher cipher);
168 VirgilOperationRandom random_;
169 VirgilOperationDH dh_;
170 VirgilOperationKDF kdf_;
171 VirgilOperationCipher cipher_;
177 #endif //VIRGIL_CRYPTO_PFS_VIRGIL_PFS_H
This is model object that represent session in PFS communication.
Definition: VirgilPFSSession.h:56
This is model object that represent private information of a PFS Initiator.
Definition: VirgilPFSInitiatorPrivateInfo.h:53
This is model object that represent public information of a PFS Initiator.
Definition: VirgilPFSInitiatorPublicInfo.h:53
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
void setSession(VirgilPFSSession session)
Set new session.
VirgilPFSSession startInitiatorSession(const VirgilPFSInitiatorPrivateInfo &initiatorPrivateInfo, const VirgilPFSResponderPublicInfo &responderPublicInfo, const VirgilByteArray &additionalData=VirgilByteArray())
Start session from the Initiator side.
VirgilPFSSession startResponderSession(const VirgilPFSResponderPrivateInfo &responderPrivateInfo, const VirgilPFSInitiatorPublicInfo &initiatorPublicInfo, const VirgilByteArray &additionalData=VirgilByteArray())
Start session from the Responder side.
void setCipher(VirgilOperationCipher cipher)
Set custom implementation for algorithm: Symmetric Cipher.
VirgilPFSEncryptedMessage encrypt(const VirgilByteArray &data)
Encrypt given data.
void setRandom(VirgilOperationRandom random)
Set custom implementation for algorithm: random.
VirgilByteArray decrypt(const VirgilPFSEncryptedMessage &encryptedMessage) const
Decrypt given message.
This is the main entry for the all Perfect Forward Secrecy (PFS) Modules.
Definition: VirgilPFS.h:62
VirgilPFSSession getSession() const
Return current session.
This is model object that represent encrypted message produced by VirgilPFS.
Definition: VirgilPFSEncryptedMessage.h:50
This is model object that represent private information of a PFS Responder.
Definition: VirgilPFSResponderPrivateInfo.h:53
void setKDF(VirgilOperationKDF kdf)
Set custom implementation for algorithm: Key Dervation Function.
VirgilPFS()
Configures PFS module with default underlying algorithms.
This is model object that represent public information of a PFS Responder.
Definition: VirgilPFSResponderPublicInfo.h:53
void setDH(VirgilOperationDH dh)
Set custom implementation for algorithm: Diffie–Hellman.