Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Stephan Mueller
Am Freitag, dem 09.04.2021 um 10:11 +0800 schrieb Hangbin Liu: > On Thu, Apr 08, 2021 at 08:11:34AM -0700, Eric Biggers wrote: > > On Thu, Apr 08, 2021 at 07:58:08PM +0800, Hangbin Liu wrote: > > > On Thu, Apr 08, 2021 at 09:06:52AM +0800, Hangbin Liu wrote: > > > > > Also, couldn't you just consid

Re: crypto: FIPS 200 mode

2021-03-31 Thread Stephan Mueller
Am Dienstag, dem 30.03.2021 um 15:26 -0700 schrieb Randy Dunlap: > > The Kconfig help text for CRYPTO_FIPS says > > config CRYPTO_FIPS > bool "FIPS 200 compliance" > ... > help >   This option enables the fips boot option which is >   required if you want the syste

Re: [PATCH v2] Documentation: crypto: add info about "fips=" boot option

2021-03-31 Thread Stephan Mueller
Am Dienstag, dem 30.03.2021 um 15:44 -0700 schrieb Eric Biggers: > On Tue, Mar 30, 2021 at 09:38:55AM -0700, Randy Dunlap wrote: > > On 3/29/21 10:29 PM, Eric Biggers wrote: > > > On Mon, Mar 29, 2021 at 10:06:51PM -0700, Randy Dunlap wrote: > > > > Having just seen a report of using "fips=1" on th

Re: [PATCH] crypto: jitterentropy: Put constants on the right side of the expression

2021-03-18 Thread Stephan Mueller
> Signed-off-by: Milan Djurovic Thank you Reviewed-by: Stephan Mueller

Re: [PATCH] crypto: testmgr - add NIAP FPT_TST_EXT.1 subset of tests

2021-02-09 Thread Stephan Mueller
Am Dienstag, dem 09.02.2021 um 13:35 + schrieb Elena Petrova: > Hi Stephan, > > On Fri, 8 Jan 2021 at 18:57, Stephan Mueller wrote: > > > > Am Freitag, dem 08.01.2021 um 17:38 + schrieb Elena Petrova: > > > NIAP FPT_TST_EXT.1 [1] specification requ

Re: [PATCH] crypto: testmgr - add NIAP FPT_TST_EXT.1 subset of tests

2021-01-08 Thread Stephan Mueller
Am Freitag, dem 08.01.2021 um 17:38 + schrieb Elena Petrova: > NIAP FPT_TST_EXT.1 [1] specification requires testing of a small set of > cryptographic modules on boot for devices that need to be NIAP > compliant. This is also a requirement for FIPS CMVP 140-2/140-3 > certification. > > Current

Re: [PATCH 3/5] crypto: add RFC5869 HKDF

2021-01-06 Thread Stephan Mueller
Am Mittwoch, dem 06.01.2021 um 23:30 -0800 schrieb Eric Biggers: > On Mon, Jan 04, 2021 at 10:49:13PM +0100, Stephan Müller wrote: > > RFC5869 specifies an extract and expand two-step key derivation > > function. The HKDF implementation is provided as a service function that > > operates on a calle

Re: [PATCH 5/5] fs: use HKDF implementation from kernel crypto API

2021-01-06 Thread Stephan Mueller
gt; > > > Signed-off-by: Stephan Mueller > > --- > >  fs/crypto/Kconfig   |   2 +- > >  fs/crypto/fscrypt_private.h |   4 +- > >  fs/crypto/hkdf.c    | 108 +--- > >  3 files changed, 30 insertions(+), 84 d

Re: [PATCH 0/5] Add KDF implementations to crypto API

2021-01-06 Thread Stephan Mueller
Am Montag, dem 04.01.2021 um 14:20 -0800 schrieb Eric Biggers: > On Mon, Jan 04, 2021 at 10:45:57PM +0100, Stephan Müller wrote: > > The HKDF addition is used to replace the implementation in the filesystem > > crypto extension. This code was tested by using an EXT4 encrypted file > > system that w

Testmgr: invalid lock context

2021-01-05 Thread Stephan Mueller
Hi, with the current cryptodev-2.6 tree and the Linus rc-2 tree, I get the following during boot: [0.837048] = [0.837079] [ BUG: Invalid wait context ] [0.837079] 5.11.0-rc1+ #215 Not tainted [0.837079] - [0.837079] crypt

Re: drivers/char/random.c needs a (new) maintainer

2020-12-23 Thread Stephan Mueller
Am Mittwoch, dem 23.12.2020 um 15:32 +0100 schrieb Jason A. Donenfeld: > > I would, however, be interested in a keccak-based construction. But > just using the keccak permutation does not automatically make it > "SHA-3", so we're back at the same issue again. FIPS is simply not > interesting for o

Re: [PATCH v4 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-12-16 Thread Stephan Mueller
Am Mittwoch, dem 16.12.2020 um 10:39 +0800 schrieb yumeng: > > > > > Am Freitag, den 11.12.2020, 14:30 +0800 schrieb Meng Yu: > > > > > > +/* size in bytes of the n prime */ > > > +#define HPRE_ECC_NIST_P128_N_SIZE  16 > > > > Do we truly need P-128? Besides, I do not see that curve being

Re: [PATCH v4 5/5] crypto: hisilicon/hpre - add 'CURVE25519' algorithm

2020-12-11 Thread Stephan Mueller
Am Freitag, den 11.12.2020, 14:30 +0800 schrieb Meng Yu: >    > +/* curve25519 */ > +static u64 curve25519_g_x[] = { 0x0009, 0x, > +   0x, 0x }; > +static u64 curve25519_p[] = { 0xffed, 0xfff

Re: [PATCH v4 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-12-11 Thread Stephan Mueller
Am Freitag, den 11.12.2020, 14:30 +0800 schrieb Meng Yu: > > +/* size in bytes of the n prime */ > +#define HPRE_ECC_NIST_P128_N_SIZE  16 Do we truly need P-128? Besides, I do not see that curve being defined in contemporary cipher specs. > +#define HPRE_ECC_NIST_P192_N_SIZE  24 > +#defi

Re: [PATCH v3 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm

2020-11-18 Thread Stephan Mueller
Am Mittwoch, den 18.11.2020, 11:47 +0800 schrieb Meng Yu: Hi Meng, > Enable 'ECDH' algorithm in Kunpeng 930. > > Signed-off-by: Meng Yu > Reviewed-by: Zaibo Xu > --- >  drivers/crypto/hisilicon/hpre/hpre.h    |   2 +- >  drivers/crypto/hisilicon/hpre/hpre_crypto.c | 802 > +

Re: [PATCH v36 00/13] /dev/random - a new approach

2020-11-10 Thread Stephan Mueller
Am Montag, 19. Oktober 2020, 21:28:50 CET schrieb Stephan Müller: Hi, > > * Performance > > - Faster by up to 75% in the critical code path of the interrupt handler >depending on data collection size configurable at kernel compile time - >the default is about equal in performance with e

Re: jitterentropy: `jent_mod_init()` takes 17 ms

2020-11-10 Thread Stephan Mueller
Am Dienstag, 10. November 2020, 10:37:02 CET schrieb Paul Menzel: Hi Paul, > Dear Stephan, > > > Thank you for the quick reply. > > Am 10.11.20 um 10:25 schrieb Stephan Mueller: > > Am Montag, 9. November 2020, 20:31:02 CET schrieb Paul Menzel: > >> By mi

Re: jitterentropy: `jent_mod_init()` takes 17 ms

2020-11-10 Thread Stephan Mueller
Am Montag, 9. November 2020, 20:31:02 CET schrieb Paul Menzel: Hi Paul, > Dear Linux folks, > > > By mistake I built `XFRM_ESP` into the Linux kernel, resulting in > > CONFIG_CRYPTO_SEQIV=y > CONFIG_CRYPTO_ECHAINIV=y > > and also the Jitterentropy RNG to be built in. > > CRYPT

Re: [DISCUSSION PATCH 00/41] random: possible ways towards NIST SP800-90B compliance

2020-10-06 Thread Stephan Mueller
Am Mittwoch, 7. Oktober 2020, 06:24:09 CEST schrieb Eric Biggers: Hi Eric, > > Note that having multiple RNG implementations would cause fragmentation, > more maintenance burden, etc. So IMO, that should be a last resort. > Instead we should try to find an implementation that works for everyone

Re: [PATCH] crypto: jitterentropy - bind statically into kernel

2020-10-05 Thread Stephan Mueller
Am Montag, 5. Oktober 2020, 08:44:39 CEST schrieb Ard Biesheuvel: Hi Ard, > On Mon, 5 Oct 2020 at 08:40, Stephan Mueller wrote: > > Am Montag, 5. Oktober 2020, 08:24:46 CEST schrieb Ard Biesheuvel: > > > > Hi Ard, > > > > > If jitterentropy is a sp

Re: [PATCH] crypto: jitterentropy - bind statically into kernel

2020-10-04 Thread Stephan Mueller
Am Montag, 5. Oktober 2020, 08:24:46 CEST schrieb Ard Biesheuvel: Hi Ard, > If jitterentropy is a special case, we could put a alternate > non-'static inline' version of random_get_entropy() in the core > kernel, and only export it if JITTER_ENTROPY is built as a module in > the first place. But

Re: [DISCUSSION PATCH 00/41] random: possible ways towards NIST SP800-90B compliance

2020-10-02 Thread Stephan Mueller
Am Freitag, 2. Oktober 2020, 15:15:55 CEST schrieb Willy Tarreau: Hi Willy, > > And this is all ??? > > Possibly a lot of people got used to seeing the numerous versions > and are less attentive to new series, it's possible that your message > will wake everyone up. I think that points to my pa

Re: get_cycles from modular code in jitterentropy, was Re: [PATCH] clocksource: clint: Export clint_time_val for modules

2020-10-01 Thread Stephan Mueller
Am Freitag, 2. Oktober 2020, 08:49:05 CEST schrieb Christoph Hellwig: Hi Christoph, > On Tue, Sep 29, 2020 at 11:56:18PM -0700, Palmer Dabbelt wrote: > > clint_time_val will soon be used by the RISC-V implementation of > > random_get_entropy(), which is a static inline function that may be used >

Re: [DISCUSSION PATCH 00/41] random: possible ways towards NIST SP800-90B compliance

2020-09-21 Thread Stephan Mueller
Am Montag, 21. September 2020, 09:58:16 CEST schrieb Nicolai Stange: Hi Nicolai, > Hi all, > > first of all, my apologies for the patch bomb following up in reply to this > mail here -- it's not meant to receive any serious review at all, but only > to support the discussion I'm hoping to get go

Re: [PATCH v35 01/13] Linux Random Number Generator

2020-09-20 Thread Stephan Mueller
Am Freitag, 18. September 2020, 15:02:17 CEST schrieb kernel test robot: Hi, > All errors (new ones prefixed by >>): > >> drivers/char/lrng/lrng_chacha20.c:33:8: error: structure variable > >> 'chacha20' with 'latent_entropy' attribute has a non-integer field > >> 'block' > 33 | struct chac

Re: [PATCH v33 01/12] Linux Random Number Generator

2020-08-26 Thread Stephan Mueller
Am Mittwoch, 26. August 2020, 16:27:42 CEST schrieb kernel test robot: Hi, > >> drivers/char/lrng/lrng_chacha20.c:54:47: sparse: sparse: cast to > >> restricted __le32 >drivers/char/lrng/lrng_chacha20.c:58:47: sparse: sparse: cast to > restricted __le32 -- Thanks for the reports. Both, the _

Re: [PATCH v34 01/12] Linux Random Number Generator

2020-08-25 Thread Stephan Mueller
Am Dienstag, 25. August 2020, 13:28:53 CEST schrieb kernel test robot: Hi, > All warnings (new ones prefixed by >>): > >> drivers/char/lrng/lrng_drng.c:381:6: warning: no previous prototype for > >> 'lrng_reset' [-Wmissing-prototypes] > 381 | void lrng_reset(void) > > | ^~

Re: HMAC test fails for big key using libkcapi

2020-08-24 Thread Stephan Mueller
Am Montag, 24. August 2020, 16:41:13 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > I am using libkcapi to execute HMAC tests. One of key size is 229248 bytes. > setsockopt(tfmfd, SOL_ALG, ALG_SET_KEY API fails to set the key. I am not > getting an option to set the buf

Re: Information required on how to provide reseed input to DRBG

2020-08-14 Thread Stephan Mueller
I use " additionalInput" and " entropyInput" from > reSeed section. > > I could see only below APIs available to set the values. > crypto_drbg_get_bytes_addtl_test { crypto_rng_set_entropy, > crypto_rng_generate) crypto_drbg_reset_test {crypto_rng_set_entropy, >

Re: Information required on how to provide reseed input to DRBG

2020-08-13 Thread Stephan Mueller
Am Donnerstag, 13. August 2020, 11:01:27 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > I could successfully execute the CAVS test for DRBG with > ""predResistanceEnabled" : true" reseedImplemented": false. > > I am trying to execute the tests with "predResistanceEnab

Re: [PATCH v4] crypto: af_alg - add extra parameters for DRBG interface

2020-08-03 Thread Stephan Mueller
Am Montag, 3. August 2020, 16:48:02 CEST schrieb Elena Petrova: Hi Elena, > On Fri, 31 Jul 2020 at 08:27, Herbert Xu wrote: > > Eric Biggers wrote: > > > lock_sock() would solve the former. I'm not sure what should be done > > > about > > > rng_recvmsg(). It apparently relies on the crypto_r

Re: [PATCH] crypto: drbg: check blocklen is non zero

2020-08-02 Thread Stephan Mueller
assumed to be non zero. > So turn the assumption into a check. > > Fixes: 541af946fe13 ("crypto: drbg - SP800-90A Deterministic Random Bit > Generator") > > Signed-off-by: Tom Rix Thank you. Reviewed-by: Stephan Mueller Ciao Stephan

Re: [PATCH v31 00/12] /dev/random - a new approach with full SP800-90B

2020-07-29 Thread Stephan Mueller
Am Dienstag, 28. Juli 2020, 22:40:44 CEST schrieb Pavel Machek: Hi Pavel, > Hi! > > > The following patch set provides a different approach to /dev/random which > > is called Linux Random Number Generator (LRNG) to collect entropy within > > the Linux kernel. The main improvements compared to th

Re: [PATCH v2] crypto: af_alg - add extra parameters for DRBG interface

2020-07-21 Thread Stephan Mueller
Am Dienstag, 21. Juli 2020, 14:55:14 CEST schrieb Elena Petrova: Hi Elena, > > > +#ifdef CONFIG_CRYPTO_CAVS_DRBG > > > +static int rng_setentropy(void *private, const u8 *entropy, unsigned > > > int > > > len) +{ > > > + struct rng_parent_ctx *pctx = private; > > > + u8 *kentropy = NULL;

Re: [PATCH v2] crypto: af_alg - add extra parameters for DRBG interface

2020-07-20 Thread Stephan Mueller
Am Donnerstag, 16. Juli 2020, 18:40:28 CEST schrieb Elena Petrova: Hi Elena, sorry for the delay in answering. > Extending the userspace RNG interface: > 1. adding ALG_SET_DRBG_ENTROPY setsockopt option for entropy input; > 2. using sendmsg syscall for specifying the additional data. > > Si

Re: [PATCH 0/1] crypto: af_alg - add extra parameters for DRBG interface

2020-07-16 Thread Stephan Mueller
Am Donnerstag, 16. Juli 2020, 16:49:52 CEST schrieb Stephan Mueller: Hi Herbert, (resent, adding Herbert to the list and fix the keyrings address) > Am Donnerstag, 16. Juli 2020, 16:41:26 CEST schrieb Elena Petrova: > > Hi Herbert, > > > > > > With these issues, I

Re: [PATCH 0/1] crypto: af_alg - add extra parameters for DRBG interface

2020-07-16 Thread Stephan Mueller
Am Donnerstag, 16. Juli 2020, 16:41:26 CEST schrieb Elena Petrova: Hi Herbert, > > > > With these issues, I would assume you are better off creating your own > > > > kernel module just like I did that externalizes the crypto API to user > > > > space but is only available on your test kernel and

Re: [PATCH 0/1] crypto: af_alg - add extra parameters for DRBG interface

2020-07-14 Thread Stephan Mueller
Am Dienstag, 14. Juli 2020, 17:23:05 CEST schrieb Elena Petrova: Hi Elena, > Hi Stephan, > > On Tue, 14 Jul 2020 at 06:17, Stephan Mueller wrote: > > Am Montag, 13. Juli 2020, 18:48:56 CEST schrieb Elena Petrova: > > > > Hi Elena, > > > > > This pa

Re: [PATCH 0/1] crypto: af_alg - add extra parameters for DRBG interface

2020-07-13 Thread Stephan Mueller
Am Montag, 13. Juli 2020, 18:48:56 CEST schrieb Elena Petrova: Hi Elena, > This patch extends the userspace RNG interface to make it usable for > CAVS testing. This is achieved by adding ALG_SET_DRBG_ENTROPY > option to the setsockopt interface for specifying the entropy, and using > sendmsg sysc

Re: [PATCH v2 5/5] crypto: ECDH SP800-56A rev 3 local public key validation

2020-07-12 Thread Stephan Mueller
that key with a full validation > > compliant to section 5.6.2.3.3. > > > > Only if the full validation passes, the key is allowed to be used. > > > > The patch adds the full key validation compliant to 5.6.2.3.3 and > > performs the required check on the gene

Re: [PATCH 2/3] lib/mpi: Add mpi_sub_ui()

2020-07-10 Thread Stephan Mueller
Am Freitag, 10. Juli 2020, 16:42:39 CEST schrieb Ard Biesheuvel: Hi Ard, > On Fri, 10 Jul 2020 at 13:16, Stephan Müller wrote: > > Add mpi_sub_ui() based on Gnu PG mpz_sub_ui() from mpz/aors_ui.h > > adapting the code to the kernel's structures and coding style and also > > removing the defines

Re: [Query] RSA SHA-384 signature verification

2020-06-15 Thread Stephan Mueller
Am Dienstag, 16. Juni 2020, 05:56:04 CEST schrieb Anshuman Gupta: Hi Anshuman, > On 2020-06-15 at 21:25:58 +0200, Stephan Mueller wrote: > > Am Montag, 15. Juni 2020, 19:04:14 CEST schrieb Anshuman Gupta: > > > > Hi Anshuman, > > > > > Hi , > > &g

Re: [Query] RSA SHA-384 signature verification

2020-06-15 Thread Stephan Mueller
Am Montag, 15. Juni 2020, 19:04:14 CEST schrieb Anshuman Gupta: Hi Anshuman, > Hi , > I wanted to verify a RSA SHA-384 signature. > I am using crypto_alloc_shash(), crypto_shash_digest() API to extract > the SHA-384 digest. > I am having public key along with the sha-384 digest extracted from raw

Re: [PATCH v2 13/14] crypto: sun8i-ce: Add support for the PRNG

2020-06-15 Thread Stephan Mueller
Am Montag, 15. Juni 2020, 15:02:53 CEST schrieb LABBE Corentin: Hi, > I still dont see any memset_secure in kzfree (mm/slab_common.c). > Does I miss something ? Nope, you do not miss anything, it seems that the patch that I had seen did not go in. > > Regards Ciao Stephan

Re: HMAC Selftests keylen in FIPS mode

2020-06-12 Thread Stephan Mueller
Am Freitag, 12. Juni 2020, 17:51:52 CEST schrieb Peter P.: Hi Peter, > Hi, > > According to NIST SP800-131A Table 9, HMAC generation in FIPS must > have a keylen of 14 bytes minimum. I've noticed that in the crypto > algorithm testing framework, the HMAC test vectors from RFC 4231 all > have a t

Re: [PATCH 1/3] crypto: skcipher - Add final chunk size field for chaining

2020-06-12 Thread Stephan Mueller
Am Freitag, 12. Juni 2020, 14:07:36 CEST schrieb Herbert Xu: Hi Herbert, > Crypto skcipher algorithms in general allow chaining to break > large operations into smaller ones based on multiples of the chunk > size. However, some algorithms don't support chaining while others > (such as cts) only

Re: [PATCH] crypto: drbg - Fix memleak in drbg_prepare_hrng

2020-06-11 Thread Stephan Mueller
Am Donnerstag, 11. Juni 2020, 10:33:56 CEST schrieb Zheng Bin: Hi Zheng, Thank you for the note, but I think this is handled, albeit differently. Search for patch "[PATCH v3] crypto: DRBG - always try to free Jitter RNG instance" that is sent to the list (but not yet applied). Thanks > drbg

Re: [PATCH v2] crypto: DRBG - always try to free Jitter RNG instance

2020-06-04 Thread Stephan Mueller
Am Freitag, 5. Juni 2020, 08:16:46 CEST schrieb Eric Biggers: Hi Eric, > On Fri, Jun 05, 2020 at 07:58:15AM +0200, Stephan Mueller wrote: > > Am Freitag, 5. Juni 2020, 02:43:36 CEST schrieb Eric Biggers: > > > > Hi Eric, > > > > > On Thu, Jun 04, 2020 at 08

Re: [PATCH v2] crypto: DRBG - always try to free Jitter RNG instance

2020-06-04 Thread Stephan Mueller
be deallocated. > > > > Reported-by: syzbot+2e635807decef724a...@syzkaller.appspotmail.com > > Fixes: 97f2650e5040 ("crypto: drbg - always seeded with SP800-90B ...") > > Signed-off-by: Stephan Mueller > > --- > > > > crypto/drbg.c | 3 +++ > > 1 f

Re: [PATCH] crypto: DRBG - always try to free Jitter RNG instance

2020-06-03 Thread Stephan Mueller
be deallocated. > > > > Reported-by: syzbot+2e635807decef724a...@syzkaller.appspotmail.com > > Fixes: 97f2650e5040 ("crypto: drbg - always seeded with SP800-90B ...") > > Signed-off-by: Stephan Mueller > > --- > > > > crypto/drbg.c | 3 +++ > &g

Re: [PATCH] crypto: algif_skcipher - Cap recv SG list at ctx->used

2020-05-28 Thread Stephan Mueller
g - consolidation of...") > Cc: > Signed-off-by: Herbert Xu Reviewed-by: Stephan Mueller Thanks Ciao Stephan

Re: DRBG CAVS using libkcapi

2020-05-27 Thread Stephan Mueller
Am Mittwoch, 27. Mai 2020, 04:21:31 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > I was going through libkcapi APIs to see if it can be used for DRBG CAVS > validation. But I am thinking it cannot be. I also found cavs_driver.pl, > this seems to depend on some kernel mo

Re: Monte Carlo Test (MCT) for AES

2020-05-25 Thread Stephan Mueller
Am Dienstag, 26. Mai 2020, 05:07:15 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi Stephen, > > I to add the backend support using libkcapi APIs to exercise Kernel CAVP. > Can you please confirm if my understanding is correct? You would need to implement an equivalent to backen

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 14:00:01 CEST schrieb Krzysztof Kozlowski: Hi Krzysztof, > On Wed, 20 May 2020 at 13:53, Stephan Mueller wrote: > > > > That said, the illustrated example is typical for hardware RNGs. Yet > > > > it is never guaranteed to work that way

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 12:44:33 CEST schrieb Lukasz Stelmach: Hi Lukasz, > It was <2020-05-20 śro 11:18>, when Stephan Mueller wrote: > > Am Mittwoch, 20. Mai 2020, 11:10:32 CEST schrieb Lukasz Stelmach: > >> It was <2020-05-20 śro 08:23>, when Stephan Muelle

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 11:10:32 CEST schrieb Lukasz Stelmach: Hi Lukasz, > It was <2020-05-20 śro 08:23>, when Stephan Mueller wrote: > > Am Dienstag, 19. Mai 2020, 23:25:51 CEST schrieb Łukasz Stelmach: > >> The value was estimaded with ea_iid[1] using on 10485760

Re: [RFC/RFT PATCH 0/2] crypto: add CTS output IVs for arm64 and testmgr

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 08:54:10 CEST schrieb Ard Biesheuvel: Hi Ard, > On Wed, 20 May 2020 at 08:47, Stephan Mueller wrote: > > Am Mittwoch, 20. Mai 2020, 08:40:57 CEST schrieb Ard Biesheuvel: > > > > Hi Ard, > > > > > On Wed, 20 May 2020 at 08:03,

Re: [RFC/RFT PATCH 0/2] crypto: add CTS output IVs for arm64 and testmgr

2020-05-19 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 08:40:57 CEST schrieb Ard Biesheuvel: Hi Ard, > On Wed, 20 May 2020 at 08:03, Stephan Mueller wrote: > > Am Dienstag, 19. Mai 2020, 21:02:09 CEST schrieb Ard Biesheuvel: > > > > Hi Ard, > > > > > Stephan reports that the

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-19 Thread Stephan Mueller
Am Dienstag, 19. Mai 2020, 23:25:51 CEST schrieb Łukasz Stelmach: Hi Łukasz, > The value was estimaded with ea_iid[1] using on 10485760 bytes read from > the RNG via /dev/hwrng. The min-entropy value calculated using the most > common value estimate (NIST SP 800-90P[2], section 6.3.1) was 7.96446

Re: [RFC/RFT PATCH 0/2] crypto: add CTS output IVs for arm64 and testmgr

2020-05-19 Thread Stephan Mueller
src.nist.gov/projects/cryptographic-algorithm-validation-program/ validation-search?searchMode=validation&family=1&productType=-1&ipp=25 [3] https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/ details?validation=32608 [4] https://github.com/smuellerDD/acvpparser &

Re: ARM CE: CTS IV handling

2020-05-19 Thread Stephan Mueller
Am Dienstag, 19. Mai 2020, 19:53:57 CEST schrieb Ard Biesheuvel: Hi Ard, > On Tue, 19 May 2020 at 19:50, Ard Biesheuvel wrote: > > On Tue, 19 May 2020 at 19:35, Stephan Mueller wrote: > > > Am Dienstag, 19. Mai 2020, 18:21:01 CEST schrieb Ard Biesheuvel: > > > >

Re: ARM CE: CTS IV handling

2020-05-19 Thread Stephan Mueller
Am Dienstag, 19. Mai 2020, 18:21:01 CEST schrieb Ard Biesheuvel: Hi Ard, > > To be honest, this looks like the API is being used incorrectly. Is > this a similar issue to the one Herbert spotted recently with the CTR > code? > > When you say 'leaving the TFM untouched' do you mean the skcipher

ARM CE: CTS IV handling

2020-05-19 Thread Stephan Mueller
Hi Ard, The following report applies to kernel 5.3 as I am currently unable to test the latest upstream version. The CTS IV handling for cts-cbc-aes-ce and cts-cbc-aes-neon is not consistent with the C implementation for CTS such as cts(cbc-aes-ce) and cts(cbc-aes- neon). For example, assume e

Re: [PATCH 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-15 Thread Stephan Mueller
Am Freitag, 15. Mai 2020, 11:01:48 CEST schrieb Lukasz Stelmach: Hi Lukasz, As I mentioned, all that is or seems to be analyzed here is the quality of the cryptographic post-processing. Thus none of the data can be used for getting an idea of the entropy content. That said, the ent value inde

Re: [PATCH 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-15 Thread Stephan Mueller
Am Freitag, 15. Mai 2020, 00:18:41 CEST schrieb Lukasz Stelmach: Hi Lukasz, > > I am running tests using SP800-90B tools and the first issue I can see > is the warning that samples contain less than 1e6 bytes of data. I know > little about maths behind random number generators, but I have noticed

Re: [PATCH 2/2] hwrng: exynos - Set the quality value

2020-05-14 Thread Stephan Mueller
Am Donnerstag, 14. Mai 2020, 21:07:34 CEST schrieb Łukasz Stelmach: Hi Łukasz, > The value has been estimaded by obtainig 1024 chunks of data 128 bytes > (1024 bits) each from the generator and finding chunk with minimal > entropy using the ent(1) tool. The value was 6.332937 bits of entropy > in

Re: [PATCH 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-14 Thread Stephan Mueller
Am Donnerstag, 14. Mai 2020, 21:07:33 CEST schrieb Łukasz Stelmach: Hi Łukasz, > The value has been estimaded by obtainig 1024 chunks of data 128 bytes > (1024 bits) each from the generator and finding chunk with minimal > entropy using the ent(1) tool. The value was 6.327820 bits of entropy > in

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Stephan Mueller
Am Freitag, 8. Mai 2020, 14:26:41 CEST schrieb Alexander Dahl: Hi Alexander, > Hello, > > Am Freitag, 8. Mai 2020, 14:22:02 CEST schrieb Stephan Mueller: > > Am Freitag, 8. Mai 2020, 14:17:25 CEST schrieb Alexander Dahl: > > > Okay and DRBG has nothing to do with /dev/ra

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Stephan Mueller
Am Freitag, 8. Mai 2020, 14:17:25 CEST schrieb Alexander Dahl: Hi Alexander, > > > If so, then how is it supposed to be set up? > > > > It is intended for in-kernel purposes (namely to seed its DRBG). > > Okay and DRBG has nothing to do with /dev/random ? Nope, it is used as part of the kernel

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Stephan Mueller
Am Freitag, 8. Mai 2020, 13:40:08 CEST schrieb Alexander Dahl: Hi Alexander, > Hello, > > after upgrading OpenSSL to 1.1.1g on an armv5 based embedded target I had a > deeper look into entropy generation for that device and stumbled over the in > kernel 'jitterentropy_rng' module. > > As far as

Re: libkcapi tests are failing on kernels 5.5+

2020-05-05 Thread Stephan Mueller
Am Dienstag, 5. Mai 2020, 09:58:35 CEST schrieb Herbert Xu: Hi Herbert, > On Tue, Apr 21, 2020 at 10:08:14AM +0200, Ondrej Mosnáček wrote: > > Hi all, > > > > the libkcapi [1] tests are failing on kernels 5.5-rc1 and above [2]. > > All encryption/decryption tests that use 'ctr(aes)' and a messag

Re: [PATCH -next] crypto: drbg - fix error return code in drbg_alloc_state()

2020-04-30 Thread Stephan Mueller
ev) > + if (!drbg->prev) { > + ret = -ENOMEM; > goto fini; > + } > drbg->fips_primed = false; > } Thank you Reviewed-by: Stephan Mueller Ciao Stephan

Re: libkcapi tests are failing on kernels 5.5+

2020-04-28 Thread Stephan Mueller
Am Dienstag, 21. April 2020, 11:19:36 CEST schrieb Stephan Mueller: Hi Herbert, could you please help us with the answer to the question below? > Am Dienstag, 21. April 2020, 10:08:14 CEST schrieb Ondrej Mosnáček: > > Hi Ondrej, > > > Hi all, > > > > the lib

Re: EIP97 kernel failure with af_alg/libaio

2019-10-13 Thread Stephan Mueller
Am Sonntag, 13. Oktober 2019, 10:49:07 CEST schrieb Gleb Pomykalov: Hi Gleb, > Hello, > > I'm trying to make EIP97 work on Mediatek mtk7623n (Banana PI R2). The > kernel version is 4.14.145. My tests uses af_alg in libaio mode, and > encrypts the data. For smaller blocks it works just fine, but

Re: [PATCH] crypto: jitter - add header to fix buildwarnings

2019-10-09 Thread Stephan Mueller
_panic' was not > declared. Should it be static? crypto/jitterentropy-kcapi.c:79:6: warning: > symbol 'jent_memcpy' was not declared. Should it be static? > crypto/jitterentropy-kcapi.c:93:6: warning: symbol 'jent_get_nstime' was > not declared. Should it be static? > > Signed-off-by: Ben Dooks Reviewed-by: Stephan Mueller

Re: [PATCH 5.4 regression fix] x86/boot: Provide memzero_explicit

2019-10-07 Thread Stephan Mueller
Am Montag, 7. Oktober 2019, 11:06:04 CEST schrieb Hans de Goede: Hi Hans, > Hi Stephan, > > On 07-10-2019 10:59, Stephan Mueller wrote: > > Am Montag, 7. Oktober 2019, 10:55:01 CEST schrieb Hans de Goede: > > > > Hi Hans, > > > >> The purgatory co

Re: [PATCH 5.4 regression fix] x86/boot: Provide memzero_explicit

2019-10-07 Thread Stephan Mueller
Am Montag, 7. Oktober 2019, 10:55:01 CEST schrieb Hans de Goede: Hi Hans, > The purgatory code now uses the shared lib/crypto/sha256.c sha256 > implementation. This needs memzero_explicit, implement this. > > Reported-by: Arvind Sankar > Fixes: 906a4bb97f5d ("crypto: sha256 - Use get/put_unalig

Re: How to use nonce in DRBG functions.

2019-09-02 Thread Stephan Mueller
Am Sonntag, 1. September 2019, 20:52:24 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > I am trying to implement DRBG CAVS test harness function for Linux Kernel > crypto DRBG with the following requirements. 1. Derivate function is > enabled. > 2. predi

Re: [RFC/RFT PATCH] crypto: aes/xts - implement support for ciphertext stealing

2019-08-16 Thread Stephan Mueller
tests. > > Signed-off-by: Ard Biesheuvel Tested-by: Stephan Mueller Ciao Stephan

Re: XTS self test fail

2019-08-16 Thread Stephan Mueller
Am Freitag, 16. August 2019, 11:52:33 CEST schrieb Ard Biesheuvel: Hi Ard, > On Fri, 16 Aug 2019 at 12:50, Stephan Müller wrote: > > Hi, > > > > with the current cryptodev-2.6 code, I get the following with fips=1: > > > > [ 22.301826] alg: skcipher: xts-aes-aesni encryption failed on test >

Re: [RFC 3/3] crypto/sha256: Build the SHA256 core separately from the crypto module

2019-07-30 Thread Stephan Mueller
Am Dienstag, 30. Juli 2019, 14:38:35 CEST schrieb Hans de Goede: Hi Hans, > From: Andy Lutomirski > > This just moves code around -- no code changes in this patch. This > wil let BPF-based tracing link against the SHA256 core code without > depending on the crypto core. > > Cc: Ard Biesheuvel

Re: CAVS test implementation

2019-07-22 Thread Stephan Mueller
Am Montag, 22. Juli 2019, 20:07:05 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > We are in the process of implementing > KAT - known answer test > MMT - Multi-block Message Test > MCT - Monte Carlo Test > KAS FFC - Key Agreement Scheme, Finite F

Re: CAVS test harness

2019-07-12 Thread Stephan Mueller
Am Freitag, 12. Juli 2019, 19:55:07 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi Stephan, > > Thank you very much for the suggestions, I have another question, is it > possible to implement MMT and MCT using kernel crypto API's. Yes, for sure - I have successfully implemented

Re: CAVS test harness

2019-07-11 Thread Stephan Mueller
Am Donnerstag, 11. Juli 2019, 17:22:00 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi Stephan, > > Thank you very much for the reply. Yes we would need to write the test for > AEC (ECB,CBC,CTR) 128 and 256 bits, SHA-1, SHA-2 (256,384 and 512), HMAC, > DRBG and also for key deriv

Re: CAVS test harness

2019-07-11 Thread Stephan Mueller
Am Dienstag, 9. Juli 2019, 08:43:51 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > We are working on a product that requires NIAP certification and use IPSec > environment for certification. IPSec functionality is achieved by third > party IPsec library and native XFRM.

Re: CAVS test harness

2019-07-11 Thread Stephan Mueller
Am Dienstag, 9. Juli 2019, 13:34:21 CEST schrieb Gilad Ben-Yossef: Hi Gilad, > On Tue, Jul 9, 2019 at 9:44 AM Bhat, Jayalakshmi Manjunath > > wrote: > > Hi All, > > > > We are working on a product that requires NIAP certification and use IPSec > > environment for certification. IPSec functiona

Re: CAVS test harness

2019-07-11 Thread Stephan Mueller
Am Donnerstag, 11. Juli 2019, 13:52:29 CEST schrieb Stephan Mueller: Hi, > Am Dienstag, 9. Juli 2019, 08:43:51 CEST schrieb Bhat, Jayalakshmi > Manjunath: > > Hi Jayalakshmi, > > > Hi All, > > > > We are working on a product that requires NIAP certification

Re: Can an ahash driver be used through shash API?

2019-05-29 Thread Stephan Mueller
Am Mittwoch, 29. Mai 2019, 22:21:50 CEST schrieb Richard Weinberger: Hi Richard, > Stephan, > > - Ursprüngliche Mail - > > >> I've seen that it does actually work the other way around, since > >> crypto_init_shash_ops_async() in crypto/shash.c takes care of translating > >> calls from a

Re: Can an ahash driver be used through shash API?

2019-05-29 Thread Stephan Mueller
Am Mittwoch, 29. Mai 2019, 16:04:47 CEST schrieb David Gstir: Hi David, > Hi! > > I've done some testing with hardware acceleration of hash functions > and noticed that, when using the synchronous message digest API (shash), > some drivers are not usable. In my case the CAAM driver for SHA256. >

Re: [PATCH] crypto: xxhash - Implement xxhash support

2019-05-27 Thread Stephan Mueller
Am Dienstag, 28. Mai 2019, 07:58:19 CEST schrieb Nikolay Borisov: Hi Nikolay, > On 28.05.19 г. 7:58 ч., Stephan Mueller wrote: > > Please correct me if I am wrong, but as far as I see, however, xxhash > > seems to be a cryptographic hash function. > > No, xxhash is n

Re: [PATCH] crypto: xxhash - Implement xxhash support

2019-05-27 Thread Stephan Mueller
Am Montag, 27. Mai 2019, 21:15:51 CEST schrieb Eric Biggers: Hi Eric, > On Mon, May 27, 2019 at 05:06:53PM +0200, Stephan Mueller wrote: > > > obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o > > > CFLAGS_jitterentropy.o = -O0 > > > jitteren

Re: [PATCH] crypto: xxhash - Implement xxhash support

2019-05-27 Thread Stephan Mueller
Am Montag, 27. Mai 2019, 16:28:10 CEST schrieb Nikolay Borisov: Hi Nikolay, > xxhash is currently implemented as a self-contained module in /lib. > This patch enables that module to be used as part of the generic kernel > crypto framework. It adds a simple wrapper to the 64bit version. I've > als

Re: another testmgr question

2019-05-24 Thread Stephan Mueller
Am Freitag, 24. Mai 2019, 11:21:30 CEST schrieb Pascal Van Leeuwen: Hi Pascal, > I was not aware of that, so thanks for pointing that out. > Do they use the async calls (_aio) though? Because otherwise they shouldn't > end up being hardware accelerated anyway ... Yes, AIO is supported: http://ch

Re: [RFC PATCH 4/5] crypto: Adds user space interface for ALG_SET_KEY_TYPE

2019-05-24 Thread Stephan Mueller
ect custom hardware keys provided by hardware > (AES_SEL_HW_KEY)? I am not intimately familiary with the keyring facility. Thus, let us ask the experts at the keyring mailing list :-) > > Thanks > kalyani > > > -Original Message- > > From: Stepha

[PATCH v6] crypto: DRBG - add FIPS 140-2 CTRNG for noise source

2019-05-08 Thread Stephan Mueller
b3614763059b82c26bdd02ffcb1c016c1132aad0 . The Jitter RNG implements its own FIPS 140-2 self test and thus does not need to be subjected to the test in the DRBG. The patch contains a tiny fix to ensure proper zeroization in case of an error during the Jitter RNG data gathering. Signed-off-by: Stephan Mueller --- crypto

Re: [PATCH v5] crypto: DRBG - add FIPS 140-2 CTRNG for noise source

2019-05-07 Thread Stephan Mueller
Am Dienstag, 7. Mai 2019, 15:10:38 CEST schrieb Yann Droneaud: Hi Yann, > > + if (IS_ENABLED(CONFIG_CRYPTO_FIPS)) { > > if (!IS_ENABLED(CONFIG_CRYPTO_FIPS)) > return 0; Changed > > > + unsigned short entropylen = drbg_sec_strength(drbg->core- >flags); > > +

Re: [PATCH v5] crypto: DRBG - add FIPS 140-2 CTRNG for noise source

2019-05-07 Thread Stephan Mueller
Am Dienstag, 7. Mai 2019, 15:10:38 CEST schrieb Yann Droneaud: Hi Yann, > Hi, > > Le mardi 07 mai 2019 à 11:29 +0200, Stephan Müller a écrit : > > FIPS 140-2 section 4.9.2 requires a continuous self test of the noise > > source. Up to kernel 4.8 drivers/char/random.c provided this continuous > >

Re: [PATCH v3] crypto: DRBG - add FIPS 140-2 CTRNG for noise source

2019-05-02 Thread Stephan Mueller
Am Freitag, 3. Mai 2019, 03:42:41 CEST schrieb Herbert Xu: Hi Herbert, > On Thu, May 02, 2019 at 06:38:12PM +0200, Stephan Müller wrote: > > +static int drbg_fips_continuous_test(struct drbg_state *drbg, > > +const unsigned char *entropy) > > +{ > > +#if IS_ENABLED

Re: [PATCH] crypto: DRBG - add FIPS 140-2 CTRNG for noise source

2019-05-02 Thread Stephan Mueller
Am Donnerstag, 2. Mai 2019, 14:48:11 CEST schrieb Herbert Xu: Hi Herbert, > Hi Stephan: > > On Thu, May 02, 2019 at 02:40:51PM +0200, Stephan Müller wrote: > > +static int drbg_fips_continuous_test(struct drbg_state *drbg, > > +const unsigned char *entropy) > > +{

Re: [PATCH 10/24] crypto: ccree - Forbid 2-key 3DES in FIPS mode

2019-04-11 Thread Stephan Mueller
Am Donnerstag, 11. April 2019, 10:51:06 CEST schrieb Herbert Xu: Hi Herbert, > This patch forbids the use of 2-key 3DES (K1 == K3) in FIPS mode. > > Signed-off-by: Herbert Xu > --- > > drivers/crypto/ccree/cc_aead.c | 37 +++-- > 1 file changed, 35 insertions(

  1   2   3   4   5   6   7   8   9   10   >