aiocoap.util.cryptography_additions module¶
Workaround for https://github.com/pyca/cryptography/issues/5557
These functions could be methods to cryptography.hazmat.primitives.asymmetric.ed25519.{Ed25519PrivateKey, Ed25519PublicKey}, respectively, and are currently implemented manually or using ge25519.
These conversions are not too critical in that they do not run on data an attacker can send arbitrarily (in the most dynamic situation, the keys are distributed through a KDC aka. group manager).
-
aiocoap.util.cryptography_additions.
sk_to_curve25519
(ed: cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey) → cryptography.hazmat.primitives.asymmetric.x25519.X25519PrivateKey¶
-
aiocoap.util.cryptography_additions.
pk_to_curve25519
(ed: cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey) → cryptography.hazmat.primitives.asymmetric.x25519.X25519PublicKey¶