Bug in gcry_mpi_set_flag plus feature request
wk at gnupg.org
Thu Apr 9 19:24:20 CEST 2009
On Thu, 9 Apr 2009 18:31, bpgcrypt at itaparica.org said:
> The third part does the same with the number "0000". When flagging the
> mpi as to be stored in secure memory an assertion is triggered. Why that?
Good catch. This is likely because we try not allocate any limbs for a
number with the value 0. To set something to secure we do this on the
memory for the limb data and the assert checks that there is any data
allocated. Sure, the assert is wrong. I'll fix that next week.
> And here is my feature request: according to the documentation there is no
> possibility to scan a hexadecimal encoded number directly to secure memory.
> Of course the code presented above contains a race condition: if the
Well, I can change that. The hex data scanning was initially only used
for testing and is based on some very old code. I'll look into this.
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gcrypt-devel