summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/amcc/crypto4xx_sa.h
Commit message (Collapse)AuthorAgeFilesLines
* crypto: crypto4xx - prepare for AEAD supportChristian Lamparter2017-10-121-0/+41
| | | | | | | | | This patch enhances existing interfaces and functions to support AEAD ciphers in the next patches. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: crypto4xx - use the correct LE32 format for IV and key defsChristian Lamparter2017-10-121-13/+16
| | | | | | | | | | | | | | | | | | | | | | The hardware expects that the keys, IVs (and inner/outer hashes) are in the le32 format. This patch changes all hardware interface declarations to use the correct LE32 data format for each field. In order to pass __CHECK_ENDIAN__ checks, crypto4xx_memcpy_le has to be honest about the endianness of its parameters. The function was split and moved to the common crypto4xx_core.h header. This allows the compiler to generate better code if the sizes/len is a constant (various *_IV_LEN). Please note that the hardware isn't consistent with the endiannes of the save_digest field in the state record struct though. The hashes produced by GHASH and CBC (for CCM) will be in LE32. Whereas md5 and sha{1/,256,...} do not need any conversion. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: crypto4xx - fix type mismatch compiler errorChristian Lamparter2017-10-121-2/+2
| | | | | | | | | This patch fixes a type mismatch error that I accidentally introduced when I moved and refactored the dynamic_contents helpers. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloadsChristian Lamparter2017-09-221-0/+3
| | | | | | | | | The crypto engine supports more than just aes-cbc. This patch enables the remaining AES block cipher modes that pass the testmanager's test vectors. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: crypto4xx - move and refactor dynamic_contents helpersChristian Lamparter2017-09-221-0/+28
| | | | | | | | | | | | | | | | | This patch refactors and moves the dynamic_contents helper functions into the crypto4xx_sa.h header file. * get_dynamic_sa_iv_size is no longer needed, as the cryptoapi provides the required IV size information as well. * refactor the function declarations to use the a pointer to the dynamic_sa_contents union, instead of the crypto4xx_ctx. * rename get_dynamic_sa_offset_key_field to get_dynamic_sa_key_field. It returns the pointer to the key directly. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: crypto4xx - fix dynamic_sa_ctl's sa_contents declarationChristian Lamparter2017-09-221-1/+1
| | | | | | | | | The driver had a union dynamic_sa_contents in place that described the meaning of the bits in the sa_contents variable. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* crypto: amcc - Add crypt4xx driverJames Hsiao2009-02-181-0/+243
This patch adds support for AMCC ppc4xx security device driver. This is the initial release that includes the driver framework with AES and SHA1 algorithms support. The remaining algorithms will be released in the near future. Signed-off-by: James Hsiao <jhsiao@amcc.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
OpenPOWER on IntegriCloud