prosyslab-classroom / cs348-information-security

61 stars 10 forks source link

[Question][Hw2] Where does the LengthError get used? #259

Closed s20200366 closed 1 year ago

s20200366 commented 1 year ago

Name: Jaewoo Ahn

In type result, we have LengthError case where the length of the input line of oracle is not a multiple of block size. But in my implementation of crack and padding oracle attack, I did not have any use for LengthError, since all the ciphertexts given would have been padded correctly. Is there some test cases for the oracle itself where LengthError will be used? Thank you.

KAIST-JongchanPark commented 1 year ago

If you implement enc/dec well, LengthError will not be raised.

However, padding_oracle should work well as an oracle, whatever input is given. (Because, in general, oracle is open to anyone) Therefore, to handle any input, padding_oracle also support length error case.

s20200366 commented 1 year ago

However, padding_oracle should work well as an oracle, whatever input is given. (Because, in general, oracle is open to anyone) Therefore, to handle any input, padding_oracle also support length error case.

Then even though we were not provided with a sample test case regarding oracle itself, there could be tests about oracles while grading?

KAIST-JongchanPark commented 1 year ago

Hidden test cases are hidden :D

tanapthetimid commented 1 year ago

Hidden test cases are hidden :D

If we get full score on gradescope, does that include the hidden cases?

KAIST-JongchanPark commented 1 year ago

@TanapTheTimid yes

s20200366 commented 1 year ago

Thank you