[PATCH 2/3] random: make /dev/urandom scalable for silly userspace programs

2016-05-01 Thread Theodore Ts'o
On a system with a 4 socket (NUMA) system where a large number of application processes were all trying to read from /dev/urandom, this can result in the system spending 80% of its time contending on the global urandom spinlock. The application have used its own PRNG, but let's try to help it from

[PATCH 3/3] random: add interrupt callback to VMBus IRQ handler

2016-05-01 Thread Theodore Ts'o
From: Stephan Mueller The Hyper-V Linux Integration Services use the VMBus implementation for communication with the Hypervisor. VMBus registers its own interrupt handler that completely bypasses the common Linux interrupt handling. This implies that the interrupt entropy collector is not trigger

[PATCH 1/3] random: replace non-blocking pool with a Chacha20-based CRNG

2016-05-01 Thread Theodore Ts'o
The CRNG is faster, and we don't pretend to track entropy usage in the CRNG any more. Signed-off-by: Theodore Ts'o --- crypto/chacha20_generic.c | 61 -- drivers/char/random.c | 282 ++ include/crypto/chacha20.h | 1 + lib/Makefile

[RFC PATCH 0/3] random: replace urandom pool with a CRNG

2016-05-01 Thread Theodore Ts'o
Everyone is consing up their own random patches, so this is my set. :-) By using a CRNG to replace the urandom pool, we address a number of complaints which Stephan Mueller has been concerned about. We now use a much more aggressive interrupt sampling system to quickly initialize a CRNG which ge

Re: skcipher

2016-05-01 Thread Stephan Mueller
Am Montag, 2. Mai 2016, 11:14:01 schrieb Gadre Nayan: Hi Gadre, > Hello, > > I have read the crypto library documentation on chronox.de. > > I used there sample code for symmetric key cipher operation. > However in the check: > > skcipher = crypto_alloc_skcipher("cbc-aes-aesni", 0, 0); > if (I

skcipher

2016-05-01 Thread Gadre Nayan
Hello, I have read the crypto library documentation on chronox.de. I used there sample code for symmetric key cipher operation. However in the check: skcipher = crypto_alloc_skcipher("cbc-aes-aesni", 0, 0); if (IS_ERR(skcipher)) { pr_info("could not allocate skcipher handle\n"); return PTR_ERR(s

Patch "crypto: gcm - Fix rfc4543 decryption crash" has been added to the 3.14-stable tree

2016-05-01 Thread gregkh
This is a note to let you know that I've just added the patch titled crypto: gcm - Fix rfc4543 decryption crash to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: crypto-gcm-f

Re: Crypto hash function decryption

2016-05-01 Thread Stephan Mueller
Am Sonntag, 1. Mai 2016, 19:05:12 schrieb Gadre Nayan: Hi Gadre, > Yes, i was reading about that till your reply came. > > So then if not hash...then should I use asymmetric or symmetric key APIs. > > My kernel version is 3.19, what APIs can I use which can compile with this > kernel version. >

Re: Crypto hash function decryption

2016-05-01 Thread Stephan Mueller
Am Sonntag, 1. Mai 2016, 18:35:51 schrieb Gadre Nayan: Hi Gadre, > Hi, > > I wanted to implement a simple encryption decryption of data in kernel > space to start with the kernel crypto library. > > I have the following: > > int myFunction() { > > struct scatterlist sg; > stru

Crypto hash function decryption

2016-05-01 Thread Gadre Nayan
Hi, I wanted to implement a simple encryption decryption of data in kernel space to start with the kernel crypto library. I have the following: int myFunction() { struct scatterlist sg; struct crypto_hash *tfm; struct hash_desc desc; unsigned char input[21];

[PATCH] crypto: constify ccp_actions structure

2016-05-01 Thread Julia Lawall
The ccp_actions structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/crypto/ccp/ccp-dev-v3.c |2 +- drivers/crypto/ccp/ccp-dev.h|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cr