Skip to content

Commit 5bcbe22

Browse files
committed
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu: "API: - Try to catch hash output overrun in testmgr - Introduce walksize attribute for batched walking - Make crypto_xor() and crypto_inc() alignment agnostic Algorithms: - Add time-invariant AES algorithm - Add standalone CBCMAC algorithm Drivers: - Add NEON acclerated chacha20 on ARM/ARM64 - Expose AES-CTR as synchronous skcipher on ARM64 - Add scalar AES implementation on ARM64 - Improve scalar AES implementation on ARM - Improve NEON AES implementation on ARM/ARM64 - Merge CRC32 and PMULL instruction based drivers on ARM64 - Add NEON acclerated CBCMAC/CMAC/XCBC AES on ARM64 - Add IPsec AUTHENC implementation in atmel - Add Support for Octeon-tx CPT Engine - Add Broadcom SPU driver - Add MediaTek driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (142 commits) crypto: xts - Add ECB dependency crypto: cavium - switch to pci_alloc_irq_vectors crypto: cavium - switch to pci_alloc_irq_vectors crypto: cavium - remove dead MSI-X related define crypto: brcm - Avoid double free in ahash_finup() crypto: cavium - fix Kconfig dependencies crypto: cavium - cpt_bind_vq_to_grp could return an error code crypto: doc - fix typo hwrng: omap - update Kconfig help description crypto: ccm - drop unnecessary minimum 32-bit alignment crypto: ccm - honour alignmask of subordinate MAC cipher crypto: caam - fix state buffer DMA (un)mapping crypto: caam - abstract ahash request double buffering crypto: caam - fix error path for ctx_dma mapping failure crypto: caam - fix DMA API leaks for multiple setkey() calls crypto: caam - don't dma_map key for hash algorithms crypto: caam - use dma_map_sg() return code crypto: caam - replace sg_count() with sg_nents_for_len() crypto: caam - check sg_count() return value crypto: caam - fix HW S/G in ablkcipher_giv_edesc_alloc() ..
2 parents 1db934a + 12cb3a1 commit 5bcbe22

187 files changed

Lines changed: 26983 additions & 9598 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/crypto/api-digest.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Asynchronous Message Digest API
1414
:doc: Asynchronous Message Digest API
1515

1616
.. kernel-doc:: include/crypto/hash.h
17-
:functions: crypto_alloc_ahash crypto_free_ahash crypto_ahash_init crypto_ahash_digestsize crypto_ahash_reqtfm crypto_ahash_reqsize crypto_ahash_setkey crypto_ahash_finup crypto_ahash_final crypto_ahash_digest crypto_ahash_export crypto_ahash_import
17+
:functions: crypto_alloc_ahash crypto_free_ahash crypto_ahash_init crypto_ahash_digestsize crypto_ahash_reqtfm crypto_ahash_reqsize crypto_ahash_statesize crypto_ahash_setkey crypto_ahash_finup crypto_ahash_final crypto_ahash_digest crypto_ahash_export crypto_ahash_import
1818

1919
Asynchronous Hash Request Handle
2020
--------------------------------

‎Documentation/crypto/api-skcipher.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ Synchronous Block Cipher API - Deprecated
5959
:doc: Synchronous Block Cipher API
6060

6161
.. kernel-doc:: include/linux/crypto.h
62-
:functions: crypto_alloc_blkcipher rypto_free_blkcipher crypto_has_blkcipher crypto_blkcipher_name crypto_blkcipher_ivsize crypto_blkcipher_blocksize crypto_blkcipher_setkey crypto_blkcipher_encrypt crypto_blkcipher_encrypt_iv crypto_blkcipher_decrypt crypto_blkcipher_decrypt_iv crypto_blkcipher_set_iv crypto_blkcipher_get_iv
62+
:functions: crypto_alloc_blkcipher crypto_free_blkcipher crypto_has_blkcipher crypto_blkcipher_name crypto_blkcipher_ivsize crypto_blkcipher_blocksize crypto_blkcipher_setkey crypto_blkcipher_encrypt crypto_blkcipher_encrypt_iv crypto_blkcipher_decrypt crypto_blkcipher_decrypt_iv crypto_blkcipher_set_iv crypto_blkcipher_get_iv
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The Broadcom Secure Processing Unit (SPU) hardware supports symmetric
2+
cryptographic offload for Broadcom SoCs. A SoC may have multiple SPU hardware
3+
blocks.
4+
5+
Required properties:
6+
- compatible: Should be one of the following:
7+
brcm,spum-crypto - for devices with SPU-M hardware
8+
brcm,spu2-crypto - for devices with SPU2 hardware
9+
brcm,spu2-v2-crypto - for devices with enhanced SPU2 hardware features like SHA3
10+
and Rabin Fingerprint support
11+
brcm,spum-nsp-crypto - for the Northstar Plus variant of the SPU-M hardware
12+
13+
- reg: Should contain SPU registers location and length.
14+
- mboxes: The mailbox channel to be used to communicate with the SPU.
15+
Mailbox channels correspond to DMA rings on the device.
16+
17+
Example:
18+
crypto@612d0000 {
19+
compatible = "brcm,spum-crypto";
20+
reg = <0 0x612d0000 0 0x900>;
21+
mboxes = <&pdc0 0>;
22+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
MediaTek cryptographic accelerators
2+
3+
Required properties:
4+
- compatible: Should be "mediatek,eip97-crypto"
5+
- reg: Address and length of the register set for the device
6+
- interrupts: Should contain the five crypto engines interrupts in numeric
7+
order. These are global system and four descriptor rings.
8+
- clocks: the clock used by the core
9+
- clock-names: the names of the clock listed in the clocks property. These are
10+
"ethif", "cryp"
11+
- power-domains: Must contain a reference to the PM domain.
12+
13+
14+
Example:
15+
crypto: crypto@1b240000 {
16+
compatible = "mediatek,eip97-crypto";
17+
reg = <0 0x1b240000 0 0x20000>;
18+
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>,
19+
<GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>,
20+
<GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>,
21+
<GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>,
22+
<GIC_SPI 97 IRQ_TYPE_LEVEL_LOW>;
23+
clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
24+
<&ethsys CLK_ETHSYS_CRYPTO>;
25+
clock-names = "ethif","cryp";
26+
power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
27+
};

‎MAINTAINERS‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,6 +3031,13 @@ W: http://www.cavium.com
30313031
S: Supported
30323032
F: drivers/net/ethernet/cavium/liquidio/
30333033

3034+
CAVIUM OCTEON-TX CRYPTO DRIVER
3035+
M: George Cherian <george.cherian@cavium.com>
3036+
L: linux-crypto@vger.kernel.org
3037+
W: http://www.cavium.com
3038+
S: Supported
3039+
F: drivers/crypto/cavium/cpt/
3040+
30343041
CC2520 IEEE-802.15.4 RADIO DRIVER
30353042
M: Varka Bhadram <varkabhadram@gmail.com>
30363043
L: linux-wpan@vger.kernel.org

‎arch/arm/crypto/Kconfig‎

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,35 +62,18 @@ config CRYPTO_SHA512_ARM
6262
using optimized ARM assembler and NEON, when available.
6363

6464
config CRYPTO_AES_ARM
65-
tristate "AES cipher algorithms (ARM-asm)"
66-
depends on ARM
65+
tristate "Scalar AES cipher for ARM"
6766
select CRYPTO_ALGAPI
6867
select CRYPTO_AES
6968
help
7069
Use optimized AES assembler routines for ARM platforms.
7170

72-
AES cipher algorithms (FIPS-197). AES uses the Rijndael
73-
algorithm.
74-
75-
Rijndael appears to be consistently a very good performer in
76-
both hardware and software across a wide range of computing
77-
environments regardless of its use in feedback or non-feedback
78-
modes. Its key setup time is excellent, and its key agility is
79-
good. Rijndael's very low memory requirements make it very well
80-
suited for restricted-space environments, in which it also
81-
demonstrates excellent performance. Rijndael's operations are
82-
among the easiest to defend against power and timing attacks.
83-
84-
The AES specifies three key sizes: 128, 192 and 256 bits
85-
86-
See <http://csrc.nist.gov/encryption/aes/> for more information.
87-
8871
config CRYPTO_AES_ARM_BS
8972
tristate "Bit sliced AES using NEON instructions"
9073
depends on KERNEL_MODE_NEON
91-
select CRYPTO_AES_ARM
9274
select CRYPTO_BLKCIPHER
9375
select CRYPTO_SIMD
76+
select CRYPTO_AES_ARM
9477
help
9578
Use a faster and more secure NEON based implementation of AES in CBC,
9679
CTR and XTS modes
@@ -130,4 +113,10 @@ config CRYPTO_CRC32_ARM_CE
130113
depends on KERNEL_MODE_NEON && CRC32
131114
select CRYPTO_HASH
132115

116+
config CRYPTO_CHACHA20_NEON
117+
tristate "NEON accelerated ChaCha20 symmetric cipher"
118+
depends on KERNEL_MODE_NEON
119+
select CRYPTO_BLKCIPHER
120+
select CRYPTO_CHACHA20
121+
133122
endif

‎arch/arm/crypto/Makefile‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
88
obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
99
obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
1010
obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
11+
obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o
1112

1213
ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
1314
ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
@@ -26,8 +27,8 @@ $(warning $(ce-obj-y) $(ce-obj-m))
2627
endif
2728
endif
2829

29-
aes-arm-y := aes-armv4.o aes_glue.o
30-
aes-arm-bs-y := aesbs-core.o aesbs-glue.o
30+
aes-arm-y := aes-cipher-core.o aes-cipher-glue.o
31+
aes-arm-bs-y := aes-neonbs-core.o aes-neonbs-glue.o
3132
sha1-arm-y := sha1-armv4-large.o sha1_glue.o
3233
sha1-arm-neon-y := sha1-armv7-neon.o sha1_neon_glue.o
3334
sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
@@ -40,17 +41,15 @@ aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o
4041
ghash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o
4142
crct10dif-arm-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o
4243
crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
44+
chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o
4345

4446
quiet_cmd_perl = PERL $@
4547
cmd_perl = $(PERL) $(<) > $(@)
4648

47-
$(src)/aesbs-core.S_shipped: $(src)/bsaes-armv7.pl
48-
$(call cmd,perl)
49-
5049
$(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl
5150
$(call cmd,perl)
5251

5352
$(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
5453
$(call cmd,perl)
5554

56-
.PRECIOUS: $(obj)/aesbs-core.S $(obj)/sha256-core.S $(obj)/sha512-core.S
55+
.PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S

0 commit comments

Comments
 (0)