Skip to content

Commit 291400c

Browse files
committed
Stress that passwords should not be used as PSK
1 parent 3d378b7 commit 291400c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Crypto/Protocol/HPKE.py

+5
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,11 @@ def new(*, receiver_key: EccKey,
429429
byte strings: the identifier and the actual secret value.
430430
Sender and receiver must use the same PSK (or none).
431431
432+
The secret value must be at least 32 bytes long,
433+
but it must not be a low-entropy password
434+
(use a KDF like PBKDF2 or scrypt to derive a secret
435+
from a password).
436+
432437
info:
433438
A non-secret parameter that contributes
434439
to the generation of all session keys.

0 commit comments

Comments
 (0)