Je suis en train d'utiliser AES-128/XTS dans Botan, mais l'exception suivante est levée:Invalid argument: AES-128/XTS ne peuvent pas accepter une clé de longueur 16
terminate called after throwing an instance of 'Botan::Invalid_Key_Length'
what(): Invalid argument AES-128/XTS cannot accept a key of length 16
Mon programme est comme (ce fichier d'en-tête sont omis):
using namespace Botan;
int main()
{
SymmetricKey key_t(hex_decode("13232453fa2343432453de2adfedf2fa"));
InitializationVector iv_t(hex_decode("0b0c7fc670656e36a7637b4e209885a9"));
Pipe encryptor(get_cipher("AES-128/XTS", key_t, iv_t, Botan::ENCRYPTION));
encryptor.process_msg((uint8_t *)s.data(), s.size());
return 0;
}
Je me demande vraiment ce qui se passe mal ici.
Merci pour votre réponse. J'ai mal compris le mode XTS. –