I have found what I believe to be a straightforward explanation of the oracle padding attack here: http://robertheaton.com/2013/07/29/padding-oracle-attack/
I am however getting confused by something which experts here should I believe find so easy.
When you open the link and browse to the subsection titled "Manipulating the Cipher text", there is a statement which says ...
If the server says that we have produced a plaintext with valid padding, then we can be pretty sure that
P2'[16]
must be01
.
I am unable to understand why a value of 01
will imply that the padding is OK. I know that as per PKCS#5, the only way we can get 01
as the last byte is when there was only 1 byte of padding. But according to the example on this page, I don't see anything that suggests that the data had 1 byte of padding. So, I fail to understand why a result of 01 is considered successful.
Is anyone able to look at the document and advise where the 01
comes from?