Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-27 Thread Herbert Xu
On Mon, Jun 27, 2016 at 03:27:13PM +0100, David Howells wrote: > > I have some patches I need to finish revamping. I had it kind of working > (though with a slightly different user interface) - then TPMv2 support was > added to the TPM driver before I finished and I need to redo the patches. In

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-27 Thread Herbert Xu
On Mon, Jun 27, 2016 at 03:27:13PM +0100, David Howells wrote: > > I have some patches I need to finish revamping. I had it kind of working > (though with a slightly different user interface) - then TPMv2 support was > added to the TPM driver before I finished and I need to redo the patches. In

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-27 Thread David Howells
Herbert Xu wrote: > > The problem is that if I'm to produce consistency with, say, the TPM > > interface, then I have to deal in wrapped/padded data - leastways as far > > as I can tell from reading the docs. > > So the TPM device is accessed through the same

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-27 Thread David Howells
Herbert Xu wrote: > > The problem is that if I'm to produce consistency with, say, the TPM > > interface, then I have to deal in wrapped/padded data - leastways as far > > as I can tell from reading the docs. > > So the TPM device is accessed through the same interface? Where is > the code for

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-24 Thread Herbert Xu
On Fri, Jun 24, 2016 at 01:06:02PM +0100, David Howells wrote: > > The problem is that if I'm to produce consistency with, say, the TPM > interface, then I have to deal in wrapped/padded data - leastways as far as I > can tell from reading the docs. So the TPM device is accessed through the same

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-24 Thread Herbert Xu
On Fri, Jun 24, 2016 at 01:06:02PM +0100, David Howells wrote: > > The problem is that if I'm to produce consistency with, say, the TPM > interface, then I have to deal in wrapped/padded data - leastways as far as I > can tell from reading the docs. So the TPM device is accessed through the same

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-24 Thread David Howells
Herbert Xu wrote: > IOW exporting the raw RSA might make sense because the key may > not be visible to user-space, or that the RSA might be implemented > in hardware offload, but there is no sane reason to export pkcs1pad. The problem is that if I'm to produce

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-24 Thread David Howells
Herbert Xu wrote: > IOW exporting the raw RSA might make sense because the key may > not be visible to user-space, or that the RSA might be implemented > in hardware offload, but there is no sane reason to export pkcs1pad. The problem is that if I'm to produce consistency with, say, the TPM

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-24 Thread Herbert Xu
Mat Martineau wrote: > >> + if (strcmp(encoding, "pkcs1") == 0) { >> + /* The data wangled by the RSA algorithm is typically padded >> + * and encoded in some manner, such as EMSA-PKCS1-1_5 [RFC3447 >> + * sec 8.2]. >>

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-24 Thread Herbert Xu
Mat Martineau wrote: > >> + if (strcmp(encoding, "pkcs1") == 0) { >> + /* The data wangled by the RSA algorithm is typically padded >> + * and encoded in some manner, such as EMSA-PKCS1-1_5 [RFC3447 >> + * sec 8.2]. >> + */ >> +

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-23 Thread Mat Martineau
David, On Thu, 23 Jun 2016, David Howells wrote: Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells ---

Re: [PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-23 Thread Mat Martineau
David, On Thu, 23 Jun 2016, David Howells wrote: Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells ---

[PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-23 Thread David Howells
Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c | 96

[PATCH 5/8] KEYS: Provide software public key query function [ver #2]

2016-06-23 Thread David Howells
Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c | 96 ++- 1