VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/Pkcs5Kdf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Volume/Pkcs5Kdf.h')
-rw-r--r--src/Volume/Pkcs5Kdf.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Volume/Pkcs5Kdf.h b/src/Volume/Pkcs5Kdf.h
index d92a3301..c10efaf3 100644
--- a/src/Volume/Pkcs5Kdf.h
+++ b/src/Volume/Pkcs5Kdf.h
@@ -152,6 +152,40 @@ namespace VeraCrypt
Pkcs5HmacWhirlpool (const Pkcs5HmacWhirlpool &);
Pkcs5HmacWhirlpool &operator= (const Pkcs5HmacWhirlpool &);
};
+
+ class Pkcs5HmacStreebog : public Pkcs5Kdf
+ {
+ public:
+ Pkcs5HmacStreebog () : Pkcs5Kdf(false) { }
+ virtual ~Pkcs5HmacStreebog () { }
+
+ virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const;
+ virtual shared_ptr <Hash> GetHash () const { return shared_ptr <Hash> (new Streebog); }
+ virtual int GetIterationCount (int pim) const { return pim <= 0 ? 500000 : (15000 + (pim * 1000)); }
+ virtual wstring GetName () const { return L"HMAC-Streebog"; }
+ virtual Pkcs5Kdf* Clone () const { return new Pkcs5HmacStreebog(m_truecryptMode); }
+
+ private:
+ Pkcs5HmacStreebog (const Pkcs5HmacStreebog &);
+ Pkcs5HmacStreebog &operator= (const Pkcs5HmacStreebog &);
+ };
+
+ class Pkcs5HmacStreebog_Boot : public Pkcs5Kdf
+ {
+ public:
+ Pkcs5HmacStreebog_Boot () : Pkcs5Kdf(false) { }
+ virtual ~Pkcs5HmacStreebog_Boot () { }
+
+ virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const;
+ virtual shared_ptr <Hash> GetHash () const { return shared_ptr <Hash> (new Streebog); }
+ virtual int GetIterationCount (int pim) const { return pim <= 0 ? 200000 : pim * 2048; }
+ virtual wstring GetName () const { return L"HMAC-Streebog"; }
+ virtual Pkcs5Kdf* Clone () const { return new Pkcs5HmacStreebog_Boot(m_truecryptMode); }
+
+ private:
+ Pkcs5HmacStreebog_Boot (const Pkcs5HmacStreebog_Boot &);
+ Pkcs5HmacStreebog_Boot &operator= (const Pkcs5HmacStreebog_Boot &);
+ };
}
#endif // TC_HEADER_Encryption_Pkcs5