[cryptodev:master 81/86] htmldocs: include/linux/crypto.h:614: warning: Function parameter or member 'stats.aead' not described in 'crypto_alg'

2018-12-07 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 88d905e20b11f7ad841e3afddaf1d59b6693c4a1 commit: 17c18f9e33282a170458cb5ea20759bfcb0da7d8 [81/86] crypto: user - Split stats in multiple structures reproduce: make htmldocs All warnings (new ones

[PATCH] crypto: caam - fix setting IV after decrypt

2018-12-07 Thread Sascha Hauer
The crypto API wants the updated IV in req->info after decryption. The updated IV used to be copied correctly to req->info after running the decryption job. Since 115957bb3e59 this is done before running the job so instead of the updated IV only the unmodified input IV is given back to the crypto

Re: [PATCH v5 00/11] crypto: crypto_user_stat: misc enhancement

2018-12-06 Thread Herbert Xu
On Thu, Nov 29, 2018 at 02:42:15PM +, Corentin Labbe wrote: > Hello > > This patchset fixes all reported problem by Eric biggers. > > Regards > > Changes since v4: > - Inlined functions when !CRYPTO_STATS > > Changes since v3: > - Added a crypto_stats_init as asked vy Neil Horman > - Fixed

Re: [crypto chcr 1/2] small packet Tx stalls the queue

2018-12-06 Thread Herbert Xu
On Fri, Nov 30, 2018 at 02:31:48PM +0530, Atul Gupta wrote: > Immediate packets sent to hardware should include the work > request length in calculating the flits. WR occupy one flit and > if not accounted result in invalid request which stalls the HW > queue. > > Cc: sta...@vger.kernel.org >

[PATCH] crypto: adiantum - adjust some comments to match latest paper

2018-12-06 Thread Eric Biggers
From: Eric Biggers The 2018-11-28 revision of the Adiantum paper has revised some notation: - 'M' was replaced with 'L' (meaning "Left", for the left-hand part of the message) in the definition of Adiantum hashing, to avoid confusion with the full message - ε-almost-∆-universal is now

[PATCH] crypto: xchacha20 - fix comments for test vectors

2018-12-06 Thread Eric Biggers
From: Eric Biggers The kernel's ChaCha20 uses the RFC7539 convention of the nonce being 12 bytes rather than 8, so actually I only appended 12 random bytes (not 16) to its test vectors to form 24-byte nonces for the XChaCha20 test vectors. The other 4 bytes were just from zero-padding the

[PATCH] crypto: xchacha - add test vector from XChaCha20 draft RFC

2018-12-06 Thread Eric Biggers
From: Eric Biggers There is a draft specification for XChaCha20 being worked on. Add the XChaCha20 test vector from the appendix so that we can be extra sure the kernel's implementation is compatible. I also recomputed the ciphertext with XChaCha12 and added it there too, to keep the tests for

Using Advanced Vector eXtensions with hand-coded x64 algorithms (e.g /arch/x86/blowfish-x86_64-asm_64.S)

2018-12-04 Thread Shipof _
I was curious if it might make implementing F() faster to use instructions that are meant to work with sets of data similar to what would be processed

[PATCH] crypto: adiantum - propagate CRYPTO_ALG_ASYNC flag to instance

2018-12-04 Thread Eric Biggers
From: Eric Biggers If the stream cipher implementation is asynchronous, then the Adiantum instance must be flagged as asynchronous as well. Otherwise someone asking for a synchronous algorithm can get an asynchronous algorithm. There are no asynchronous xchacha12 or xchacha20 implementations

Re: [PATCH] fscrypt: remove CRYPTO_CTR dependency

2018-12-04 Thread Eric Biggers
On Thu, Sep 06, 2018 at 12:43:41PM +0200, Ard Biesheuvel wrote: > On 5 September 2018 at 21:24, Eric Biggers wrote: > > From: Eric Biggers > > > > fscrypt doesn't use the CTR mode of operation for anything, so there's > > no need to select CRYPTO_CTR. It was added by commit 71dea01ea2ed > >

[PATCH v2 0/3] crypto: arm64/chacha - performance improvements

2018-12-04 Thread Ard Biesheuvel
Improve the performance of NEON based ChaCha: Patch #1 adds a block size of 1472 to the tcrypt test template so we have something that reflects the VPN case. Patch #2 improves performance for arbitrary length inputs: on deep pipelines, throughput increases ~30% when running on inputs blocks

[PATCH v2 1/3] crypto: tcrypt - add block size of 1472 to skcipher template

2018-12-04 Thread Ard Biesheuvel
In order to have better coverage of algorithms operating on block sizes that are in the ballpark of a VPN packet, add 1472 to the block_sizes array. Signed-off-by: Ard Biesheuvel --- crypto/tcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/tcrypt.c

[PATCH v2 3/3] crypto: arm64/chacha - use combined SIMD/ALU routine for more speed

2018-12-04 Thread Ard Biesheuvel
To some degree, most known AArch64 micro-architectures appear to be able to issue ALU instructions in parellel to SIMD instructions without affecting the SIMD throughput. This means we can use the ALU to process a fifth ChaCha block while the SIMD is processing four blocks in parallel.

[PATCH v2 2/3] crypto: arm64/chacha - optimize for arbitrary length inputs

2018-12-04 Thread Ard Biesheuvel
Update the 4-way NEON ChaCha routine so it can handle input of any length >64 bytes in its entirety, rather than having to call into the 1-way routine and/or memcpy()s via temp buffers to handle the tail of a ChaCha invocation that is not a multiple of 256 bytes. On inputs that are a multiple of

[crypto chcr 2/2] ESN for Inline IPSec Tx

2018-11-30 Thread Atul Gupta
Send SPI, 64b seq nos and 64b IV with aadiv drop for inline crypto. This information is added in outgoing packet after the CPL TX PKT XT and removed by hardware. The aad, auth and cipher offsets are then adjusted for ESN enabled tunnel. Signed-off-by: Atul Gupta ---

[crypto chcr 1/2] small packet Tx stalls the queue

2018-11-30 Thread Atul Gupta
Immediate packets sent to hardware should include the work request length in calculating the flits. WR occupy one flit and if not accounted result in invalid request which stalls the HW queue. Cc: sta...@vger.kernel.org Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chcr_ipsec.c | 5 -

Re: [PATCH 0/3] crypto: x86/chacha20 - AVX-512VL block functions

2018-11-29 Thread Herbert Xu
On Tue, Nov 20, 2018 at 05:30:47PM +0100, Martin Willi wrote: > In the quest for pushing the limits of chacha20 encryption for both IPsec > and Wireguard, this small series adds AVX-512VL block functions. The VL > variant works on 256-bit ymm registers, but compared to AVX2 can benefit > from the

Re: [Help] Null pointer exception in scatterwalk_start() in kernel-4.9

2018-11-28 Thread Herbert Xu
On Tue, Nov 20, 2018 at 07:09:53AM +, gongchen (E) wrote: > Hi Dear Herbert, > > Sorry to bother you , but we’ve met a problem in crypto module, > would you please kindly help us look into it ? Thank you very much. > > In the below function chain,

[no subject]

2018-11-26 Thread Offer!
-- Guten Tag, Wir sind eine registrierte private Geldverleiher. Wir geben Kredite an Firmen, Einzelpersonen, die ihre finanzielle Status auf der ganzen Welt aktualisieren müssen, mit minimalen jährlichen Zinsen von 2% .reply, wenn nötig. Good Day, We are a registered private money lender. We

[PATCH 1/1] cavium: Update firmware for CNN55XX crypto driver

2018-11-22 Thread Nagadheeraj, Rottela
Firmware upgraded to v10 Signed-off-by: Nagadheeraj Rottela --- WHENCE | 2 +- cavium/cnn55xx_se.fw | Bin 27698 -> 35010 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WHENCE b/WHENCE index a188c0d..ed10d5b 100644 --- a/WHENCE +++ b/WHENCE @@ -3586,7 +3586,7

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-20 Thread Jason A. Donenfeld
Hi Martin, On Tue, Nov 20, 2018 at 5:29 PM Martin Willi wrote: > Thanks for the offer, no need at this time. But I certainly would > welcome if you could do some (Wireguard) benching with that code to see > if it works for you. I certainly will test it in a few different network circumstances,

[PATCH 3/3] crypto: x86/chacha20 - Add a 4-block AVX-512VL variant

2018-11-20 Thread Martin Willi
This version uses the same principle as the AVX2 version by scheduling the operations for two block pairs in parallel. It benefits from the AVX-512VL rotate instructions and the more efficient partial block handling using "vmovdqu8", resulting in a speedup of the raw block function of ~20%.

[PATCH 0/3] crypto: x86/chacha20 - AVX-512VL block functions

2018-11-20 Thread Martin Willi
In the quest for pushing the limits of chacha20 encryption for both IPsec and Wireguard, this small series adds AVX-512VL block functions. The VL variant works on 256-bit ymm registers, but compared to AVX2 can benefit from the new instructions. Compared to the AVX2 version, these block functions

[PATCH 2/3] crypto: x86/chacha20 - Add a 2-block AVX-512VL variant

2018-11-20 Thread Martin Willi
This version uses the same principle as the AVX2 version. It benefits from the AVX-512VL rotate instructions and the more efficient partial block handling using "vmovdqu8", resulting in a speedup of ~20%. Unlike the AVX2 version, it is faster than the single block SSSE3 version to process a

[PATCH 1/3] crypto: x86/chacha20 - Add a 8-block AVX-512VL variant

2018-11-20 Thread Martin Willi
This variant is similar to the AVX2 version, but benefits from the AVX-512 rotate instructions and the additional registers, so it can operate without any data on the stack. It uses ymm registers only to avoid the massive core throttling on Skylake-X platforms. Nontheless does it bring a ~30%

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-20 Thread Martin Willi
Hi Jason, > [...] I have a massive Xeon Gold 5120 machine that I can give you > access to if you'd like to do some testing and benching. Thanks for the offer, no need at this time. But I certainly would welcome if you could do some (Wireguard) benching with that code to see if it works for you.

[Help] Null pointer exception in scatterwalk_start() in kernel-4.9

2018-11-19 Thread gongchen (E)
Hi Dear Herbert, Sorry to bother you , but we’ve met a problem in crypto module, would you please kindly help us look into it ? Thank you very much. In the below function chain, scatterwalk_start() doesn't check the result of sg_next(), so the kernel will crash if

Re: [PATCH] crypto: drop mask=CRYPTO_ALG_ASYNC from 'shash' tfm allocations

2018-11-19 Thread Herbert Xu
On Wed, Nov 14, 2018 at 12:21:11PM -0800, Eric Biggers wrote: > From: Eric Biggers > > 'shash' algorithms are always synchronous, so passing CRYPTO_ALG_ASYNC > in the mask to crypto_alloc_shash() has no effect. Many users therefore > already don't pass it, but some still do. This inconsistency

Re: [PATCH] crypto: drop mask=CRYPTO_ALG_ASYNC from 'cipher' tfm allocations

2018-11-19 Thread Herbert Xu
On Wed, Nov 14, 2018 at 12:19:39PM -0800, Eric Biggers wrote: > From: Eric Biggers > > 'cipher' algorithms (single block ciphers) are always synchronous, so > passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_cipher() has no > effect. Many users therefore already don't pass it, but some

Re: [PATCH] crypto: remove useless initializations of cra_list

2018-11-19 Thread Herbert Xu
On Wed, Nov 14, 2018 at 11:35:48AM -0800, Eric Biggers wrote: > From: Eric Biggers > > Some algorithms initialize their .cra_list prior to registration. > But this is unnecessary since crypto_register_alg() will overwrite > .cra_list when adding the algorithm to the 'crypto_alg_list'. >

Re: [PATCH] crypto: inside-secure - remove useless setting of type flags

2018-11-19 Thread Herbert Xu
On Wed, Nov 14, 2018 at 11:10:53AM -0800, Eric Biggers wrote: > From: Eric Biggers > > Remove the unnecessary setting of CRYPTO_ALG_TYPE_SKCIPHER. > Commit 2c95e6d97892 ("crypto: skcipher - remove useless setting of type > flags") took care of this everywhere else, but a few more instances made

Spende

2018-11-19 Thread daniel
Hallo, Sie haben eine wohltätige Spende in Höhe von 4.800, 000.00EUR, ich der Amerika-Lotterie Wert $ 560 Millionen gewonnen und ich bin einen Teil davon fünf glückliche Menschen und Altersheimen Spenden.Kontaktieren Sie mich für diesen Gott Gelegenheit per e-Mail: jane.d...@zoho.com -- This

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-19 Thread Jason A. Donenfeld
Hi Martin, On Mon, Nov 19, 2018 at 8:52 AM Martin Willi wrote: > > Adding AVX-512VL support is relatively simple. I have a patchset mostly > ready that is more than competitive with the code from Zinc. I'll clean > that up and do more testing before posting it later this week. Terrific.

Re: [RFCv3 PATCH 1/6] uacce: Add documents for WarpDrive/uacce

2018-11-19 Thread Leon Romanovsky
On Mon, Nov 19, 2018 at 05:19:10PM +0800, Kenneth Lee wrote: > On Mon, Nov 19, 2018 at 05:14:05PM +0800, Kenneth Lee wrote: > > Date: Mon, 19 Nov 2018 17:14:05 +0800 > > From: Kenneth Lee > > To: Leon Romanovsky > > CC: Tim Sell , linux-...@vger.kernel.org, > > Alexander Shishkin , Zaibo Xu > >

Re: [RFCv3 PATCH 1/6] uacce: Add documents for WarpDrive/uacce

2018-11-19 Thread Kenneth Lee
On Mon, Nov 19, 2018 at 05:14:05PM +0800, Kenneth Lee wrote: > Date: Mon, 19 Nov 2018 17:14:05 +0800 > From: Kenneth Lee > To: Leon Romanovsky > CC: Tim Sell , linux-...@vger.kernel.org, > Alexander Shishkin , Zaibo Xu > , zhangfei@foxmail.com, linux...@huawei.com, >

Re: [RFCv3 PATCH 1/6] uacce: Add documents for WarpDrive/uacce

2018-11-19 Thread Kenneth Lee
On Thu, Nov 15, 2018 at 04:54:55PM +0200, Leon Romanovsky wrote: > Date: Thu, 15 Nov 2018 16:54:55 +0200 > From: Leon Romanovsky > To: Kenneth Lee > CC: Kenneth Lee , Tim Sell , > linux-...@vger.kernel.org, Alexander Shishkin > , Zaibo Xu , > zhangfei@foxmail.com, linux...@huawei.com,

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-18 Thread Martin Willi
Hi Jason, > I'd be inclined to roll with your implementation if it can eventually > become competitive with Andy Polyakov's, [...] I think for the SSSE3/AVX2 code paths it is competitive; especially for small sizes it is faster, which is not that unimportant when implementing layer 3 VPNs. >

Important

2018-11-18 Thread Reem Al-Hashimi
Hello, My name is ms. Reem Al-Hashimi. The UAE minister of state for international cooparation. I got your contact from a certain email database from your country while i was looking for someone to handle a huge financial transaction for me in confidence. Can you receive and invest on behalf

Re: [PATCH 0/5] crypto: caam - add support for Era 10

2018-11-15 Thread Herbert Xu
On Thu, Nov 08, 2018 at 03:36:26PM +0200, Horia Geantă wrote: > This patch set adds support for CAAM Era 10, currently used in LX2160A SoC: > -new register mapping: some registers/fields are deprecated and moved > to different locations, mainly version registers > -algorithms > chacha20 (over

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-15 Thread Herbert Xu
On Sun, Nov 11, 2018 at 10:36:24AM +0100, Martin Willi wrote: > This patchset improves performance of the ChaCha20 SIMD implementations > for x86_64. For some specific encryption lengths, performance is more > than doubled. Two mechanisms are used to achieve this: > > * Instead of calculating the

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-15 Thread Jason A. Donenfeld
Hi Martin, This is nice work, and given that it's quite clean -- and that it's usually hard to screw up chacha in subtle ways when test vectors pass (unlike, say, poly1305 or curve25519), I'd be inclined to roll with your implementation if it can eventually become competitive with Andy

Re: [PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-15 Thread Herbert Xu
On Sun, Nov 11, 2018 at 10:36:24AM +0100, Martin Willi wrote: > This patchset improves performance of the ChaCha20 SIMD implementations > for x86_64. For some specific encryption lengths, performance is more > than doubled. Two mechanisms are used to achieve this: > > * Instead of calculating the

Re: [PATCH] crypto: inside-secure - remove useless setting of type flags

2018-11-14 Thread Antoine Tenart
Hi Eric, On Wed, Nov 14, 2018 at 11:10:53AM -0800, Eric Biggers wrote: > From: Eric Biggers > > Remove the unnecessary setting of CRYPTO_ALG_TYPE_SKCIPHER. > Commit 2c95e6d97892 ("crypto: skcipher - remove useless setting of type > flags") took care of this everywhere else, but a few more

[PATCH] crypto: drop mask=CRYPTO_ALG_ASYNC from 'shash' tfm allocations

2018-11-14 Thread Eric Biggers
From: Eric Biggers 'shash' algorithms are always synchronous, so passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_shash() has no effect. Many users therefore already don't pass it, but some still do. This inconsistency can cause confusion, especially since the way the 'mask' argument works

[PATCH] crypto: drop mask=CRYPTO_ALG_ASYNC from 'cipher' tfm allocations

2018-11-14 Thread Eric Biggers
From: Eric Biggers 'cipher' algorithms (single block ciphers) are always synchronous, so passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_cipher() has no effect. Many users therefore already don't pass it, but some still do. This inconsistency can cause confusion, especially since the way

[PATCH] crypto: remove useless initializations of cra_list

2018-11-14 Thread Eric Biggers
From: Eric Biggers Some algorithms initialize their .cra_list prior to registration. But this is unnecessary since crypto_register_alg() will overwrite .cra_list when adding the algorithm to the 'crypto_alg_list'. Apparently the useless assignment has just been copy+pasted around. So, remove

[PATCH] crypto: inside-secure - remove useless setting of type flags

2018-11-14 Thread Eric Biggers
From: Eric Biggers Remove the unnecessary setting of CRYPTO_ALG_TYPE_SKCIPHER. Commit 2c95e6d97892 ("crypto: skcipher - remove useless setting of type flags") took care of this everywhere else, but a few more instances made it into the tree at about the same time. Squash them before they get

our urgent respond immediately

2018-11-14 Thread Samira mohamed
Hi Friend I am a bank director of the International Finance Bank Plc bf .I want to transfer an abandoned sum of 10.5 millions USD to your account.50% will be for you. No risk involved. Contact me for more details. Kindly reply me back to my alternative email address (samiramohamed5...@gmail.com)

Price Inquiry

2018-11-12 Thread Daniel Murray
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel

Inquiry 12/11/2018

2018-11-12 Thread sinara-group
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel

Re: Something wrong with cryptodev-2.6 tree?

2018-11-12 Thread Herbert Xu
On Mon, Nov 12, 2018 at 09:44:41AM +0200, Gilad Ben-Yossef wrote: > Hi, > > It seems that the cryptodev-2.6 tree at > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > has somehow rolled back 3 months ago. > > Not sure if it's a git.kernel.org issue or something else

Something wrong with cryptodev-2.6 tree?

2018-11-11 Thread Gilad Ben-Yossef
Hi, It seems that the cryptodev-2.6 tree at https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git has somehow rolled back 3 months ago. Not sure if it's a git.kernel.org issue or something else but probably worth taking a look? Thanks, Gilad -- Gilad Ben-Yossef Chief

Re: [PATCH 03/17] hw_random: bcm2835-rng: Switch to SPDX identifier

2018-11-11 Thread Lubomir Rintel
On Sat, 2018-11-10 at 15:51 +0100, Stefan Wahren wrote: > Adopt the SPDX license identifier headers to ease license compliance > management. While we are at this fix the comment style, too. > > Cc: Lubomir Rintel > Signed-off-by: Stefan Wahren > --- > drivers/char/hw_random/bcm2835-rng.c | 7

[PATCH 6/6] crypto: x86/chacha20 - Add a 4-block AVX2 variant

2018-11-11 Thread Martin Willi
This variant builds upon the idea of the 2-block AVX2 variant that shuffles words after each round. The shuffling has a rather high latency, so the arithmetic units are not optimally used. Given that we have plenty of registers in AVX, this version parallelizes the 2-block variant to do four

[PATCH 3/6] crypto: x86/chacha20 - Support partial lengths in 8-block AVX2 variant

2018-11-11 Thread Martin Willi
Add a length argument to the eight block function for AVX2, so the block function may XOR only a partial length of eight blocks. To avoid unnecessary operations, we integrate XORing of the first four blocks in the final lane interleaving; this also avoids some work in the partial lengths path.

[PATCH 4/6] crypto: x86/chacha20 - Use larger block functions more aggressively

2018-11-11 Thread Martin Willi
Now that all block functions support partial lengths, engage the wider block sizes more aggressively. This prevents using smaller block functions multiple times, where the next larger block function would have been faster. Signed-off-by: Martin Willi --- arch/x86/crypto/chacha20_glue.c | 39

[PATCH 1/6] crypto: x86/chacha20 - Support partial lengths in 1-block SSSE3 variant

2018-11-11 Thread Martin Willi
Add a length argument to the single block function for SSSE3, so the block function may XOR only a partial length of the full block. Given that the setup code is rather cheap, the function does not process more than one block; this allows us to keep the block function selection in the C glue code.

[PATCH 2/6] crypto: x86/chacha20 - Support partial lengths in 4-block SSSE3 variant

2018-11-11 Thread Martin Willi
Add a length argument to the quad block function for SSSE3, so the block function may XOR only a partial length of four blocks. As we already have the stack set up, the partial XORing does not need to. This gives a slightly different function trailer, so we keep that separate from the 1-block

[PATCH 0/6] crypto: x86/chacha20 - SIMD performance improvements

2018-11-11 Thread Martin Willi
This patchset improves performance of the ChaCha20 SIMD implementations for x86_64. For some specific encryption lengths, performance is more than doubled. Two mechanisms are used to achieve this: * Instead of calculating the minimal number of required blocks for a given encryption length,

[PATCH 5/6] crypto: x86/chacha20 - Add a 2-block AVX2 variant

2018-11-11 Thread Martin Willi
This variant uses the same principle as the single block SSSE3 variant by shuffling the state matrix after each round. With the wider AVX registers, we can do two blocks in parallel, though. This function can increase performance and efficiency significantly for lengths that would otherwise

Re: [PATCH 03/17] hw_random: bcm2835-rng: Switch to SPDX identifier

2018-11-10 Thread Eric Anholt
Stefan Wahren writes: > Adopt the SPDX license identifier headers to ease license compliance > management. While we are at this fix the comment style, too. Reviewed-by: Eric Anholt signature.asc Description: PGP signature

Re: [PATCH 03/17] hw_random: bcm2835-rng: Switch to SPDX identifier

2018-11-10 Thread Greg Kroah-Hartman
On Sat, Nov 10, 2018 at 03:51:16PM +0100, Stefan Wahren wrote: > Adopt the SPDX license identifier headers to ease license compliance > management. While we are at this fix the comment style, too. > > Cc: Lubomir Rintel > Signed-off-by: Stefan Wahren > --- >

[PATCH 03/17] hw_random: bcm2835-rng: Switch to SPDX identifier

2018-11-10 Thread Stefan Wahren
Adopt the SPDX license identifier headers to ease license compliance management. While we are at this fix the comment style, too. Cc: Lubomir Rintel Signed-off-by: Stefan Wahren --- drivers/char/hw_random/bcm2835-rng.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

How driver can mark the algo implementation Unavailable

2018-11-09 Thread Harsh Jain
Hi All, PCI based devices can be shutdown from sysfs interface echo "unbind" > /sys/bus/pci/drivers/cxgb4/unbind In case device has active Transformation(tfm), Drivers cannot un-register the Algorithms because alg->cra_refcnt will be non zero. Can driver use the "CRYPTO_ALG_DEAD" flag to mark

Re: [PATCH 1/2] crypto: fix cfb mode decryption

2018-11-09 Thread Herbert Xu
On Sat, Oct 20, 2018 at 02:01:52AM +0300, Dmitry Eremin-Solenikov wrote: > crypto_cfb_decrypt_segment() incorrectly XOR'ed generated keystream with > IV, rather than with data stream, resulting in incorrect decryption. > Test vectors will be added in the next patch. > > Signed-off-by: Dmitry

Re: [PATCH v3 0/2] crypto: some hardening against AES cache-timing attacks

2018-11-09 Thread Herbert Xu
On Wed, Oct 17, 2018 at 09:37:57PM -0700, Eric Biggers wrote: > This series makes the "aes-fixed-time" and "aes-arm" implementations of > AES more resistant to cache-timing attacks. > > Note that even after these changes, the implementations still aren't > necessarily guaranteed to be

Re: [PATCH] crypto/simd: correctly take reqsize of wrapped skcipher into account

2018-11-09 Thread Ard Biesheuvel
On 9 November 2018 at 10:45, Herbert Xu wrote: > On Fri, Nov 09, 2018 at 05:44:47PM +0800, Herbert Xu wrote: >> On Fri, Nov 09, 2018 at 12:33:23AM +0100, Ard Biesheuvel wrote: >> > >> > This should be >> > >> > reqsize += max(crypto_skcipher_reqsize(_tfm->base); >> >

Re: [PATCH] crypto/simd: correctly take reqsize of wrapped skcipher into account

2018-11-09 Thread Herbert Xu
On Fri, Nov 09, 2018 at 05:44:47PM +0800, Herbert Xu wrote: > On Fri, Nov 09, 2018 at 12:33:23AM +0100, Ard Biesheuvel wrote: > > > > This should be > > > > reqsize += max(crypto_skcipher_reqsize(_tfm->base); > >crypto_skcipher_reqsize(cryptd_skcipher_child(cryptd_tfm))); > > > > since

Re: [PATCH] crypto/simd: correctly take reqsize of wrapped skcipher into account

2018-11-09 Thread Herbert Xu
On Fri, Nov 09, 2018 at 12:33:23AM +0100, Ard Biesheuvel wrote: > > This should be > > reqsize += max(crypto_skcipher_reqsize(_tfm->base); >crypto_skcipher_reqsize(cryptd_skcipher_child(cryptd_tfm))); > > since the cryptd path in simd still needs some space in the subreq for > the

Re: .S_shipped unnecessary?

2018-11-08 Thread Masahiro Yamada
On Fri, Nov 9, 2018 at 8:42 AM Ard Biesheuvel wrote: > > (+ Masahiro, kbuild ml) > > On 8 November 2018 at 21:37, Jason A. Donenfeld wrote: > > Hi Ard, Eric, and others, > > > > As promised, the next Zinc patchset will have less generated code! After a > > bit of work with Andy and Samuel, I'll

Re: [PATCH] crypto/simd: correctly take reqsize of wrapped skcipher into account

2018-11-08 Thread Qian Cai
> On Nov 8, 2018, at 6:33 PM, Ard Biesheuvel wrote: > > On 8 November 2018 at 23:55, Ard Biesheuvel wrote: >> The simd wrapper's skcipher request context structure consists >> of a single subrequest whose size is taken from the subordinate >> skcipher. However, in simd_skcipher_init(), the

Re: .S_shipped unnecessary?

2018-11-08 Thread Jason A. Donenfeld
Hey Ard, On Fri, Nov 9, 2018 at 12:42 AM Ard Biesheuvel wrote: > Wonderful! Any problems doing that for x86_64 ? The x86_64 is still a WIP, but hopefully we'll succeed. > I agree 100%. When I added this the first time, it was at the request > of the ARM maintainer, who was reluctant to rely on

Re: .S_shipped unnecessary?

2018-11-08 Thread Ard Biesheuvel
(+ Masahiro, kbuild ml) On 8 November 2018 at 21:37, Jason A. Donenfeld wrote: > Hi Ard, Eric, and others, > > As promised, the next Zinc patchset will have less generated code! After a > bit of work with Andy and Samuel, I'll be bundling the perlasm. > Wonderful! Any problems doing that for

Re: [PATCH] crypto/simd: correctly take reqsize of wrapped skcipher into account

2018-11-08 Thread Ard Biesheuvel
On 8 November 2018 at 23:55, Ard Biesheuvel wrote: > The simd wrapper's skcipher request context structure consists > of a single subrequest whose size is taken from the subordinate > skcipher. However, in simd_skcipher_init(), the reqsize that is > retrieved is not from the subordinate skcipher

[PATCH] crypto/simd: correctly take reqsize of wrapped skcipher into account

2018-11-08 Thread Ard Biesheuvel
The simd wrapper's skcipher request context structure consists of a single subrequest whose size is taken from the subordinate skcipher. However, in simd_skcipher_init(), the reqsize that is retrieved is not from the subordinate skcipher but from the cryptd request structure, whose size is

.S_shipped unnecessary?

2018-11-08 Thread Jason A. Donenfeld
Hi Ard, Eric, and others, As promised, the next Zinc patchset will have less generated code! After a bit of work with Andy and Samuel, I'll be bundling the perlasm. One thing I'm wondering about, though, is the wisdom behind the current .S_shipped pattern. Usually the _shipped is for big

[PATCH 5/5] crypto: caam/qi2 - add support for Chacha20 + Poly1305

2018-11-08 Thread Horia Geantă
Add support for Chacha20 + Poly1305 combined AEAD: -generic (rfc7539) -IPsec (rfc7634 - known as rfc7539esp in the kernel) Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg.c | 4 +- drivers/crypto/caam/caamalg_desc.c | 24 ++- drivers/crypto/caam/caamalg_desc.h | 3 +-

[PATCH 4/5] crypto: caam/jr - add support for Chacha20 + Poly1305

2018-11-08 Thread Horia Geantă
Add support for Chacha20 + Poly1305 combined AEAD: -generic (rfc7539) -IPsec (rfc7634 - known as rfc7539esp in the kernel) Signed-off-by: Cristian Stoica Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg.c | 221 -

[PATCH 0/5] crypto: caam - add support for Era 10

2018-11-08 Thread Horia Geantă
This patch set adds support for CAAM Era 10, currently used in LX2160A SoC: -new register mapping: some registers/fields are deprecated and moved to different locations, mainly version registers -algorithms chacha20 (over DPSECI - Data Path SEC Interface on fsl-mc bus) rfc7539(chacha20,poly1305)

[PATCH 1/5] crypto: caam - add register map changes cf. Era 10

2018-11-08 Thread Horia Geantă
Era 10 changes the register map. The updates that affect the drivers: -new version registers are added -DBG_DBG[deco_state] field is moved to a new register - DBG_EXEC[19:16] @ 8_0E3Ch. Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg.c| 47 +

[PATCH 3/5] crypto: export CHACHAPOLY_IV_SIZE

2018-11-08 Thread Horia Geantă
From: Cristian Stoica Move CHACHAPOLY_IV_SIZE to header file, so it can be reused. Signed-off-by: Cristian Stoica Signed-off-by: Horia Geantă --- crypto/chacha20poly1305.c | 2 -- include/crypto/chacha20.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 2/5] crypto: caam/qi2 - add support for ChaCha20

2018-11-08 Thread Horia Geantă
Add support for ChaCha20 skcipher algorithm. Signed-off-by: Carmen Iorga Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg_desc.c | 6 -- drivers/crypto/caam/caamalg_qi2.c | 27 +-- drivers/crypto/caam/compat.h | 1 + drivers/crypto/caam/desc.h

Re: [RFC PATCH 1/4] kconfig: add as-instr macro to scripts/Kconfig.include

2018-11-07 Thread Vladimir Murzin
On 07/11/18 14:55, Will Deacon wrote: > On Wed, Nov 07, 2018 at 09:40:05AM +, Vladimir Murzin wrote: >> There are cases where the whole feature, for instance arm64/lse or >> arm/crypto, can depend on assembler. Current practice is to report >> buildtime that selected feature is not supported,

Re: [RFC PATCH 1/4] kconfig: add as-instr macro to scripts/Kconfig.include

2018-11-07 Thread Will Deacon
On Wed, Nov 07, 2018 at 09:40:05AM +, Vladimir Murzin wrote: > There are cases where the whole feature, for instance arm64/lse or > arm/crypto, can depend on assembler. Current practice is to report > buildtime that selected feature is not supported, which can be quite > annoying... Why is it

[RFC PATCH 2/4] arm64: lse: expose dependency on gas via Kconfig

2018-11-07 Thread Vladimir Murzin
So we can simply hide LSE support if dependency is not satisfied. Cc: Will Deacon Signed-off-by: Vladimir Murzin --- arch/arm64/Kconfig | 1 + arch/arm64/Makefile | 13 ++--- arch/arm64/include/asm/atomic.h | 2 +- arch/arm64/include/asm/lse.h| 6 +++---

[RFC PATCH 1/4] kconfig: add as-instr macro to scripts/Kconfig.include

2018-11-07 Thread Vladimir Murzin
There are cases where the whole feature, for instance arm64/lse or arm/crypto, can depend on assembler. Current practice is to report buildtime that selected feature is not supported, which can be quite annoying... It'd nicer if we can check assembler first and opt-in feature visibility in

[RFC PATCH 3/4] arm64: turn "broken gas inst" into real config option

2018-11-07 Thread Vladimir Murzin
So it is available everywhere and there is no need to keep CONFIG_ARM64 workaround ;) Cc: Marc Zyngier Signed-off-by: Vladimir Murzin --- arch/arm64/Kconfig | 3 +++ arch/arm64/Makefile | 9 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm64/Kconfig

[RFC PATCH 0/4] Minor improvements over handling dependency on GAS

2018-11-07 Thread Vladimir Murzin
With recent changes in Kconfig processing it is now possible to expose dependency on specific tools and supported options via Kconfig rather than bury it deep in Makefile. This small series try to address the case where the whole feature, for instance arm64/lse or arm/crypto, depends on GAS.

[RFC PATCH 4/4] ARM: crypto: expose dependency on gas via Kconfig

2018-11-07 Thread Vladimir Murzin
So we can advertise only those entries which dependency is satisfied. Cc: Ard Biesheuvel Signed-off-by: Vladimir Murzin --- arch/arm/crypto/Kconfig | 31 +-- arch/arm/crypto/Makefile | 31 ++- 2 files changed, 27 insertions(+), 35

Re: [PATCH 1/2] crypto: fix cfb mode decryption

2018-11-01 Thread Dmitry Eremin-Solenikov
чт, 1 нояб. 2018 г. в 11:41, Herbert Xu : > > On Thu, Nov 01, 2018 at 11:32:37AM +0300, Dmitry Eremin-Solenikov wrote: > > > > Since 4.20 pull went into Linus'es tree, any change of getting these two > > patches > > in crypto tree? > > These aren't critical enough for the current mainline so they

Re: [PATCH 1/2] crypto: fix cfb mode decryption

2018-11-01 Thread Herbert Xu
On Thu, Nov 01, 2018 at 11:32:37AM +0300, Dmitry Eremin-Solenikov wrote: > > Since 4.20 pull went into Linus'es tree, any change of getting these two > patches > in crypto tree? These aren't critical enough for the current mainline so they will go in at the next merge window. Cheers, -- Email:

Re: [PATCH 1/2] crypto: fix cfb mode decryption

2018-11-01 Thread Dmitry Eremin-Solenikov
Hello, вс, 21 окт. 2018 г. в 11:07, James Bottomley : > > On Sun, 2018-10-21 at 09:05 +0200, Ard Biesheuvel wrote: > > (+ James) > > Thanks! > > > On 20 October 2018 at 01:01, Dmitry Eremin-Solenikov > > wrote: > > > crypto_cfb_decrypt_segment() incorrectly XOR'ed generated keystream > > > with

Hello

2018-10-28 Thread Mr Fawaz Al Saleh
Please can you contact me for a transaction.

Re: [PATCH v4 2/7] tpm2-sessions: Add full HMAC and encrypt/decrypt session handling

2018-10-25 Thread Jarkko Sakkinen
On Wed, 24 Oct 2018, James Bottomley wrote: +static void KDFa(u8 *key, int keylen, const char *label, u8 *u, +u8 *v, int bytes, u8 *out) Should this be in lower case? I would rename it as tpm_kdfa(). This one is defined as KDFa() in the standards and it's not TPM specific

Re: [PATCH v4 0/7] add integrity and security to TPM2 transactions

2018-10-25 Thread Jarkko Sakkinen
On Wed, 24 Oct 2018, James Bottomley wrote: On Wed, 2018-10-24 at 02:51 +0300, Jarkko Sakkinen wrote: I would consider sending first a patch set that would iterate the existing session stuff to be ready for this i.e. merge in two iterations (emphasis on the word "consider"). We can probably

Re: [PATCH v4 2/7] tpm2-sessions: Add full HMAC and encrypt/decrypt session handling

2018-10-24 Thread James Bottomley
On Wed, 2018-10-24 at 02:48 +0300, Jarkko Sakkinen wrote: > On Mon, 22 Oct 2018, James Bottomley wrote: > > [...] I'll tidy up the descriptions. > These all sould be combined with the existing session stuff inside > tpm2-cmd.c and not have duplicate infrastructures. The file name > should be

Re: [PATCH v4 2/7] tpm2-sessions: Add full HMAC and encrypt/decrypt session handling

2018-10-24 Thread Jarkko Sakkinen
On Tue, 23 Oct 2018, Ard Biesheuvel wrote: On 23 October 2018 at 04:01, James Bottomley wrote: On Mon, 2018-10-22 at 19:19 -0300, Ard Biesheuvel wrote: [...] +static void hmac_init(struct shash_desc *desc, u8 *key, int keylen) +{ + u8 pad[SHA256_BLOCK_SIZE]; + int i; + +

Re: [PATCH v4 0/7] add integrity and security to TPM2 transactions

2018-10-24 Thread James Bottomley
On Wed, 2018-10-24 at 02:51 +0300, Jarkko Sakkinen wrote: > I would consider sending first a patch set that would iterate the > existing session stuff to be ready for this i.e. merge in two > iterations (emphasis on the word "consider"). We can probably merge > the groundwork quite fast. I

Re: [PATCH v4 5/7] trusted keys: Add session encryption protection to the seal/unseal path

2018-10-23 Thread Jarkko Sakkinen
The tag in the short description does not look at all. Should be either "tpm:" or "keys, trusted:". On Mon, 22 Oct 2018, James Bottomley wrote: If some entity is snooping the TPM bus, the can see the data going in to be sealed and the data coming out as it is unsealed. Add parameter and

Re: [PATCH v4 0/7] add integrity and security to TPM2 transactions

2018-10-23 Thread Jarkko Sakkinen
I would consider sending first a patch set that would iterate the existing session stuff to be ready for this i.e. merge in two iterations (emphasis on the word "consider"). We can probably merge the groundwork quite fast. /Jarkko On Mon, 22 Oct 2018, James Bottomley wrote: By now, everybody

  1   2   3   4   5   6   7   8   9   10   >