[PATCH v2 2/2] crypt32: Add support for importing RSA public keys with BCrypt.

Dmitry Timoshkov dmitry at baikal.ru
Mon Apr 12 06:27:37 CDT 2021


Hans Leidekker <hans at codeweavers.com> wrote:

> On Mon, 2021-04-12 at 12:48 +0300, Dmitry Timoshkov wrote:
> > v2:
> > - Fixed calculation of cbPublicExp and cbModulus.
> > - pass PublicExp in BE format to follow MSDN.
> 
> Should the modulus also be converted to BE format?

I'm not sure, though MSDN claims that the modulus provided by PUBLICKEYBLOB is
also in LE format:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-mqqb/ade9efde-3ec8-4e47-9ae9-34b64d8081bb

I'd guess that gnutls verifies the modulus during the key creation.
If the modulus also should be converted, taking into account that its
length is variable, how would you propose to handle the conversion?

-- 
Dmitry.



More information about the wine-devel mailing list