§
    &xÅj§v  ã            
       ó
  — U d dl mZ d dlmZ d dlmZmZ d dlm	Z	 	  ej
        ¦   «         Zeed<    ej        ¦   «         Zeed<    ej        ¦   «         Zeed<    ej        ¦   «         Zeed<    ej        ¦   «         Zeed	<   eez   Z ej        ¦   «         Zeed
<    ej        ¦   «         Zeed<    ej        ¦   «         Zeed<    ej        ¦   «         Zeed<    ej        ¦   «         Z eed<   e ez   Z! ej"        ¦   «         Z#eed<    ej$        ¦   «         Z%eed<    ej&        ¦   «         Z'eed<    ej(        ¦   «         Z)eed<    ej*        ¦   «         Z+eed<   e+e)z   Z, ej-        ¦   «         Z.eed<    ej/        ¦   «         Z0eed<    ej1        ¦   «         Z2eed<    ej3        ¦   «         Z4eed<    ej5        ¦   «         Z6eed<   e6e4z   Z7 ej8        ¦   «         Z9eed<    ej:        ¦   «         Z;eed<    ej<        ¦   «         Z=eed<    ej>        ¦   «         Z?eed<    ej@        ¦   «         ZAeed<   eAe?z   Z7 ejB        ¦   «         ZCeed<    ejD        ¦   «         ZEeed<    ejF        ¦   «         ZGeed <    ejH        ¦   «         ZIeed!<    ejJ        ¦   «         ZKeed"<   eKeIz   Z7d#eLd$eeL         d%eLd&eLd'eLf
d(„ZMd)eLd$eeL         d%eLd&eLd'eLf
d*„ZNd#eLd$eeL         d%eLd&eLd'eLf
d+„ZOd)eLd$eeL         d%eLd&eLd'eLf
d,„ZPd#eLd$eeL         d%eLd&eLd'eLf
d-„ZQd)eLd$eeL         d%eLd&eLd'eLf
d.„ZRd#eLd$eeL         d%eLd&eLd'eLf
d/„ZSd)eLd$eeL         d%eLd&eLd'eLf
d0„ZTd#eLd$eeL         d%eLd&eLd'eLf
d1„ZUd)eLd$eeL         d%eLd&eLd'eLf
d2„ZVd#eLd$eeL         d%eLd&eLd'eLf
d3„ZWd)eLd$eeL         d%eLd&eLd'eLf
d4„ZXd5S )6é    )ÚOptional)Ú
exceptions)ÚffiÚlib)ÚensureÚ*crypto_aead_chacha20poly1305_ietf_KEYBYTESÚ+crypto_aead_chacha20poly1305_ietf_NSECBYTESÚ+crypto_aead_chacha20poly1305_ietf_NPUBBYTESÚ(crypto_aead_chacha20poly1305_ietf_ABYTESÚ2crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAXÚ%crypto_aead_chacha20poly1305_KEYBYTESÚ&crypto_aead_chacha20poly1305_NSECBYTESÚ&crypto_aead_chacha20poly1305_NPUBBYTESÚ#crypto_aead_chacha20poly1305_ABYTESÚ-crypto_aead_chacha20poly1305_MESSAGEBYTES_MAXÚ+crypto_aead_xchacha20poly1305_ietf_KEYBYTESÚ,crypto_aead_xchacha20poly1305_ietf_NSECBYTESÚ,crypto_aead_xchacha20poly1305_ietf_NPUBBYTESÚ)crypto_aead_xchacha20poly1305_ietf_ABYTESÚ3crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAXÚcrypto_aead_aegis256_KEYBYTESÚcrypto_aead_aegis256_NSECBYTESÚcrypto_aead_aegis256_NPUBBYTESÚcrypto_aead_aegis256_ABYTESÚ%crypto_aead_aegis256_MESSAGEBYTES_MAXÚcrypto_aead_aegis128l_KEYBYTESÚcrypto_aead_aegis128l_NSECBYTESÚcrypto_aead_aegis128l_NPUBBYTESÚcrypto_aead_aegis128l_ABYTESÚ&crypto_aead_aegis128l_MESSAGEBYTES_MAXÚcrypto_aead_aes256gcm_KEYBYTESÚcrypto_aead_aes256gcm_NSECBYTESÚcrypto_aead_aes256gcm_NPUBBYTESÚcrypto_aead_aes256gcm_ABYTESÚ&crypto_aead_aes256gcm_MESSAGEBYTES_MAXÚmessageÚaadÚnonceÚkeyÚreturnc                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |r|}t          |¦  «        }nt          j        }d}|t          z   }t          j        d	¦  «        }t          j        d
|¦  «        }	t          j        |	|| |||t          j        ||¦	  «	        }
t          |
dk    dt          j        ¬¦  «         t          j        |	|d         ¦  «        dd…         S )aZ  
    Encrypt the given ``message`` using the IETF ratified chacha20poly1305
    construction described in RFC7539.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    ú Input message type must be bytes©Úraisingú%Message must be at most {} bytes longNú%Additional data must be bytes or Noneú,Nonce must be a {} bytes long bytes sequenceú*Key must be a {} bytes long bytes sequencer   úunsigned long long *úunsigned char[]úEncryption failed.)r   Ú
isinstanceÚbytesÚexcÚ	TypeErrorÚlenr   ÚformatÚ
ValueErrorr
   r   r   ÚNULLr   Únewr   Ú)crypto_aead_chacha20poly1305_ietf_encryptÚCryptoErrorÚbuffer©r&   r'   r(   r)   ÚmlenÚ_aadÚaalenÚmxoutÚclenÚ
ciphertextÚress              úJC:\Projects\Historical\venv\Lib\site-packages\nacl/bindings/crypto_aead.pyr?   r?   x   s  € õ$ Ý�7�EÑ"Ô"Ø*Ý”ðñ ô ð õ ˆw‰<Œ<€Då
ØÕBÒBØ/×6Ò6Ý>ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	FÝ�‰JŒJÕEÒEØ6×=Ò=Ý7ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔð 	CÝ�‰HŒHÕBÒBØ4×;Ò;Ý6ñ	
ô 	
õ ”ðñ ô ð ð ð ØˆÝ�C‘”ˆˆåŒxˆØˆàÕ;Ñ;€EåŒ7Ð)Ñ*Ô*€Då”Ð*¨EÑ2Ô2€Jå
Ô
7Ø�D˜' 4¨¨uµc´hÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCÝŒ:�j $ q¤'Ñ*Ô*¨1¨1¨1Ô-Ð-ó    rH   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |t          z
  }t          j        d¦  «        }t          j        d	|¦  «        }|r|}t          |¦  «        }	nt          j        }d
}	t          j        ||t          j        | |||	||¦	  «	        }
t          |
d
k    dt          j        ¬¦  «         t          j        ||d
         ¦  «        dd…         S )aR  
    Decrypt the given ``ciphertext`` using the IETF ratified chacha20poly1305
    construction described in RFC7539.

    :param ciphertext:
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    ú#Input ciphertext type must be bytesr-   ú(Ciphertext must be at most {} bytes longNr0   r1   r2   r3   r4   r   úDecryption failed.)r   r6   r7   r8   r9   r:   Ú*_aead_chacha20poly1305_ietf_CRYPTBYTES_MAXr;   r<   r
   r   r   r   r>   r=   r   Ú)crypto_aead_chacha20poly1305_ietf_decryptr@   rA   ©rH   r'   r(   r)   rG   rF   rC   r&   rD   rE   rI   s              rJ   rQ   rQ   Ç   s  € õ$ Ý�:�uÑ%Ô%Ø-Ý”ðñ ô ð õ ˆz‰?Œ?€Då
ØÕ:Ò:Ø2×9Ò9Ý6ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	FÝ�‰JŒJÕEÒEØ6×=Ò=Ý7ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔð 	CÝ�‰HŒHÕBÒBØ4×;Ò;Ý6ñ	
ô 	
õ ”ðñ ô ð ð Õ;Ñ;€EåŒ7Ð)Ñ*Ô*€DÝŒgÐ'¨Ñ/Ô/€Gà
ð ØˆÝ�C‘”ˆˆåŒxˆØˆå
Ô
7Ø�•s”x ¨T°4¸ÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCåŒ:�g˜t AœwÑ'Ô'¨¨¨Ô*Ð*rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |r|}t          |¦  «        }nt          j        }d}|t          z   }t          j        d	¦  «        }t          j        d
|¦  «        }	t          j        |	|| |||t          j        ||¦	  «	        }
t          |
dk    dt          j        ¬¦  «         t          j        |	|d         ¦  «        dd…         S )a[  
    Encrypt the given ``message`` using the "legacy" construction
    described in draft-agl-tls-chacha20poly1305.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    r,   r-   r/   Nr0   r1   r2   r   r3   r4   r5   )r   r6   r7   r8   r9   r:   r   r;   r<   r   r   r   r=   r   r>   r   Ú$crypto_aead_chacha20poly1305_encryptr@   rA   rB   s              rJ   rT   rT     s  € õ$ Ý�7�EÑ"Ô"Ø*Ý”ðñ ô ð õ ˆw‰<Œ<€Då
ØÕ=Ò=Ø/×6Ò6Ý9ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	AÝ�‰JŒJÕ@Ò@Ø6×=Ò=Ý2ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔð 	>Ý�‰HŒHÕ=Ò=Ø4×;Ò;Ý1ñ	
ô 	
õ ”ðñ ô ð ð ð ØˆÝ�C‘”ˆˆåŒxˆØˆàÕ;Ñ;€EåŒ7Ð)Ñ*Ô*€Då”Ð*¨EÑ2Ô2€Jå
Ô
2Ø�D˜' 4¨¨uµc´hÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCÝŒ:�j $ q¤'Ñ*Ô*¨1¨1¨1Ô-Ð-rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |t          z
  }t          j        d¦  «        }t          j        d	|¦  «        }|r|}t          |¦  «        }	nt          j        }d
}	t          j        ||t          j        | |||	||¦	  «	        }
t          |
d
k    dt          j        ¬¦  «         t          j        ||d
         ¦  «        dd…         S )al  
    Decrypt the given ``ciphertext`` using the "legacy" construction
    described in draft-agl-tls-chacha20poly1305.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    rM   r-   rN   Nr0   r1   r2   r3   r4   r   rO   )r   r6   r7   r8   r9   r:   Ú%_aead_chacha20poly1305_CRYPTBYTES_MAXr;   r<   r   r   r   r   r>   r=   r   Ú$crypto_aead_chacha20poly1305_decryptr@   rA   rR   s              rJ   rW   rW   e  s  € õ$ Ý�:�uÑ%Ô%Ø-Ý”ðñ ô ð õ ˆz‰?Œ?€Då
ØÕ5Ò5Ø2×9Ò9Ý1ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	AÝ�‰JŒJÕ@Ò@Ø6×=Ò=Ý2ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔð 	>Ý�‰HŒHÕ=Ò=Ø4×;Ò;Ý1ñ	
ô 	
õ ”ðñ ô ð ð Õ6Ñ6€EåŒ7Ð)Ñ*Ô*€DÝŒgÐ'¨Ñ/Ô/€Gà
ð ØˆÝ�C‘”ˆˆåŒxˆØˆå
Ô
2Ø�•s”x ¨T°4¸ÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCåŒ:�g˜t AœwÑ'Ô'¨¨¨Ô*Ð*rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |r|}t          |¦  «        }nt          j        }d}|t          z   }t          j        d	¦  «        }t          j        d
|¦  «        }	t          j        |	|| |||t          j        ||¦	  «	        }
t          |
dk    dt          j        ¬¦  «         t          j        |	|d         ¦  «        dd…         S )aD  
    Encrypt the given ``message`` using the long-nonces xchacha20poly1305
    construction.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    r,   r-   r/   Nr0   r1   r2   r   r3   r4   r5   )r   r6   r7   r8   r9   r:   r   r;   r<   r   r   r   r=   r   r>   r   Ú*crypto_aead_xchacha20poly1305_ietf_encryptr@   rA   rB   s              rJ   rY   rY   ´  s  € õ$ Ý�7�EÑ"Ô"Ø*Ý”ðñ ô ð õ ˆw‰<Œ<€Då
ØÕCÒCØ/×6Ò6Ý?ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	GÝ�‰JŒJÕFÒFØ6×=Ò=Ý8ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔð 	DÝ�‰HŒHÕCÒCØ4×;Ò;Ý7ñ	
ô 	
õ ”ðñ ô ð ð ð ØˆÝ�C‘”ˆˆåŒxˆØˆàÕ<Ñ<€EåŒ7Ð)Ñ*Ô*€Då”Ð*¨EÑ2Ô2€Jå
Ô
8Ø�D˜' 4¨¨uµc´hÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCÝŒ:�j $ q¤'Ñ*Ô*¨1¨1¨1Ô-Ð-rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |t          z
  }t          j        d¦  «        }t          j        d	|¦  «        }|r|}t          |¦  «        }	nt          j        }d
}	t          j        ||t          j        | |||	||¦	  «	        }
t          |
d
k    dt          j        ¬¦  «         t          j        ||d
         ¦  «        dd…         S )aU  
    Decrypt the given ``ciphertext`` using the long-nonces xchacha20poly1305
    construction.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    rM   r-   rN   Nr0   r1   r2   r3   r4   r   rO   )r   r6   r7   r8   r9   r:   Ú+_aead_xchacha20poly1305_ietf_CRYPTBYTES_MAXr;   r<   r   r   r   r   r>   r=   r   Ú*crypto_aead_xchacha20poly1305_ietf_decryptr@   rA   rR   s              rJ   r\   r\     s  € õ$ Ý�:�uÑ%Ô%Ø-Ý”ðñ ô ð õ ˆz‰?Œ?€Då
ØÕ;Ò;Ø2×9Ò9Ý7ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	GÝ�‰JŒJÕFÒFØ6×=Ò=Ý8ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔð 	DÝ�‰HŒHÕCÒCØ4×;Ò;Ý7ñ	
ô 	
õ ”ðñ ô ð ð Õ<Ñ<€EÝŒ7Ð)Ñ*Ô*€DÝŒgÐ'¨Ñ/Ô/€Gà
ð ØˆÝ�C‘”ˆˆåŒxˆØˆå
Ô
8Ø�•s”x ¨T°4¸ÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCåŒ:�g˜t AœwÑ'Ô'¨¨¨Ô*Ð*rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |r|}t          |¦  «        }nt          j        }d}|t          z   }t          j        d	¦  «        }t          j        d
|¦  «        }	t          j        |	|| |||t          j        ||¦	  «	        }
t          |
dk    dt          j        ¬¦  «         t          j        |	|d         ¦  «        dd…         S )a0  
    Encrypt the given ``message`` using the AEGIS-256
    construction.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    r,   r-   r/   Nr0   r1   r2   r   r3   r4   r5   )r   r6   r7   r8   r9   r:   r   r;   r<   r   r   r   r=   r   r>   r   Úcrypto_aead_aegis256_encryptr@   rA   rB   s              rJ   r^   r^   Q  s  € õ$ Ý�7�EÑ"Ô"Ø*Ý”ðñ ô ð õ ˆw‰<Œ<€Då
ØÕ5Ò5Ø/×6Ò6Ý1ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	9Ý�‰JŒJÕ8Ò8Ø6×=Ò=Ý*ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐL¥3 s¡8¤8Õ/LÒ#LØ4×;Ò;Ý)ñ	
ô 	
õ ”ðñ ô ð ð ð ØˆÝ�C‘”ˆˆåŒxˆØˆàÕ.Ñ.€EåŒ7Ð)Ñ*Ô*€Då”Ð*¨EÑ2Ô2€Jå
Ô
*Ø�D˜' 4¨¨uµc´hÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCÝŒ:�j $ q¤'Ñ*Ô*¨1¨1¨1Ô-Ð-rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |t          z
  }t          j        d¦  «        }t          j        d	|¦  «        }|r|}t          |¦  «        }	nt          j        }d
}	t          j        ||t          j        | |||	||¦	  «	        }
t          |
d
k    dt          j        ¬¦  «         t          j        ||d
         ¦  «        dd…         S )aA  
    Decrypt the given ``ciphertext`` using the AEGIS-256
    construction.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    rM   r-   rN   Nr0   r1   r2   r3   r4   r   rO   )r   r6   r7   r8   r9   r:   Ú_aead_aegis256_CRYPTBYTES_MAXr;   r<   r   r   r   r   r>   r=   r   Úcrypto_aead_aegis256_decryptr@   rA   rR   s              rJ   ra   ra   Ÿ  s  € õ$ Ý�:�uÑ%Ô%Ø-Ý”ðñ ô ð õ ˆz‰?Œ?€Då
ØÕ-Ò-Ø2×9Ò9Ý)ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	9Ý�‰JŒJÕ8Ò8Ø6×=Ò=Ý*ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐL¥3 s¡8¤8Õ/LÒ#LØ4×;Ò;Ý)ñ	
ô 	
õ ”ðñ ô ð ð Õ.Ñ.€EÝŒ7Ð)Ñ*Ô*€DÝŒgÐ'¨Ñ/Ô/€Gà
ð ØˆÝ�C‘”ˆˆåŒxˆØˆå
Ô
*Ø�•s”x ¨T°4¸ÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCåŒ:�g˜t AœwÑ'Ô'¨¨¨Ô*Ð*rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |r|}t          |¦  «        }nt          j        }d}|t          z   }t          j        d	¦  «        }t          j        d
|¦  «        }	t          j        |	|| |||t          j        ||¦	  «	        }
t          |
dk    dt          j        ¬¦  «         t          j        |	|d         ¦  «        dd…         S )a1  
    Encrypt the given ``message`` using the AEGIS-128L
    construction.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    r,   r-   r/   Nr0   r1   r2   r   r3   r4   r5   )r   r6   r7   r8   r9   r:   r    r;   r<   r   r   r   r=   r   r>   r   Úcrypto_aead_aegis128l_encryptr@   rA   rB   s              rJ   rc   rc   ì  s  € õ$ Ý�7�EÑ"Ô"Ø*Ý”ðñ ô ð õ ˆw‰<Œ<€Då
ØÕ6Ò6Ø/×6Ò6Ý2ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	:Ý�‰JŒJÕ9Ò9Ø6×=Ò=Ý+ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐM¥3 s¡8¤8Õ/MÒ#MØ4×;Ò;Ý*ñ	
ô 	
õ ”ðñ ô ð ð ð ØˆÝ�C‘”ˆˆåŒxˆØˆàÕ/Ñ/€EåŒ7Ð)Ñ*Ô*€Då”Ð*¨EÑ2Ô2€Jå
Ô
+Ø�D˜' 4¨¨uµc´hÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCÝŒ:�j $ q¤'Ñ*Ô*¨1¨1¨1Ô-Ð-rK   c                 óV  — t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d                     t          ¦  «        t          j        ¬¦  «         |t          z
  }t          j        d¦  «        }t          j        d	|¦  «        }|r|}t          |¦  «        }	nt          j        }d
}	t          j        ||t          j        | |||	||¦	  «	        }
t          |
d
k    dt          j        ¬¦  «         t          j        ||d
         ¦  «        dd…         S )aB  
    Decrypt the given ``ciphertext`` using the AEGIS-128L
    construction.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    rM   r-   rN   Nr0   r1   r2   r3   r4   r   rO   )r   r6   r7   r8   r9   r:   r`   r;   r<   r   r   r   r   r>   r=   r   Úcrypto_aead_aegis128l_decryptr@   rA   rR   s              rJ   re   re   :  s  € õ$ Ý�:�uÑ%Ô%Ø-Ý”ðñ ô ð õ ˆz‰?Œ?€Då
ØÕ-Ò-Ø2×9Ò9Ý)ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	:Ý�‰JŒJÕ9Ò9Ø6×=Ò=Ý+ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐM¥3 s¡8¤8Õ/MÒ#MØ4×;Ò;Ý*ñ	
ô 	
õ ”ðñ ô ð ð Õ/Ñ/€EÝŒ7Ð)Ñ*Ô*€DÝŒgÐ'¨Ñ/Ô/€Gà
ð ØˆÝ�C‘”ˆˆåŒxˆØˆå
Ô
+Ø�•s”x ¨T°4¸ÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCåŒ:�g˜t AœwÑ'Ô'¨¨¨Ô*Ð*rK   c                 ó¸  — t          t          j        ¦   «         dk    dt          j        ¬¦  «         t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d 
                    t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d 
                    t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d	 
                    t          ¦  «        t          j        ¬¦  «         |r|}t          |¦  «        }nt          j        }d
}|t           z   }t          j        d¦  «        }t          j        d|¦  «        }	t          j        |	|| |||t          j        ||¦	  «	        }
t          |
d
k    dt          j        ¬¦  «         t          j        |	|d
         ¦  «        dd…         S )a{  
    Encrypt the given ``message`` using the AES-256-GCM
    construction.  Requires the Intel AES-NI extensions,
    or the ARM Crypto extensions.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    é   ú+Construction requires hardware accelerationr-   r,   r/   Nr0   r1   r2   r   r3   r4   r5   )r   r   Ú"crypto_aead_aes256gcm_is_availabler8   ÚUnavailableErrorr6   r7   r9   r:   r%   r;   r<   r#   r!   r   r=   r$   r>   Úcrypto_aead_aes256gcm_encryptr@   rA   rB   s              rJ   rk   rk   ‡  sH  € õ& ÝÔ.Ñ0Ô0°AÒ5Ø5ÝÔ$ðñ ô ð õ Ý�7�EÑ"Ô"Ø*Ý”ðñ ô ð õ ˆw‰<Œ<€Då
ØÕ6Ò6Ø/×6Ò6Ý2ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	:Ý�‰JŒJÕ9Ò9Ø6×=Ò=Ý+ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐM¥3 s¡8¤8Õ/MÒ#MØ4×;Ò;Ý*ñ	
ô 	
õ ”ðñ ô ð ð ð ØˆÝ�C‘”ˆˆåŒxˆØˆàÕ/Ñ/€EåŒ7Ð)Ñ*Ô*€Då”Ð*¨EÑ2Ô2€Jå
Ô
+Ø�D˜' 4¨¨uµc´hÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCÝŒ:�j $ q¤'Ñ*Ô*¨1¨1¨1Ô-Ð-rK   c                 ó¸  — t          t          j        ¦   «         dk    dt          j        ¬¦  «         t          t          | t          ¦  «        dt          j        ¬¦  «         t          | ¦  «        }t          |t          k    d 
                    t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        p|du dt          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d 
                    t          ¦  «        t          j        ¬¦  «         t          t          |t          ¦  «        ot          |¦  «        t          k    d	 
                    t          ¦  «        t          j        ¬¦  «         |t          z
  }t          j        d
¦  «        }t          j        d|¦  «        }|r|}t          |¦  «        }	nt          j        }d}	t          j        ||t          j        | |||	||¦	  «	        }
t          |
dk    dt          j        ¬¦  «         t          j        ||d         ¦  «        dd…         S )aŒ  
    Decrypt the given ``ciphertext`` using the AES-256-GCM
    construction.  Requires the Intel AES-NI extensions,
    or the ARM Crypto extensions.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    rg   rh   r-   rM   rN   Nr0   r1   r2   r3   r4   r   rO   )r   r   ri   r8   rj   r6   r7   r9   r:   r`   r;   r<   r#   r!   r$   r   r>   r=   Úcrypto_aead_aes256gcm_decryptr@   rA   rR   s              rJ   rm   rm   Ü  sH  € õ& ÝÔ.Ñ0Ô0°AÒ5Ø5ÝÔ$ðñ ô ð õ Ý�:�uÑ%Ô%Ø-Ý”ðñ ô ð õ ˆz‰?Œ?€Då
ØÕ-Ò-Ø2×9Ò9Ý)ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐ/ 3¨$ ;Ø/Ý”ðñ ô ð õ Ý�5�%Ñ Ô ð 	:Ý�‰JŒJÕ9Ò9Ø6×=Ò=Ý+ñ	
ô 	
õ ”ðñ ô ð õ Ý�3�ÑÔÐM¥3 s¡8¤8Õ/MÒ#MØ4×;Ò;Ý*ñ	
ô 	
õ ”ðñ ô ð ð Õ/Ñ/€EÝŒ7Ð)Ñ*Ô*€DÝŒgÐ'¨Ñ/Ô/€Gà
ð ØˆÝ�C‘”ˆˆåŒxˆØˆå
Ô
+Ø�•s”x ¨T°4¸ÀÀsñô €Cõ ˆ3�!Š8Ð)µ3´?ÐCÑCÔCÐCåŒ:�g˜t AœwÑ'Ô'¨¨¨Ô*Ð*rK   N)YÚtypingr   Únaclr   r8   Únacl._sodiumr   r   Únacl.exceptionsr   Ú*crypto_aead_chacha20poly1305_ietf_keybytesr   ÚintÚ__annotations__Ú+crypto_aead_chacha20poly1305_ietf_nsecbytesr	   Ú+crypto_aead_chacha20poly1305_ietf_npubbytesr
   Ú(crypto_aead_chacha20poly1305_ietf_abytesr   Ú2crypto_aead_chacha20poly1305_ietf_messagebytes_maxr   rP   Ú%crypto_aead_chacha20poly1305_keybytesr   Ú&crypto_aead_chacha20poly1305_nsecbytesr   Ú&crypto_aead_chacha20poly1305_npubbytesr   Ú#crypto_aead_chacha20poly1305_abytesr   Ú-crypto_aead_chacha20poly1305_messagebytes_maxr   rV   Ú+crypto_aead_xchacha20poly1305_ietf_keybytesr   Ú,crypto_aead_xchacha20poly1305_ietf_nsecbytesr   Ú,crypto_aead_xchacha20poly1305_ietf_npubbytesr   Ú)crypto_aead_xchacha20poly1305_ietf_abytesr   Ú3crypto_aead_xchacha20poly1305_ietf_messagebytes_maxr   r[   Úcrypto_aead_aegis256_keybytesr   Úcrypto_aead_aegis256_nsecbytesr   Úcrypto_aead_aegis256_npubbytesr   Úcrypto_aead_aegis256_abytesr   Ú%crypto_aead_aegis256_messagebytes_maxr   r`   Úcrypto_aead_aegis128l_keybytesr   Úcrypto_aead_aegis128l_nsecbytesr   Úcrypto_aead_aegis128l_npubbytesr   Úcrypto_aead_aegis128l_abytesr   Ú&crypto_aead_aegis128l_messagebytes_maxr    Úcrypto_aead_aes256gcm_keybytesr!   Úcrypto_aead_aes256gcm_nsecbytesr"   Úcrypto_aead_aes256gcm_npubbytesr#   Úcrypto_aead_aes256gcm_abytesr$   Ú&crypto_aead_aes256gcm_messagebytes_maxr%   r7   r?   rQ   rT   rW   rY   r\   r^   ra   rc   re   rk   rm   © rK   rJ   ú<module>r“      sE  ðð Ð Ð Ð Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "Ø !Ð !Ð !Ð !Ð !Ð !Ð !Ð !Ø "Ð "Ð "Ð "Ð "Ð "ðð 3€CÔ2Ñ4Ô4ð +¨Cð ð ñ ð 4€CÔ3Ñ5Ô5ð ,¨Sð ð ñ ð 4€CÔ3Ñ5Ô5ð ,¨Sð ð ñ ð 1€CÔ0Ñ2Ô2ð )¨#ð ð ñ ð ;€CÔ:Ñ<Ô<ð 3°Cð ð ñ ð 7Ø.ñ/ð +ð .€CÔ-Ñ/Ô/ð & sð ð ñ ð /€CÔ.Ñ0Ô0ð '¨ð ð ñ ð /€CÔ.Ñ0Ô0ð '¨ð ð ñ ð ,€CÔ+Ñ-Ô-ð $ Sð ð ñ ð 6€CÔ5Ñ7Ô7ð .¨sð ð ñ ð 2Ø)ñ*ð &ð 4€CÔ3Ñ5Ô5ð ,¨Sð ð ñ ð 5€CÔ4Ñ6Ô6ð -¨cð ð ñ ð 5€CÔ4Ñ6Ô6ð -¨cð ð ñ ð 2€CÔ1Ñ3Ô3ð *¨3ð ð ñ ð <€CÔ;Ñ=Ô=ð 4°Sð ð ñ ð 8Ø/ñ0ð ,ð
 &G SÔ%FÑ%HÔ%HÐ ˜sÐ HÐ HÑ HØ&H cÔ&HÑ&JÔ&JÐ  Ð JÐ JÑ JØ&H cÔ&HÑ&JÔ&JÐ  Ð JÐ JÑ JØ#B 3Ô#BÑ#DÔ#DÐ ˜SÐ DÐ DÑ Dà-€CÔ-Ñ/Ô/ð & sð ð ñ ð *Ð,GÑGð ð 'I cÔ&HÑ&JÔ&JÐ  Ð JÐ JÑ JØ'J sÔ'JÑ'LÔ'LÐ  Ð LÐ LÑ LØ'J sÔ'JÑ'LÔ'LÐ  Ð LÐ LÑ LØ$D CÔ$DÑ$FÔ$FÐ ˜cÐ FÐ FÑ Fà.€CÔ.Ñ0Ô0ð '¨ð ð ñ ð +Ð-IÑIð ð 'I cÔ&HÑ&JÔ&JÐ  Ð JÐ JÑ JØ'J sÔ'JÑ'LÔ'LÐ  Ð LÐ LÑ LØ'J sÔ'JÑ'LÔ'LÐ  Ð LÐ LÑ LØ$D CÔ$DÑ$FÔ$FÐ ˜cÐ FÐ FÑ Fà.€CÔ.Ñ0Ô0ð '¨ð ð ñ ð +Ð-IÑIð ð
L.ØðL.Ø! %œðL.Ø16ðL.Ø=BðL.à
ðL.ð L.ð L.ð L.ð^L+ØðL+Ø$ UœOðL+Ø49ðL+Ø@EðL+à
ðL+ð L+ð L+ð L+ð^L.ØðL.Ø! %œðL.Ø16ðL.Ø=BðL.à
ðL.ð L.ð L.ð L.ð^L+ØðL+Ø$ UœOðL+Ø49ðL+Ø@EðL+à
ðL+ð L+ð L+ð L+ð^L.ØðL.Ø! %œðL.Ø16ðL.Ø=BðL.à
ðL.ð L.ð L.ð L.ð^K+ØðK+Ø$ UœOðK+Ø49ðK+Ø@EðK+à
ðK+ð K+ð K+ð K+ð\K.ØðK.Ø! %œðK.Ø16ðK.Ø=BðK.à
ðK.ð K.ð K.ð K.ð\J+ØðJ+Ø$ UœOðJ+Ø49ðJ+Ø@EðJ+à
ðJ+ð J+ð J+ð J+ðZK.ØðK.Ø! %œðK.Ø16ðK.Ø=BðK.à
ðK.ð K.ð K.ð K.ð\J+ØðJ+Ø$ UœOðJ+Ø49ðJ+Ø@EðJ+à
ðJ+ð J+ð J+ð J+ðZR.ØðR.Ø! %œðR.Ø16ðR.Ø=BðR.à
ðR.ð R.ð R.ð R.ðjQ+ØðQ+Ø$ UœOðQ+Ø49ðQ+Ø@EðQ+à
ðQ+ð Q+ð Q+ð Q+ð Q+ð Q+rK   