DCIT / perl-CryptX

https://metacpan.org/pod/CryptX
Other
35 stars 23 forks source link

add padding mode test for ISO10126 #55

Closed lilphil closed 5 years ago

lilphil commented 5 years ago

I couldn't think of a fantastic way to do this, as the ciphertext will always be different when it has random bytes in the padding. Hopefully this will suffice. Unfortunately I was finding that the test fails at the moment. Largely at random, either with Buffer overflow or Invalid argument, so I hope the test is correct as it was difficult to, er, test.

karel-m commented 5 years ago

Hmm, it looks like ISO10126 padding does not fit into current CryptX code as it may produce random pad data of length 1..255 (not just up to blocklen e.g. 16 as other padding modes).

lilphil commented 5 years ago

Oh, I also assumed it was up to blocklen of padding. Maybe abandon this then. Thanks for your time

karel-m commented 5 years ago

ok