[pycrypto] documentation for PKCS1_PSS.py is incorrect, plus minor issue w/ _slowmath.py
Legrandin
gooksankoo at hoiptorrow.mailexpire.com
Fri May 25 01:11:48 EDT 2012
Mind that the commit makes now the example line be:
>>> signature = signer.sign(key)
Whereas it should really be:
>>>> signature = signer.sign(h)
Because we sign the hash (not the key :-)).
>> https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/Signature/PKCS1_PSS.py
>>
>> In the file on lines 41 & 42 it has:
>>>>>
>>>>> signer = PKCS1_PSS.new(key)
>>>>> signature = PKCS1_PSS.sign(key)
>>
>>
>> The second line is incorrect. It should be:
>>>>>
>>>>> signature = signer.sign(h)
>
>
> I've committed a fix. Thanks!
More information about the pycrypto
mailing list