Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Cc: tadeusz.struk@intel.com, linux-crypto@vger.kernel.org
Subject: Re: [RFC PATCH] crypto: RSA padding transform
Date: Sun, 06 Sep 2015 23:17:21 +0200	[thread overview]
Message-ID: <2234268.M7UZMy8YJa@tauon.atsec.com> (raw)
In-Reply-To: <CAOq732JmhBh7kqDH1mMhUz1MXz9zJSx1jaqdBMjgDVvtraSrrQ@mail.gmail.com>

Am Sonntag, 6. September 2015, 16:33:26 schrieb Andrzej Zaborowski:

Hi Andrzej,

>>> +     for (pos = 2; pos < child_req->dst_len; pos++)
>>> +             if (dst[pos] == 0x00)
>>> +                     break;
>> 
>> What happens if the padding has a 0x00 in its pseudo random data?
>
>The pseudo random bytes must all be non-zero for the padding to be
>unambiguous (RFC3447 iirc).  If there's a 0x00 in the first 8 bytes

I see, I did not know that detail. Now, you use prandom_u32_max to generate 
the padding in case of encryption/signing. I do not see any code that filters 
out any 0x00 that may be generated by this call. How would it prevented that 
this code does not generate 0x00?


Ciao
Stephan

  reply	other threads:[~2015-09-06 21:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-05 23:00 [RFC PATCH] crypto: RSA padding transform Andrew Zaborowski
2015-09-06  8:34 ` Stephan Mueller
2015-09-06 14:33   ` Andrzej Zaborowski
2015-09-06 21:17     ` Stephan Mueller [this message]
2015-09-07 14:42       ` Andrzej Zaborowski
2015-09-07 15:10         ` Stephan Mueller
2015-09-07 14:31     ` Tadeusz Struk
2015-09-07 17:54       ` Stephan Mueller
2015-09-08 16:09         ` Andrzej Zaborowski
2015-10-30  8:35           ` Marcel Holtmann
2015-09-08  1:07       ` Herbert Xu
2015-09-07 14:11   ` Tadeusz Struk
2015-09-07 15:07     ` Stephan Mueller
2015-09-07 14:06 ` Tadeusz Struk
2015-09-07 14:38   ` Andrzej Zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2234268.M7UZMy8YJa@tauon.atsec.com \
    --to=smueller@chronox.de \
    --cc=andrew.zaborowski@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=tadeusz.struk@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox