o -&%a @sPddlZddlmZmZddlmZGdddejdZGdddejdZdS) N)UnsupportedAlgorithm_Reasons)_serializationc@sBeZdZededdfddZejdej dej defddZ d S) X25519PublicKeydatareturncC*ddlm}|stdtj||SNr)backendz3X25519 is not supported by this version of OpenSSL.),cryptography.hazmat.backends.openssl.backendr x25519_supportedrrUNSUPPORTED_EXCHANGE_ALGORITHMx25519_load_public_bytesclsrr rR/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/asymmetric/x25519.pyfrom_public_bytes   z!X25519PublicKey.from_public_bytesencodingformatcCdSz9 The serialized bytes of the public key. Nr)selfrrrrr public_byteszX25519PublicKey.public_bytesN) __name__ __module__ __qualname__ classmethodbytesrabcabstractmethodrEncoding PublicFormatrrrrrr s r) metaclassc @seZdZedddZededdfddZejde fddZ ejd e j d e j d e jdefd d Zejde defddZdS)X25519PrivateKeyrcCs(ddlm}|stdtj|Sr )r r r rrr x25519_generate_key)rr rrrgenerate%s zX25519PrivateKey.generatercCrr )r r r rrr x25519_load_private_bytesrrrrfrom_private_bytes0rz#X25519PrivateKey.from_private_bytescCrrr)rrrr public_key<rzX25519PrivateKey.public_keyrrencryption_algorithmcCr)z: The serialized bytes of the private key. Nr)rrrr,rrr private_bytesBrzX25519PrivateKey.private_bytespeer_public_keycCr)zY Performs a key exchange operation using the provided peer's public key. Nr)rr.rrrexchangeMrzX25519PrivateKey.exchangeN)rr&)rrrrr(r r*r!r"rr+rr# PrivateFormatKeySerializationEncryptionr-r/rrrrr&$s&     r&) r!cryptography.exceptionsrrcryptography.hazmat.primitivesrABCMetarr&rrrrs