# Why is this OTP decryption wrong? [closed]

i have a problem that goes: Suppose you are told that the one time pad encryption of the message "attack at dawn" is 09e1c5f70a65ac519458e7e53f36 (the plain text letters are encoded as 8-bit ASCII and the given ciphertext is written in hex) What would be the OTP Encryption of the message "attack at dusk" under the same OTP key?

I know this question is asked a lot, but I already tried with this (all by hand and some calculators).

ciphertxt:00001001 11100001 11000101 11110111 00001010 01100101 10101100 01010001 10010100 01011000 11100111 11100101 00111111 00110110

message: 01100001 01110100 01110100 01100001 01100011 01101011 00100000 01100001 01110100 00100000 01100100 01100001 01110111 01101110

key: 110100010010101101100011001011001101001000011101000110000110000111000000111100010000011100001000100100001011000

obj message: 01100001 01110100 01110100 01100001 01100011 01101011 00100000 01100001 01110100 00100000 01100100 01110101 01110011 01101011 00001101 00001010

o.msg xor key: 1100001011101000001110011110100110100101111110101001001011011111111100000010000100001000000110111110000111011110100010101010010

to hex: c2 e8 39 e9 a5 fa 92 df f0 21 08 1b e1 de 8a 52


I don't know what am I doing wrong but that's not the correct answer. Thanks

## closed as off-topic by Maeher, kelalaka, Maarten Bodewes♦Aug 22 at 18:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

• just xor the last three bytes with the xor of "awn" and "usk" and you're done. It's a lot less work than you think. Use that $(p_1 \oplus k) \oplus (p_1 \oplus p_2) = p_2 \oplus k$. – Henno Brandsma Aug 22 at 19:28
• thanks! I'll do it – Mel J Aug 23 at 6:46