Ich habe ein einfaches Konsolenprogramm, das Dateien mit AES CFB-Algorithmus von Crypto ++ Bibliothek verschlüsseln sollte. Aus irgendeinem Grund funktioniert es nicht. Encoding Teil:Verschlüsselung mit Crypto ++/AES CFB funktioniert nicht
byte data[16] = { 0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44 };
byte result[16] = { 0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44 };
//Sample key
byte key[16] = { 0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44,
0x88, 0x44, 0x88, 0x44 };
//Generate random Initialization Vector
byte iv[16];
CryptoPP::AutoSeededRandomPool rnd;
rnd.GenerateBlock(iv, CryptoPP::AES::BLOCKSIZE /*16*/);
//Through VisualStudio debug/watch functionality I have found out that
//Crypto++ randomizer works properly so at this point "iv" contains random values
CryptoPP::CFB_Mode<CryptoPP::AES>::Encryption tmp(key, 16, iv, 1);
tmp.ProcessData(data, result, 16);
Das Problem ist, dass, wenn dieser Code result
vervollständigt sollte mit Chiffriertext gefüllt werden, aber es bleibt nur gefüllt mit px88
und 0x44
.
wurde ich von diesem offiziell Tutorial geführt: https://www.cryptopp.com/wiki/Advanced_Encryption_Standard
Mögliches Duplikat von [AES-Verschlüsselung mit Crypto ++ funktioniert nicht] (http://stackoverflow.com/questions/43352882/aes-encryption-with-crypto-not-working) – jww
Verzeihen Sie meine Ignoranz ... Wie ist das anders als das zitierte Duplikat? – jww
@jww. Sie haben keinen Unterschied. Ich habe es getan, weil ich auf diese Frage keine Antwort hatte. – Serid