Re: RSA/MPI handling issues and keyctl access to public key keyrings

2016-05-09 Thread Tadeusz Struk
Hi David, On 05/09/2016 02:13 AM, David Howells wrote: > Hi Tadeusz, Andrzej, > > If you look here: > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git > > you will see a branch labelled 'pkey'. This, so far, provides query support > through keyctl: > > [root@

[PATCH v2] Bluetooth: convert smp and selftest to crypto kpp API

2016-05-09 Thread Salvatore Benedetto
* Convert both smp and selftest to crypto kpp API * Remove module ecc as not more required * Add ecdh_helper functions for wrapping kpp async calls This patch has been tested *only* with selftest, which is called on module loading. smp-tester passes all tests but the first one, which often time

[PATCH v5 3/3] crypto: kpp - Add ECDH software support

2016-05-09 Thread Salvatore Benedetto
* Implement ECDH under kpp API * Provide ECC software support for curve P-192 and P-256. * Add kpp test for ECDH with data generated by OpenSSL Signed-off-by: Salvatore Benedetto --- crypto/Kconfig |5 + crypto/Makefile |3 + crypto/ecc.c| 1016

[PATCH v5 1/3] crypto: Key-agreement Protocol Primitives API (KPP)

2016-05-09 Thread Salvatore Benedetto
Add key-agreement protocol primitives (kpp) API which allows to implement primitives required by protocols such as DH and ECDH. The API is composed mainly by the following functions * set_params() - It allows the user to set the parameters known to both parties involved in the key-agreement ses

[PATCH v5 2/3] crypto: kpp - Add DH software implementation

2016-05-09 Thread Salvatore Benedetto
* Implement MPI based Diffie-Hellman under kpp API * Test provided uses data generad by OpenSSL Signed-off-by: Salvatore Benedetto --- crypto/Kconfig | 8 ++ crypto/Makefile | 2 + crypto/dh.c | 224 crypto/testmgr.c

[PATCH v5 0/3] Key-agreement Protocol Primitives (KPP) API

2016-05-09 Thread Salvatore Benedetto
Hi Herb, the following patchset introduces a new API for abstracting key-agreement protocols such as DH and ECDH. It provides the primitives required for implementing the protocol, thus the name KPP (Key-agreement Protocol Primitives). Regards, Salvatore Changes from v4: * If fips_enabled is se

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Tadeusz Struk
On 05/09/2016 12:24 PM, Stephan Mueller wrote: > Am Montag, 9. Mai 2016, 12:17:21 schrieb Tadeusz Struk: > > Hi Tadeusz, > >> On 05/09/2016 12:02 PM, Stephan Mueller wrote: >>> One followup: is the final memcmp() between the decrypted hash and the >>> hash of the message implemented in the RSA ve

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Stephan Mueller
Am Montag, 9. Mai 2016, 12:17:21 schrieb Tadeusz Struk: Hi Tadeusz, > On 05/09/2016 12:02 PM, Stephan Mueller wrote: > > One followup: is the final memcmp() between the decrypted hash and the > > hash of the message implemented in the RSA verify code path? At least I > > do not see it right away.

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Tadeusz Struk
On 05/09/2016 12:02 PM, Stephan Mueller wrote: > One followup: is the final memcmp() between the decrypted hash and the hash > of > the message implemented in the RSA verify code path? At least I do not see it > right away. It's in line #549 -- TS -- To unsubscribe from this list: send the lin

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Tadeusz Struk
On 05/09/2016 11:50 AM, Stephan Mueller wrote: > I think I see my error: pkcs1pad(rsa,HASH) -- I missed the hash part that > activates the decoding. Thank you for the pointer. > > Once I completed my testing, I think I need to beef up the documentation a > bit. Right, this can work in two modes

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Stephan Mueller
Am Montag, 9. Mai 2016, 11:55:58 schrieb Tadeusz Struk: Hi Tadeusz, > On 05/09/2016 11:50 AM, Stephan Mueller wrote: > > I think I see my error: pkcs1pad(rsa,HASH) -- I missed the hash part that > > activates the decoding. Thank you for the pointer. > > > > Once I completed my testing, I think I

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Stephan Mueller
Am Montag, 9. Mai 2016, 11:15:04 schrieb Tadeusz Struk: Hi Tadeusz, > Hi Strphan, > > On 05/09/2016 03:24 AM, Stephan Mueller wrote: > > Hi, > > > > I am experimenting with pkcs1pad(rsa-generic) signature verify. The > > following numbers shall serve as examples -- using other valid > > signatu

Re: pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Tadeusz Struk
Hi Strphan, On 05/09/2016 03:24 AM, Stephan Mueller wrote: > Hi, > > I am experimenting with pkcs1pad(rsa-generic) signature verify. The following > numbers shall serve as examples -- using other valid signatures, similar > results are visible. > > All signatures are correct. > > The result of

Re: [PATCH] crypto: caam: add backlogging support

2016-05-09 Thread Horia Ioan Geanta Neag
On 5/6/2016 4:19 PM, Catalin Vasile wrote: > caam_jr_enqueue() function returns -EBUSY once there are no more slots > available in the JR, but it doesn't actually save the current request. > This breaks the functionality of users that expect that even if there is > no more space for the request, it

pkcs1pad_verify_complete: decoding missing?

2016-05-09 Thread Stephan Mueller
Hi, I am experimenting with pkcs1pad(rsa-generic) signature verify. The following numbers shall serve as examples -- using other valid signatures, similar results are visible. All signatures are correct. The result of the signature verify operation is the following byte stream: 3021300906052b

Re: [PATCH v2 8/8] arm64: dts: ls1043a: add crypto node

2016-05-09 Thread Horia Ioan Geanta Neag
+Shawn On 5/5/2016 6:39 PM, Horia Geantă wrote: > LS1043A has a SEC v5.4 security engine. > For now don't add rtic or sec_mon subnodes, since these features > haven't been tested yet. > > Signed-off-by: Horia Geantă Shawn, IIUC, you are the de facto maintainer of arch/arm64/boot/dts/freescale

Re: [PATCH v2 4/8] powerpc: add io{read,write}64 accessors

2016-05-09 Thread Horia Ioan Geanta Neag
On 5/5/2016 6:37 PM, Horia Geantă wrote: > This will allow device drivers to consistently use io{read,write}XX > also for 64-bit accesses. > > Signed-off-by: Horia Geantă It would be great if PPC maintainers could Ack this patch. As stated in the cover letter: https://lkml.org/lkml/2016/5/5/340