* Michal Ludvig | 2007-11-05 12:54:50 [+1300]:
> I'll test and get back to you.
thx.
>
>> I have one question regarding the size of the expanded key: You reserve
>> 64 * 4 bytes for each key but it seems that you use only 60 * 4 bytes.
>> Are the other bytes used by the hardware or did you allocate it by
>> accident?
>
> The hardware needs it. From the VIA Padlock Programming Guide:
>
> | For the application-loaded keys option, the hardware always
> | loads sixteen 128-bit values from memory regardless of the
> | specified key size. Any values beyond the normal extended key
> | size are ignored and have no effect on the results, but that
> | memory area must be accessible (within the segment limit, etc.)
Since we only have to make sure that we can access the memory, what
about:
struct aes_ctx {
u32 E[15 * 16]
__attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
u32 d_data[15 * 16]
__attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
struct {
struct cword encrypt;
struct cword decrypt;
} cword;
u32 *D;
int key_length;
};
> Michal
Sebastian
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html