Do try to replace return 0; in padlock_aes_cipher with return 1;...

This works, yes. Is it correct to return 1 even if (nbytes&0x0F)? Or should this never happen?

I'd like to suggest

        if (nbytes == 0)        return 1;
        if (nbytes % AES_BLOCK_SIZE)
                return 0; /* are we expected to do tail processing? */

in the beginnig and default: return 0; at the end. I snatched the check for nbytes==0 from another engine:-)

And one more thing I just noticed. In the loops of all modes you always use chunk=REALIGN_SIZE instead of chunk=min(nbytes,REALIGN_SIZE). Is this a mistake or am I again missing something?

I moved that "if" outside. See above in the code. It now processes nbytes%REALIGN_SIZE chunk first and than goes in multiple REALIGN_SIZEs.


Are you working on any other changes?

I haven't checked RNG yet. Coding Windows port. Do you run or do you know anybody who runs Windows on such system?


Just to know if I can start reindenting the code to my "liking" ;-)

Go ahead. A.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to