3 l�_ �@spddlmZmZmZddlZddlZddlmZmZej ej �Gdd�de ��Z ej ej �Gdd�de ��Z dS)�)�absolute_import�division�print_functionN)�UnsupportedAlgorithm�_Reasonsc@s4eZdZedd��Zejdd��Zejdd��ZdS)�Ed448PublicKeycCs*ddlm}|j�s tdtj��|j|�S)Nr)�backendz2ed448 is not supported by this version of OpenSSL.)�,cryptography.hazmat.backends.openssl.backendr�ed448_supportedrr� UNSUPPORTED_PUBLIC_KEY_ALGORITHMZed448_load_public_bytes)�cls�datar�r�/usr/lib64/python3.6/ed448.py�from_public_bytess  z Ed448PublicKey.from_public_bytescCsdS)z9 The serialized bytes of the public key. Nr)�self�encoding�formatrrr� public_bytesszEd448PublicKey.public_bytescCsdS)z' Verify the signature. Nr)rZ signaturer rrr�verify"szEd448PublicKey.verifyN) �__name__� __module__� __qualname__� classmethodr�abc�abstractmethodrrrrrrrs rc@sNeZdZedd��Zedd��Zejdd��Zejdd��Z ejd d ��Z d S) �Ed448PrivateKeycCs(ddlm}|j�s tdtj��|j�S)Nr)rz2ed448 is not supported by this version of OpenSSL.)r rr rrr Zed448_generate_key)r rrrr�generate+s  zEd448PrivateKey.generatecCs*ddlm}|j�s tdtj��|j|�S)Nr)rz2ed448 is not supported by this version of OpenSSL.)r rr rrr Zed448_load_private_bytes)r r rrrr�from_private_bytes6s  z"Ed448PrivateKey.from_private_bytescCsdS)zB The Ed448PublicKey derived from the private key. Nr)rrrr� public_keyBszEd448PrivateKey.public_keycCsdS)z! Signs the data. Nr)rr rrr�signHszEd448PrivateKey.signcCsdS)z: The serialized bytes of the private key. Nr)rrrZencryption_algorithmrrr� private_bytesNszEd448PrivateKey.private_bytesN) rrrrrrrrrr r!rrrrr)s  r)Z __future__rrrrZsixZcryptography.exceptionsrrZ add_metaclass�ABCMeta�objectrrrrrr�s