1
0
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:
Mounir IDRASSI
2016-09-25 22:37:45 +02:00
parent d18ecc1a37
commit b65eabe23d
8 changed files with 338 additions and 30 deletions

View File

@@ -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