Virgil Security Crypto library  2.6.3
VirgilPythia.h
1 
37 #ifndef virgilPythiaH
38 #define virgilPythiaH
39 
40 #include "../VirgilByteArray.h"
41 #include "VirgilPythiaBlindResult.h"
42 #include "VirgilPythiaContext.h"
43 #include "VirgilPythiaTransformationKeyPair.h"
44 #include "VirgilPythiaProveResult.h"
45 #include "VirgilPythiaTransformResult.h"
46 
47 namespace virgil {
48 namespace crypto {
49 namespace pythia {
50 
59 class VirgilPythia {
60 public:
61 
72 
83  deblind(const VirgilByteArray& transformedPassword, const VirgilByteArray& blindingSecret);
84 
95  computeTransformationKeyPair(const VirgilByteArray& transformationKeyID, const VirgilByteArray& pythiaSecret,
96  const VirgilByteArray& pythiaScopeSecret);
97 
108  const VirgilByteArray& blindedPassword, const VirgilByteArray& tweak,
109  const VirgilByteArray& transformationPrivateKey);
110 
122  prove(const VirgilByteArray& transformedPassword, const VirgilByteArray& blindedPassword,
123  const VirgilByteArray& transformedTweak, const VirgilPythiaTransformationKeyPair& transformationKeyPair);
124 
140  bool
141  verify(const VirgilByteArray& transformedPassword, const VirgilByteArray& blindedPassword,
142  const VirgilByteArray& tweak, const VirgilByteArray& transformationPublicKey,
143  const VirgilByteArray& proofValueC, const VirgilByteArray& proofValueU);
144 
157  const VirgilByteArray& previousTransformationPrivateKey,
158  const VirgilByteArray& newTransformationPrivateKey);
159 
171  const VirgilByteArray& deblindedPassword, const VirgilByteArray& passwordUpdateToken);
172 
173 private:
174  VirgilPythiaContext pythiaContext;
175 };
176 
177 } // namespace pythia
178 } // namespace crypto
179 } // namespace virgil
180 
181 #endif /* virgilPythiaH */
VirgilPythiaProveResult prove(const VirgilByteArray &transformedPassword, const VirgilByteArray &blindedPassword, const VirgilByteArray &transformedTweak, const VirgilPythiaTransformationKeyPair &transformationKeyPair)
Generates proof that server possesses secret values that were used to transform password.
VirgilPythiaBlindResult blind(const VirgilByteArray &password)
Blinds password.
Handles result of the method VirgilPythia::computeTransformationKeyPair().
Definition: VirgilPythiaTransformationKeyPair.h:50
This class encapsulates Pythia initialization routine.
Definition: VirgilPythiaContext.h:59
Handles result of the method VirgilPythia::transform().
Definition: VirgilPythiaTransformResult.h:50
This class provides PYTHIA cryptographic functions and primitives.
Definition: VirgilPythia.h:59
VirgilPythiaTransformationKeyPair computeTransformationKeyPair(const VirgilByteArray &transformationKeyID, const VirgilByteArray &pythiaSecret, const VirgilByteArray &pythiaScopeSecret)
Computes transformation private and public key.
Handles result of the method VirgilPythia::blind().
Definition: VirgilPythiaBlindResult.h:50
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
VirgilByteArray updateDeblindedWithToken(const VirgilByteArray &deblindedPassword, const VirgilByteArray &passwordUpdateToken)
Updates previously stored deblindedPassword with passwordUpdateToken.
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
VirgilPythiaTransformResult transform(const VirgilByteArray &blindedPassword, const VirgilByteArray &tweak, const VirgilByteArray &transformationPrivateKey)
Transforms blinded password using the private key, generated from pythiaSecret + pythiaScopeSecret.
VirgilByteArray getPasswordUpdateToken(const VirgilByteArray &previousTransformationPrivateKey, const VirgilByteArray &newTransformationPrivateKey)
Computes update token.
VirgilByteArray deblind(const VirgilByteArray &transformedPassword, const VirgilByteArray &blindingSecret)
Deblinds transformedPassword value with previously returned blindingSecret from blind().
Handles result of the method VirgilPythia::prove().
Definition: VirgilPythiaProveResult.h:50
bool verify(const VirgilByteArray &transformedPassword, const VirgilByteArray &blindedPassword, const VirgilByteArray &tweak, const VirgilByteArray &transformationPublicKey, const VirgilByteArray &proofValueC, const VirgilByteArray &proofValueU)
Verifies the output of transform().