Legrandin / pycryptodome

A self-contained cryptographic library for Python
https://www.pycryptodome.org
Other
2.74k stars 492 forks source link

errors in documentation #803

Closed sofoxe1 closed 2 weeks ago

sofoxe1 commented 3 months ago

https://www.pycryptodome.org/src/protocol/dh

second code block:

missing from Crypto.PublicKey import ECC from functools import partial is not used TupleHash128 is used despite not being listed under "The kdf parameter must be a cryptographically secure key derivation function, not password-based. For instance, some reasonable choices are:"

third code block:

code generates ephemeral keys with names "U_ephemeral" and "V__ephemeral" but "U_priv" and "U_pub" are used in key_agreement

fourth code block:

typo from Crypto.Protocol.KDF import HDKF instead of from Crypto.Protocol.KDF import HKDF kdf = functools.partial(HDK, - triple "o" and "HDK" instead of "HKDF"

different hash functions (SHAKE128,,SHA256,TupleHash128) are used for kdf across entire page

i have no idea about cryptography so i won't make a pull request

Legrandin commented 2 weeks ago

Thanks, fixed with 06d0bd2484ace60eb12865a836cfcc2764453365