Tag Info

New answers tagged

0

Actually you're verifying the encoded part, and take a look at thoose "extra bytes". If they're an arbitrary/optional fields - it's ok to verify just an encoded part because the true purpose of verifying is check the encoding : they're complementary operations, and they alone are referenced to each other. The question you've risen is actually "Are the extra ...


2

It depends. If the entire input itself is within a DER encoded structure, then I would bug out. There is nothing defined for BER, CER or DER that would allow padding of structures within constructed values. If the input is just followed by additional data or junk bytes then it is up to the protocol or otherwise your discretion if you want to accept the ...


2

I don't think there's an exact "correct" behaviour in this case. It would be up to the implementation to decide, since the spec is only concerned about the DER encoded portion. If your implementation parses the input as it moves along only, and doesn't concern itself with the overall size, then it would work fine. Having said that, I believe the best ...



Top 50 recent answers are included