o
    cW
                     @   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edd fddZejdej	dej
defddZejd	ededd
fddZd
S )Ed448PublicKeydatareturnc                 C   *   ddl m} | stdtj||S Nr   )backendz2ed448 is not supported by this version of OpenSSL.),cryptography.hazmat.backends.openssl.backendr
   ed448_supportedr   r    UNSUPPORTED_PUBLIC_KEY_ALGORITHMZed448_load_public_bytesclsr   r
    r   Susr/lib/python3.10/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.pyfrom_public_bytes      
z Ed448PublicKey.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Ed448PublicKey.public_bytes	signatureNc                 C   r   )z'
        Verify the signature.
        Nr   )r   r   r   r   r   r   verify#   r   zEd448PublicKey.verify)__name__
__module____qualname__classmethodbytesr   abcabstractmethodr   EncodingZPublicFormatr   r   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defd	d
ZejdejdejdejdefddZdS )Ed448PrivateKeyr   c                 C   s(   ddl m} | stdtj| S r	   )r   r
   r   r   r   r   Zed448_generate_key)r   r
   r   r   r   generate+   s   zEd448PrivateKey.generater   c                 C   r   r	   )r   r
   r   r   r   r   Zed448_load_private_bytesr   r   r   r   from_private_bytes6   r   z"Ed448PrivateKey.from_private_bytesc                 C   r   )zB
        The Ed448PublicKey derived from the private key.
        Nr   )r   r   r   r   
public_keyB   r   zEd448PrivateKey.public_keyc                 C   r   )z!
        Signs the data.
        Nr   )r   r   r   r   r   signH   r   zEd448PrivateKey.signr   r   encryption_algorithmc                 C   r   )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r*   r   r   r   private_bytesN   r   zEd448PrivateKey.private_bytesN)r   r%   )r   r   r   r   r&   r    r'   r!   r"   r   r(   r)   r   r#   ZPrivateFormatZKeySerializationEncryptionr+   r   r   r   r   r%   *   s&    
r%   )	r!   Zcryptography.exceptionsr   r   Zcryptography.hazmat.primitivesr   ABCMetar   r%   r   r   r   r   <module>   s
   