Replies: 2 comments 4 replies
-
wrong place |
Beta Was this translation helpful? Give feedback.
-
From markqvist/LXMF#24: Thanks for chiming in, but I think you have misunderstood the scope and purpose of this particular piece of code. The LXStamper module simply needs access to a fast entropy source to generate a stream of random values that can be hashed together with the stamp workblock to search for, and ultimately come up with, a valid stamp for the message. Closing, as this is not an issue, and the system is functioning as intended and designed. If you disagree, you are welcome to provide argumentation as to why os.urandom() is insufficient here. |
Beta Was this translation helpful? Give feedback.
-
os.urandom()
is used for generating random values for cryptographic purposes. While it is secure for most cases, the code does not specify or validate its use for cryptographic integrity.Use secrets Module for Secure Randomness. Python's secrets module is specifically designed for cryptographic operations and provides a straightforward, secure way to generate random values. Replace
os.urandom
withsecrets.token_bytes
or similar secure functions from the secrets module.https://github.com/markqvist/LXMF/blob/cec903a4dcc878f14f8cd8be6a9abc54868cbea6/LXMF/LXStamper.py#L108
Beta Was this translation helpful? Give feedback.
All reactions