| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/Cryptodome/SelfTest/Cipher/__pycache__/ |
Upload File : |
�
8�tc � � �F � d dl Z d dlmZ d dlmZ d dlmZ d dlmZm Z d dl
mZ d dlm
Z
d dlmZ d � Z G d
� de j � � Z G d� d
e j � � Z G d� de j � � Z G d� de j � � Zi fd�Zedk rd� Z e j d�� � dS dS )� N�� unhexlify)�list_test_cases)�load_test_vectors_wycheproof)�tobytes�bchr)�AES)�SHAKE128)�strxorc �l � t j t | � � �� � � |� � S )N)�data)r
�newr �read)�tag�lengths �E/usr/lib/python3/dist-packages/Cryptodome/SelfTest/Cipher/test_CCM.py�get_tag_randomr + s) � ��<�W�S�\�\�*�*�*�/�/��7�7�7� c �� � e Zd Z edd� � Z edd� � Z edd� � Zd� Zd� Zd� Z d � Z
d
� Zd� Zd� Z
d
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�CcmTests�key_128� � nonce_128� �data_128c �R � t j | j t j | j �� � }t dd� � }|� |� � }t j | j t j | j �� � }|� |� � }| � ||� � d S )N��nonce� plaintexti@ ) r r r �MODE_CCM�nonce_96r �encrypt�decrypt�assertEqual)�self�cipher�pt�ct�pt2s r �test_loopback_128zCcmTests.test_loopback_1285 s� � �����s�|�4�=�I�I�I��
�K��
2�
2��
�^�^�B�
�
������s�|�4�=�I�I�I���n�n�R� � ������S�!�!�!�!�!r c �^ � t j | j t j � � }|j }t j | j t j � � }|j }| � t
|� � d� � | � ||� � t j | j t j | j � � }|� | j
� � }t j | j t j | j �� � }| � ||� | j
� � � � d S )N� r )r r r r r r$ �len�assertNotEqualr! r"