관리-도구
편집 파일: test_pkcs1_15.cpython-311.pyc
� O�Dg�4 � �$ � d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm Z d dl mZ d dlm Z mZ d dlmZmZmZmZmZmZmZmZmZ d d lmZ d d lmZ d dlmZ d dlmZ d dlm Z d � Z G d� dej! � � Z" G d� dej! � � Z# e dddd� d� d� d�� � pg Z$ e%e$� � D ]�\ Z&Z' e(e'e)� � r� e*e'd� � re'j+ Z,�& e e'j- �. � � � � Z/e/�0 e'j1 � � Z2 ej3 d� e,e'j4 fD � � � � Z5 ej0 e5� � Z6e2e6e'j7 fd�Z8e2e6e'j7 fd�Z9e'j: dk r e;e#de&z e9� � �� e;e#de&z e8� � �� G d � d!ej! � � Z< G d"� d#ej! � � Z= e dd$d%d&d'� i� � pg Z>e> e dd(d)d&d*� i� � pg z Z> e%e>� � D ]�\ Z&Z' e(e'e)� � r� e*e'd� � re'j+ Z,�& e*e'd+� � r8 ej3 d,� e,e'j4 e'j? fD � � � � Z@ ej0 e@� � ZA�j e e'j- �. � � � � Z/e/�0 e'j1 � � Z2e2eAe'j7 fd-�ZB e;e=d.e&z eB� � �� G d/� d0ej! � � ZC G d1� d2ej! � � ZD G d3� d4ej! � � ZE G d5� d6ej! � � ZFi fd7�ZGeHd8k rd9� ZI ejJ d:�;� � dS dS )<� N)� unhexlify)�bchr�� bytes_to_long)�strxor)�list_test_cases)�load_test_vectors�load_test_vectors_wycheproof) �SHA1�SHA224�SHA256�SHA384�SHA512�SHA3_384�SHA3_224�SHA3_256�SHA3_512)�RSA)�pkcs1_15)� PKCS1_v1_5)�pycryptodome_filenamec �^ � t d| z t � � t � � dg� � S )NzCrypto.Hash.�new)� __import__�globals�locals)� hash_names ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/Signature/test_pkcs1_15.py�load_hash_by_namer 3 s% � ��n�y�0�'�)�)�V�X�X��w�O�O�O� c � � e Zd Zd� Zd� ZdS )�FIPS_PKCS1_Verify_Testsc � � dS )NzFIPS PKCS1 Tests (Verify)� ��selfs r �shortDescriptionz(FIPS_PKCS1_Verify_Tests.shortDescription9 s � �*�*r c �� � t j d� � � � � }t j |� � }| � |� � � d� � d S )N� F)r �generate� public_keyr r �assertEqual�can_sign)r&