3.0.ipv8.keyvault.private.m2crypto ================================== .. py:module:: 3.0.ipv8.keyvault.private.m2crypto Classes ------- .. autoapisummary:: 3.0.ipv8.keyvault.private.m2crypto.M2CryptoSK Module Contents --------------- .. py:class:: M2CryptoSK(curve: cryptography.hazmat.primitives.asymmetric.ec.EllipticCurve | None = None, keystring: bytes | None = None, filename: str | None = None) Bases: :py:obj:`3.0.ipv8.keyvault.keys.PrivateKey`, :py:obj:`3.0.ipv8.keyvault.public.m2crypto.M2CryptoPK` A pyca implementation of a secret key, backwards compatible with Dispersy M2Crypto secret keys. .. py:method:: pub() -> 3.0.ipv8.keyvault.public.m2crypto.M2CryptoPK Get the public key for this secret key. .. py:method:: has_secret_key() -> bool Is this is a secret key (yes it is)? .. py:method:: key_to_pem() -> bytes Convert a key to the PEM format. .. py:method:: key_from_pem(pem: bytes) -> cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey Load a key from a pem certificate. :param pem: the PEM formatted private key .. py:method:: signature(msg: bytes) -> bytes Create a signature for a message in a backwards compatible fashion. :param msg: the message to sign