Sorry, I should take more time on code reading. The implementation is perfect.

On 10/20/06, Jiyong Xu <[EMAIL PROTECTED] > wrote:
Hi,

PKCS#1 v2.1 document showed the steps needed to implement a MGF1 on the section B.2.1.

I don't think that 'PKCS1_MGF1' function in the rsa_oaep.c was properly implemented.

The step #3 on the section said 'For counter from 0 to \lceil{l / hLen}\rceil-1, do the following...'

But in 'PKCS1_MGF1', they just wrote:
for (i = 0; outlen < len; i++)
{...}

The 'len' variable is mask length, which in the document should be the mask length divided by seed length and then subtract one.

I think the loop should be something like this:
for (i = 0; outlen < len/seedlen - 1; i++)
{...}


I hope my question was clearly expressed here, and I want your help, any help.

Reply via email to