o
    )%a	                     @   sP   d dl Z d dlmZmZ d dlmZ G dd de jdZG dd de jdZdS )	    N)UnsupportedAlgorithm_Reasons)_serializationc                   @   s:   e Zd Zed	ddZejdejdej	de
fddZdS )
X448PublicKeyreturnc                 C   *   ddl m} | stdtj||S Nr   )backendz1X448 is not supported by this version of OpenSSL.),cryptography.hazmat.backends.openssl.backendr	   x448_supportedr   r   UNSUPPORTED_EXCHANGE_ALGORITHMx448_load_public_bytesclsdatar	    r   P/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/asymmetric/x448.pyfrom_public_bytes      
zX448PublicKey.from_public_bytesencodingformatc                 C      dS z9
        The serialized bytes of the public key.
        Nr   )selfr   r   r   r   r   public_bytes       zX448PublicKey.public_bytesN)r   r   )__name__
__module____qualname__classmethodr   abcabstractmethodr   EncodingPublicFormatbytesr   r   r   r   r   r      s    r   )	metaclassc                	   @   s   e Zd ZedddZededd fddZejde	fddZ
ejd	ejd
ejdejdefddZejde	defddZdS )X448PrivateKeyr   c                 C   s(   ddl m} | stdtj| S r   )r
   r	   r   r   r   r   x448_generate_key)r   r	   r   r   r   generate%   s   zX448PrivateKey.generater   c                 C   r   r   )r
   r	   r   r   r   r   x448_load_private_bytesr   r   r   r   from_private_bytes0   r   z!X448PrivateKey.from_private_bytesc                 C   r   r   r   )r   r   r   r   
public_key<   r   zX448PrivateKey.public_keyr   r   encryption_algorithmc                 C   r   )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r,   r   r   r   private_bytesB   r   zX448PrivateKey.private_bytespeer_public_keyc                 C   r   )zY
        Performs a key exchange operation using the provided peer's public key.
        Nr   )r   r.   r   r   r   exchangeM   r   zX448PrivateKey.exchangeN)r   r&   )r   r   r   r   r(   r$   r*   r    r!   r   r+   r   r"   PrivateFormatKeySerializationEncryptionr-   r/   r   r   r   r   r&   $   s&    

r&   )	r    cryptography.exceptionsr   r   cryptography.hazmat.primitivesr   ABCMetar   r&   r   r   r   r   <module>   s
   