mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Add test vectors for Kuznyechik and GOST89 (the later is deprecated)
This commit is contained in:
@@ -286,7 +286,28 @@ namespace VeraCrypt
|
||||
|
||||
void CipherGost89::SetCipherKey (const byte *key)
|
||||
{
|
||||
gost_set_key (key, (gost_kds *) ScheduledKey.Ptr());
|
||||
gost_set_key (key, (gost_kds *) ScheduledKey.Ptr(), 1);
|
||||
}
|
||||
|
||||
// GOST89 with static SBOX
|
||||
void CipherGost89StaticSBOX::Decrypt (byte *data) const
|
||||
{
|
||||
gost_decrypt (data, data, (gost_kds *) ScheduledKey.Ptr(), 1);
|
||||
}
|
||||
|
||||
void CipherGost89StaticSBOX::Encrypt (byte *data) const
|
||||
{
|
||||
gost_encrypt (data, data, (gost_kds *) ScheduledKey.Ptr(), 1);
|
||||
}
|
||||
|
||||
size_t CipherGost89StaticSBOX::GetScheduledKeySize () const
|
||||
{
|
||||
return GOST_KS;
|
||||
}
|
||||
|
||||
void CipherGost89StaticSBOX::SetCipherKey (const byte *key)
|
||||
{
|
||||
gost_set_key (key, (gost_kds *) ScheduledKey.Ptr(), 0);
|
||||
}
|
||||
|
||||
// Kuznyechik
|
||||
|
||||
Reference in New Issue
Block a user