[PATCH 2/2] crypto: talitos: Add AES-XTS Support
Kim Phillips
kim.phillips at freescale.com
Fri Mar 6 11:16:15 AEDT 2015
On Fri, 20 Feb 2015 12:00:10 -0500
Martin Hicks <mort at bork.org> wrote:
> The newer talitos hardware has support for AES in XTS mode.
Assuming it's the same thing, AES-XCBC gets added with SEC v3.0
h/w. Assuming hw_supports() doesn't already support this algorithm
combination (technically via the mode bit), this needs to be
reflected in the patch so the driver doesn't think SEC 2.x devices
can do XTS, too.
> + .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
> + DESC_HDR_SEL0_AESU |
> + DESC_HDR_MODE0_AESU_XTS,
...
> /* primary execution unit mode (MODE0) and derivatives */
> #define DESC_HDR_MODE0_ENCRYPT cpu_to_be32(0x00100000)
> #define DESC_HDR_MODE0_AESU_CBC cpu_to_be32(0x00200000)
> +#define DESC_HDR_MODE0_AESU_XTS cpu_to_be32(0x04200000)
I'd prefer these defines be kept as single bit definitions, and keep
their names from the manual. An XTS-specific definition can be
composed from them either after this, or manually in the
desc_hdr_template assignment above.
Thanks,
Kim
More information about the Linuxppc-dev
mailing list