Jeff,

No problems with the validation suite, it passes everything
fine.

Iain

>
>
> Hi Iain,
>
> The code ran OK for me. I've seen others run the same code
> and have errors thrown and core dump. Has Crypto++ passed
> the validation suite?
>
> Jeff
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Thursday, March 11, 2004 6:11 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: AES encryption/decryption
> >
> >
> > Jeff,
> >
> > thanks for the code, unfortunately that doesnt help
> > either.
> > What exactly is the following code supposed to be
> > checking? Im guessing it is supposed to check the first
> > padding byte to ensure it is valid, however it is
> > actually checking the last character of the input string
> > , which is 'F' in this case.  It then throws an
> > exception because the integer value of F is 70, and this
> > is greater than the block size of 16.
> > Anyone able to help me understand WHY it would be doing
> > this check?
> > The ASCII value of space is
> > "0123456789ABCDEF{0x253}{0x253}...."
> > Even if pad should be equal to the first non-message
> > byte, I  fail to understand the benefit of ensuring the
> > decimal value  of this is a positive integer less than
> > the block size.
> > Any help much appreciated
> >
> > Iain
> >
> >
> > if (m_padding == PKCS_PADDING)
> >             {
> >                 byte pad = space[s-1];
> >                 if (pad < 1 || pad > s ||
> > std::find_if(space+s-pad,
> > space+s, std::bind2nd(std::not_equal_to<byte>(), pad))
> > != space+s)
> >                     throw
> > InvalidCiphertext("StreamTransformationFilter:
> > invalid PKCS #7 block padding found");
> >                 length = s-pad;
> >             }
> >
>
>
> [Attachment: smime.p7s]

Reply via email to