The plaintext difference becomes a mask applied to the ciphertext.

highlighted = computed this step

The mask is the plaintext difference

The attack mask is original plaintext XOR target plaintext. Here it is zero everywhere except one byte.

mask=0x000000000800\text{mask}=0x000000000800
Flip one ciphertext byteThe target, attack mask, modified ciphertext, and decrypted result are recomputed.Target plaintext48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Attack mask48 bits / 6 bytes0x000000000800byte 0byte 1byte 2byte 300000000000000000000000000000000byte 4byte 50000100000000000byte-00x00byte-10x00byte-20x00byte-30x00byte-40x08byte-50x00Modified ciphertext48 bits / 6 bytes0x7f7f5401726abyte 0byte 1byte 2byte 301111111011111110101010000000001byte 4byte 50111001001101010byte-00x7fbyte-10x7fbyte-20x54byte-30x01byte-40x72byte-50x6aDecrypted modified48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Toy bit flip rows - changed byte 4rowvaluecheckplaintext7061793d3130pinned byteskeystream0f1e2d3c4b5apinned bytesciphertext7f7f54017a6aplaintext xor keystreamtarget plaintext7061793d3930attacker targetattack mask000000000800plaintext xor targetmodified ciphertext7f7f5401726aciphertext xor maskdecrypted modified7061793d3930modified ciphertext xor keystream

One nonzero mask byte

The changed byte uses 0x31 XOR 0x39, which is 0x08.

0x31⊕0x39=0x080x31\oplus0x39=0x08
Flip one ciphertext byteThe target, attack mask, modified ciphertext, and decrypted result are recomputed.Target plaintext48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Attack mask48 bits / 6 bytes0x000000000800byte 0byte 1byte 2byte 300000000000000000000000000000000byte 4byte 50000100000000000byte-00x00byte-10x00byte-20x00byte-30x00byte-40x08byte-50x00Modified ciphertext48 bits / 6 bytes0x7f7f5401726abyte 0byte 1byte 2byte 301111111011111110101010000000001byte 4byte 50111001001101010byte-00x7fbyte-10x7fbyte-20x54byte-30x01byte-40x72byte-50x6aDecrypted modified48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Toy bit flip rows - changed byte 4rowvaluecheckplaintext7061793d3130pinned byteskeystream0f1e2d3c4b5apinned bytesciphertext7f7f54017a6aplaintext xor keystreamtarget plaintext7061793d3930attacker targetattack mask000000000800plaintext xor targetmodified ciphertext7f7f5401726aciphertext xor maskdecrypted modified7061793d3930modified ciphertext xor keystream

Apply it to ciphertext

XORing that mask into the ciphertext gives modified ciphertext 0x7f7f5401726a.

modified ciphertext=0x7f7f5401726a\text{modified ciphertext}=0x7f7f5401726a
Flip one ciphertext byteThe target, attack mask, modified ciphertext, and decrypted result are recomputed.Target plaintext48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Attack mask48 bits / 6 bytes0x000000000800byte 0byte 1byte 2byte 300000000000000000000000000000000byte 4byte 50000100000000000byte-00x00byte-10x00byte-20x00byte-30x00byte-40x08byte-50x00Modified ciphertext48 bits / 6 bytes0x7f7f5401726abyte 0byte 1byte 2byte 301111111011111110101010000000001byte 4byte 50111001001101010byte-00x7fbyte-10x7fbyte-20x54byte-30x01byte-40x72byte-50x6aDecrypted modified48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Toy bit flip rows - changed byte 4rowvaluecheckplaintext7061793d3130pinned byteskeystream0f1e2d3c4b5apinned bytesciphertext7f7f54017a6aplaintext xor keystreamtarget plaintext7061793d3930attacker targetattack mask000000000800plaintext xor targetmodified ciphertext7f7f5401726aciphertext xor maskdecrypted modified7061793d3930modified ciphertext xor keystream

Summary

The attacker changes the ciphertext without knowing the keystream by applying the plaintext difference as a mask.

mask byte=0x08\text{mask byte}=0x08
Flip one ciphertext byteThe target, attack mask, modified ciphertext, and decrypted result are recomputed.Target plaintext48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Attack mask48 bits / 6 bytes0x000000000800byte 0byte 1byte 2byte 300000000000000000000000000000000byte 4byte 50000100000000000byte-00x00byte-10x00byte-20x00byte-30x00byte-40x08byte-50x00Modified ciphertext48 bits / 6 bytes0x7f7f5401726abyte 0byte 1byte 2byte 301111111011111110101010000000001byte 4byte 50111001001101010byte-00x7fbyte-10x7fbyte-20x54byte-30x01byte-40x72byte-50x6aDecrypted modified48 bits / 6 bytes0x7061793d3930byte 0byte 1byte 2byte 301110000011000010111100100111101byte 4byte 50011100100110000byte-00x70byte-10x61byte-20x79byte-30x3dbyte-40x39byte-50x30Toy bit flip rows - changed byte 4rowvaluecheckplaintext7061793d3130pinned byteskeystream0f1e2d3c4b5apinned bytesciphertext7f7f54017a6aplaintext xor keystreamtarget plaintext7061793d3930attacker targetattack mask000000000800plaintext xor targetmodified ciphertext7f7f5401726aciphertext xor maskdecrypted modified7061793d3930modified ciphertext xor keystream