Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1340080
| From | Tadeusz Struk <tadeusz.struk@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer |
| Date | 2016-02-23 00:40 +0100 |
| Message-ID | <r58f8-55M-5@gated-at.bofh.it> (permalink) |
| References | <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> |
| Organization | linux.* mail to news gateway |
On 02/22/2016 02:28 PM, David Howells wrote:
> Tadeusz Struk <tadeusz.struk@intel.com> wrote:
>
>> I wonder if this should be merged with the crypto/rsa-pkcs1pad.c template
>> that we already have. Looks like the two do the same padding now.
>> Should we merge then and pass the hash param as a separate template param,
>> e.g the public_key would allocate "pkcs1pad(rsa, sha1)"?
>
> Ummm... Possibly. Is that how it's used?
>
> warthog>git grep pkcs1pad -- Documentation
> warthog1>
Yes, no docs. Sorry.
>
> 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]);
Do you plan to add more padding schemes later?
>
> I guess if I have to, I can stoop to converting "rsa" to "pkcs1pad(rsa, sha1)".
>
> Can you do me a really quick merge? -rc5 is already out, and I want to get it
> to James pronto - plus I have things that are pending on this change being
> made.
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?
>
> Oh - and how does the padding template find the algorithm DER encoding string
> to use? I have wondered whether it should be stored in with the hash
> algorithm, but it probably makes more sense to keep it with the rsa module.
We can put everything into the crypto/rsa-pkcs1pad.c
This is where all the padding logic should be, I think.
Thanks,
--
TS
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] X.509: Software public key subtype changes David Howells <dhowells@redhat.com> - 2016-02-19 18:20 +0100
[PATCH 6/8] X.509: Make the public_key asymmetric key type internal data private David Howells <dhowells@redhat.com> - 2016-02-19 18:20 +0100
[PATCH 1/8] crypto: KEYS: convert public key and digsig asym to the akcipher api David Howells <dhowells@redhat.com> - 2016-02-19 18:20 +0100
[PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer David Howells <dhowells@redhat.com> - 2016-02-19 18:30 +0100
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer Tadeusz Struk <tadeusz.struk@intel.com> - 2016-02-22 21:10 +0100
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer David Howells <dhowells@redhat.com> - 2016-02-22 23:30 +0100
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
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer Andrew Zaborowski <balrogg@googlemail.com> - 2016-02-23 01:10 +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
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer Andrew Zaborowski <balrogg@googlemail.com> - 2016-02-23 12:30 +0100
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer David Howells <dhowells@redhat.com> - 2016-02-26 12:50 +0100
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer Mimi Zohar <zohar@linux.vnet.ibm.com> - 2016-02-24 06:10 +0100
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer Mimi Zohar <zohar@linux.vnet.ibm.com> - 2016-02-24 07:10 +0100
Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer David Howells <dhowells@redhat.com> - 2016-02-29 16:40 +0100
[PATCH 7/8] X.509: Rename public_key.c to software_pkey.c David Howells <dhowells@redhat.com> - 2016-02-19 18:30 +0100
[PATCH 5/8] X.509: Make algo identifiers text instead of enum David Howells <dhowells@redhat.com> - 2016-02-19 18:30 +0100
[PATCH 8/8] X.509: Rename public_key* to software_pkey* David Howells <dhowells@redhat.com> - 2016-02-19 18:30 +0100
Re: [PATCH 0/8] X.509: Software public key subtype changes Mimi Zohar <zohar@linux.vnet.ibm.com> - 2016-02-22 20:00 +0100
Re: [PATCH 0/8] X.509: Software public key subtype changes David Howells <dhowells@redhat.com> - 2016-02-22 23:30 +0100
Re: [PATCH 0/8] X.509: Software public key subtype changes Mimi Zohar <zohar@linux.vnet.ibm.com> - 2016-02-23 01:10 +0100
Re: [PATCH 0/8] X.509: Software public key subtype changes David Howells <dhowells@redhat.com> - 2016-02-23 11:20 +0100
Re: [PATCH 0/8] X.509: Software public key subtype changes Mimi Zohar <zohar@linux.vnet.ibm.com> - 2016-02-23 13:30 +0100
Re: [PATCH 0/8] X.509: Software public key subtype changes Tadeusz Struk <tadeusz.struk@intel.com> - 2016-02-22 21:10 +0100
csiph-web