aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/crypto
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-07-02 15:41:19 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-26 00:52:02 -0400
commit20bb4ef038a97b8bb5c07d2a1125019a93f618b3 (patch)
tree1ef77f08925fde063ed0664db68035f94a57483a /arch/arm/crypto
parent85b36ee8e9a8b18b3c09b8a8b6ac3dc694584bab (diff)
crypto: arm/aes-ce - cosmetic/whitespace cleanup
Rearrange the aes_algs[] array for legibility. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm/crypto')
-rw-r--r--arch/arm/crypto/aes-ce-glue.c116
1 files changed, 56 insertions, 60 deletions
diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/crypto/aes-ce-glue.c
index 620aacf0d128..e4139a0b0d75 100644
--- a/arch/arm/crypto/aes-ce-glue.c
+++ b/arch/arm/crypto/aes-ce-glue.c
@@ -334,69 +334,65 @@ static int xts_decrypt(struct skcipher_request *req)
334} 334}
335 335
336static struct skcipher_alg aes_algs[] = { { 336static struct skcipher_alg aes_algs[] = { {
337 .base = { 337 .base.cra_name = "__ecb(aes)",
338 .cra_name = "__ecb(aes)", 338 .base.cra_driver_name = "__ecb-aes-ce",
339 .cra_driver_name = "__ecb-aes-ce", 339 .base.cra_priority = 300,
340 .cra_priority = 300, 340 .base.cra_flags = CRYPTO_ALG_INTERNAL,
341 .cra_flags = CRYPTO_ALG_INTERNAL, 341 .base.cra_blocksize = AES_BLOCK_SIZE,
342 .cra_blocksize = AES_BLOCK_SIZE, 342 .base.cra_ctxsize = sizeof(struct crypto_aes_ctx),
343 .cra_ctxsize = sizeof(struct crypto_aes_ctx), 343 .base.cra_module = THIS_MODULE,
344 .cra_module = THIS_MODULE, 344
345 }, 345 .min_keysize = AES_MIN_KEY_SIZE,
346 .min_keysize = AES_MIN_KEY_SIZE, 346 .max_keysize = AES_MAX_KEY_SIZE,
347 .max_keysize = AES_MAX_KEY_SIZE, 347 .setkey = ce_aes_setkey,
348 .setkey = ce_aes_setkey, 348 .encrypt = ecb_encrypt,
349 .encrypt = ecb_encrypt, 349 .decrypt = ecb_decrypt,
350 .decrypt = ecb_decrypt,
351}, { 350}, {
352 .base = { 351 .base.cra_name = "__cbc(aes)",
353 .cra_name = "__cbc(aes)", 352 .base.cra_driver_name = "__cbc-aes-ce",
354 .cra_driver_name = "__cbc-aes-ce", 353 .base.cra_priority = 300,
355 .cra_priority = 300, 354 .base.cra_flags = CRYPTO_ALG_INTERNAL,
356 .cra_flags = CRYPTO_ALG_INTERNAL, 355 .base.cra_blocksize = AES_BLOCK_SIZE,
357 .cra_blocksize = AES_BLOCK_SIZE, 356 .base.cra_ctxsize = sizeof(struct crypto_aes_ctx),
358 .cra_ctxsize = sizeof(struct crypto_aes_ctx), 357 .base.cra_module = THIS_MODULE,
359 .cra_module = THIS_MODULE, 358
360 }, 359 .min_keysize = AES_MIN_KEY_SIZE,
361 .min_keysize = AES_MIN_KEY_SIZE, 360 .max_keysize = AES_MAX_KEY_SIZE,
362 .max_keysize = AES_MAX_KEY_SIZE, 361 .ivsize = AES_BLOCK_SIZE,
363 .ivsize = AES_BLOCK_SIZE, 362 .setkey = ce_aes_setkey,
364 .setkey = ce_aes_setkey, 363 .encrypt = cbc_encrypt,
365 .encrypt = cbc_encrypt, 364 .decrypt = cbc_decrypt,
366 .decrypt = cbc_decrypt,
367}, { 365}, {
368 .base = { 366 .base.cra_name = "__ctr(aes)",
369 .cra_name = "__ctr(aes)", 367 .base.cra_driver_name = "__ctr-aes-ce",
370 .cra_driver_name = "__ctr-aes-ce", 368 .base.cra_priority = 300,
371 .cra_priority = 300, 369 .base.cra_flags = CRYPTO_ALG_INTERNAL,
372 .cra_flags = CRYPTO_ALG_INTERNAL, 370 .base.cra_blocksize = 1,
373 .cra_blocksize = 1, 371 .base.cra_ctxsize = sizeof(struct crypto_aes_ctx),
374 .cra_ctxsize = sizeof(struct crypto_aes_ctx), 372 .base.cra_module = THIS_MODULE,
375 .cra_module = THIS_MODULE, 373
376 }, 374 .min_keysize = AES_MIN_KEY_SIZE,
377 .min_keysize = AES_MIN_KEY_SIZE, 375 .max_keysize = AES_MAX_KEY_SIZE,
378 .max_keysize = AES_MAX_KEY_SIZE, 376 .ivsize = AES_BLOCK_SIZE,
379 .ivsize = AES_BLOCK_SIZE, 377 .chunksize = AES_BLOCK_SIZE,
380 .chunksize = AES_BLOCK_SIZE, 378 .setkey = ce_aes_setkey,
381 .setkey = ce_aes_setkey, 379 .encrypt = ctr_encrypt,
382 .encrypt = ctr_encrypt, 380 .decrypt = ctr_encrypt,
383 .decrypt = ctr_encrypt,
384}, { 381}, {
385 .base = { 382 .base.cra_name = "__xts(aes)",
386 .cra_name = "__xts(aes)", 383 .base.cra_driver_name = "__xts-aes-ce",
387 .cra_driver_name = "__xts-aes-ce", 384 .base.cra_priority = 300,
388 .cra_priority = 300, 385 .base.cra_flags = CRYPTO_ALG_INTERNAL,
389 .cra_flags = CRYPTO_ALG_INTERNAL, 386 .base.cra_blocksize = AES_BLOCK_SIZE,
390 .cra_blocksize = AES_BLOCK_SIZE, 387 .base.cra_ctxsize = sizeof(struct crypto_aes_xts_ctx),
391 .cra_ctxsize = sizeof(struct crypto_aes_xts_ctx), 388 .base.cra_module = THIS_MODULE,
392 .cra_module = THIS_MODULE, 389
393 }, 390 .min_keysize = 2 * AES_MIN_KEY_SIZE,
394 .min_keysize = 2 * AES_MIN_KEY_SIZE, 391 .max_keysize = 2 * AES_MAX_KEY_SIZE,
395 .max_keysize = 2 * AES_MAX_KEY_SIZE, 392 .ivsize = AES_BLOCK_SIZE,
396 .ivsize = AES_BLOCK_SIZE, 393 .setkey = xts_set_key,
397 .setkey = xts_set_key, 394 .encrypt = xts_encrypt,
398 .encrypt = xts_encrypt, 395 .decrypt = xts_decrypt,
399 .decrypt = xts_decrypt,
400} }; 396} };
401 397
402static struct simd_skcipher_alg *aes_simd_algs[ARRAY_SIZE(aes_algs)]; 398static struct simd_skcipher_alg *aes_simd_algs[ARRAY_SIZE(aes_algs)];