- cipher/rsa.c (secret_core_crt): Blind secret D with randomized
nonce R for mpi_powm computation.
Backport of libgcrypt 8725c99ffa41778f382ca97233183bcd687bb0ce.
Signed-off-by: Marcus Brinkmann <mb@g10code.com>
Differential D438
rsa: Add exponent blinding. marcus on Jul 5 2017, 7:21 PM. Authored by Tags None Subscribers None
Details
nonce R for mpi_powm computation. Backport of libgcrypt 8725c99ffa41778f382ca97233183bcd687bb0ce. Signed-off-by: Marcus Brinkmann <mb@g10code.com> I ran "make check" and all tests passed.
Diff Detail
Event TimelineComment Actions We don't like to add this to 1.4. blinding requires random and more secure memory. Thus gpg may run out of secure memory and won't be able to do its j Comment Actions The problem I see is two-fold:
Comment Actions Comments (and complaints to academic paper :-) were at jabber, yesterday. My point is that their claims are for their community to be accepted as a good paper, I have my own view. I think that we should port all of related changes to gpg1.4, and possibly improve libgcrypt more. (1) Apply reducing signal fixes in libgcrypt (of mpi_powm).
I mean, we can release the memory of H and RR before calling mpi_powm, if matters. Comment Actions For your reference, this is the BSI document URL: https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Zertifizierung/Interpretationen/AIS_46_BSI_guidelines_SCA_RSA_V1_0_e_pdf.html Comment Actions (1) is done in rG12029f83fd0a: mpi: Same computation for square and multiply for mpi_pow.. Comment Actions
I can agree to that reasoning. This is easier that to write lots of mails explaining that we still care about 1.4. Comment Actions OK, I'm going to apply this patch to gpg1.4 and then, to modify a bit to lower the secmem pressure. Comment Actions Applied as rG8fd9f72e1b2e: rsa: Add exponent blinding.. |