GnuPG modern can't genereate keys on my Windows

Dongsheng Song dongsheng.song at gmail.com
Sun Sep 6 10:11:43 CEST 2015


On 2015-09-05 17:40, Werner Koch wrote:
> On Sat,  5 Sep 2015 04:23, dongsheng.song at gmail.com said:
>
>> It's really works, you can check my building results:
> No, it can't work:
>
>  - The random number generator may not produce random output.

Why not trust Windows CryptoAPI (CryptGenRandom) like libressl ?

https://github.com/libressl-portable/openbsd/blob/master/src/lib/libcrypto/crypto/getentropy_win.c

If you do not trust CryptoAPI (CryptGenRandom), you can use CNG
(BCryptGenRandom) instead.

CryptGenRandom  [Windows XP/2003 or later]
BCryptGenRandom [Windows Vista/2008 or later] [Cryptography API: Next
Generation
<https://msdn.microsoft.com/en-us/library/windows/desktop/aa376210%28v=vs.85%29.aspx>]


https://msdn.microsoft.com/en-us/library/windows/desktop/aa379942(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375458(v=vs.85).aspx

>  - GnuPG casts pointers to integers which does not work on 64 bit
>    Windows where a pointer (and thus a HANDLE) is 64 bit but int and
>    long are 32 bit.
>
>  - There are related problems related to different kind of file
>    decriptors.

In theory, you are right. But ALL Windows kernel object include HANDLE
lower than 2^24.
Then if these cast is safe for 64 bit Linux, then safe for Windows too.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724485(v=vs.85).aspx

>
>> http://sourceforge.net/projects/osb/files/package/portable/gnupg/
>  1. Please add the full source code to the download section or
>     otherwise fulfill the requirements of the GPL.
>
>  2. In the summary page you state that the license is CC BY-SA.
>     However, both GCC and GnuPG are under the GPL.  You need to fix
>     that!
>

Thanks, fixed.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20150906/651baa1e/attachment.sig>


More information about the Gnupg-users mailing list