私の質問には、私が持っていないかもしれない基本的な知識が必要だと思います。
私はそのようなバイト配列を復号化しています:
var cipher = CipherUtilities.GetCipher("AES/CTR/NoPadding");
cipher.Init(false, new ParametersWithIV(new KeyParameter(bkey), bIV));
byte[] DecryptedChunk = cipher.ProcessBytes(EncryptedChunk, 0, ChunkSize);
このバッファを 2 つに分割し、前半と後半を復号化する方法を理解したいと思います。
私がそのようにすれば:
var cipher = CipherUtilities.GetCipher("AES/CTR/NoPadding");
cipher.Init(false, new ParametersWithIV(new KeyParameter(bkey), bIV));
byte[] FirstDecryptedChunk = cipher.ProcessBytes(FirstEncryptedChunk, 0, FirstChunkSize);
byte[] SecondDecryptedChunk = cipher.ProcessBytes(SecondEncryptedChunk, 0, SecondChunkSize);
次に、最初のチャンクは問題ありませんが、2 番目のチャンクは間違っています。
私はインターネットで6時間ほど読んでいますが、説明が見つかりません。ある種のカウンターと IV を更新する必要があるか、何か関係がありますか?