Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340541

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer
Date 2016-02-23 12:00 +0100
Message-ID <r5iRe-45N-41@gated-at.bofh.it> (permalink)
References (1 earlier) <r54XU-2FL-11@gated-at.bofh.it> <r3WSK-8qu-5@gated-at.bofh.it> <r3X2q-8uR-1@gated-at.bofh.it> <r579o-4ce-13@gated-at.bofh.it> <r58f8-55M-5@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


Tadeusz Struk <tadeusz.struk@intel.com> wrote:

> > Ummm...  Possibly.  Is that how it's used?
> > 
> > 	warthog>git grep pkcs1pad -- Documentation
> > 	warthog1>
> 
> Yes, no docs. Sorry.

Can I suggest you at least stick a quick usage summary in the banner comment
at the top of the file?

> > Anyway, the problem I have with this is that I want to get that knowledge
> > out of the asymmetric key in-software public key subtype.  It knows "rsa",
> > "dsa", "ecdsa", ... because that's all the OIDs tell it.
> 
> Rigth, for now the public_key would need to build the full algorithm string as
> follows:
> 
> vsprintf(name, "pkcs1pad(%s, %s)", pkey_algo_name[sig->pkey_algo],
>          hash_algo_name[sig->pkey_hash_algo]);

Does this apply to anything other than RSA?

> Do you plan to add more padding schemes later? 

No plans to, but one never knows.  I'm *assuming* that OID_rsaEncryption and
OID_sha256WithRSAEncryption, for example, must implicitly specify the padding
scheme (RFC4055 suggests I'm right in this assumption).

We might have to suppose RSASSA-SSP at some point.

> Yes, I can start woring on a subsequent patch based on your changes in
> http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-rsa
> Is that ok with you?

Sure.

David

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto  layer Tadeusz Struk <tadeusz.struk@intel.com> - 2016-02-23 00:40 +0100
  Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer David Howells <dhowells@redhat.com> - 2016-02-23 12:00 +0100
    [PATCH 0/2] KEYS: Use pkcs1pad for padding in software_pkey Tadeusz Struk <tadeusz.struk@intel.com> - 2016-02-24 18:20 +0100
      Re: [PATCH 0/2] KEYS: Use pkcs1pad for padding in software_pkey David Howells <dhowells@redhat.com> - 2016-02-24 18:30 +0100

csiph-web