PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/dns/dnssecalgs/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/dns/dnssecalgs/__pycache__/eddsa.cpython-312.pyc

�

���g�����ddlmZddlmZddlmZmZddlmZm	Z	ddl
mZddlm
Z
Gd�de	�ZGd	�d
e�ZGd�de�ZGd
�de�ZGd�de�ZGd�de�Zy)�)�Type)�
serialization)�ed448�ed25519)�CryptographyPrivateKey�CryptographyPublicKey)�	Algorithm)�DNSKEYc�F�eZdZdededdfd�Zdefd�Zededdfd��Zy)	�PublicEDDSA�	signature�data�returnNc�<�|jj||�y)N)�key�verify)�selfr
rs   �C/opt/hc_python/lib/python3.12/site-packages/dns/dnssecalgs/eddsa.pyrzPublicEDDSA.verifys�������	�4�(�c��|jjtjjtj
j��S)z,Encode a public key per RFC 8080, section 3.)�encoding�format)r�public_bytesr�Encoding�Raw�PublicFormat)rs r�encode_key_byteszPublicEDDSA.encode_key_bytess;���x�x�$�$�"�+�+�/�/�
�8R�8R�8V�8V�%�
�	
rrc�|�|j|�||jj|j���S�N)r)�!_ensure_algorithm_key_combination�key_cls�from_public_bytesr)�clsrs  r�from_dnskeyzPublicEDDSA.from_dnskeys3���-�-�c�2�����-�-�c�g�g�6�
�	
r)	�__name__�
__module__�__qualname__�bytesrr�classmethodr
r$�rrrrsJ��)��)�U�)�t�)�
�%�
��
�f�
��
��
rrc	�N�eZdZUeeed<		d	dedededefd�Ze	d
d��Z
y)�PrivateEDDSA�
public_clsrr�
deterministicrc��|jj|�}|r |j�j||�|S)z1Sign using a private key per RFC 8080, section 4.)r�sign�
public_keyr)rrrr.r
s     rr0zPrivateEDDSA.sign s6���H�H�M�M�$�'�	���O�O��$�$�Y��5��rc�D�||jj���Sr)r!�generate)r#s rr3zPrivateEDDSA.generate,s���s�{�{�+�+�-�.�.rN)FT)rr,)r%r&r'rr�__annotations__r(�boolr0r)r3r*rrr,r,sT���[�!�!�
�"�	
��
��
��	
�

�
��/��/rr,c�\�eZdZUejed<ejZejZ	y)�
PublicED25519rN)
r%r&r'r�Ed25519PublicKeyr4r!r	�ED25519�	algorithmr*rrr7r71s$��	�	!�	!�!��&�&�G��!�!�Irr7c�H�eZdZUejed<ejZeZy)�PrivateED25519rN)	r%r&r'r�Ed25519PrivateKeyr4r!r7r-r*rrr<r<7s��	�	"�	"�"��'�'�G��Jrr<c�\�eZdZUejed<ejZejZ	y)�PublicED448rN)
r%r&r'r�Ed448PublicKeyr4r!r	�ED448r:r*rrr?r?=s"��	�	�	���"�"�G����Irr?c�H�eZdZUejed<ejZeZy)�PrivateED448rN)	r%r&r'r�Ed448PrivateKeyr4r!r?r-r*rrrCrCCs��	�	�	���#�#�G��JrrCN)�typingr�cryptography.hazmat.primitivesr�)cryptography.hazmat.primitives.asymmetricrr�dns.dnssecalgs.cryptographyrr�dns.dnssectypesr	�dns.rdtypes.ANY.DNSKEYr
rr,r7r<r?rCr*rr�<module>rKsa���8�D�U�%�)�
�'�
�$/�)�/�("�K�"��\�� �+� ��<�r

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic