https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/ec.pyc
�
x�\c@`sjddlmZmZmZddlmZddlmZmZm	Z	ddl
mZmZm
Z
ddlmZmZddlmZmZmZd�Zd�Zd	�Zd
�Zd�Zd�Zeje�d
efd��Y�Zeje�defd��Y�Zejej�defd��Y�Z ejej!�defd��Y�Z"dS(i(tabsolute_importtdivisiontprint_function(tutils(tInvalidSignaturetUnsupportedAlgorithmt_Reasons(t_calculate_digest_and_algorithmt_check_not_prehashedt_warn_sign_verify_deprecated(thashest
serialization(tAsymmetricSignatureContexttAsymmetricVerificationContextteccC`s+t|tj�s'tdtj��ndS(Ns/Unsupported elliptic curve signature algorithm.(t
isinstanceRtECDSARRt UNSUPPORTED_PUBLIC_KEY_ALGORITHM(tsignature_algorithm((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt_check_signature_algorithmscC`s�|jj|�}|j||jjk�|jj|�}||jjkr^td��n|jj|�}|j||jjk�|jj	|�j
d�}|S(NsCECDSA certificates with unnamed curves are unsupported at this timetascii(t_libtEC_KEY_get0_grouptopenssl_assertt_ffitNULLtEC_GROUP_get_curve_namet	NID_undeftNotImplementedErrort
OBJ_nid2sntstringtdecode(tbackendtec_keytgrouptnidt
curve_nametsn((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt_ec_key_curve_snscC`s|jj||jj�dS(s�
    Set the named curve flag on the EC_KEY. This causes OpenSSL to
    serialize EC keys along with their curve OID which makes
    deserialization easier.
    N(RtEC_KEY_set_asn1_flagtOPENSSL_EC_NAMED_CURVE(R tec_cdata((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt_mark_asn1_named_ec_curve0s	cC`sEytj|�SWn,tk
r@tdj|�tj��nXdS(Ns${} is not a supported elliptic curve(Rt_CURVE_TYPEStKeyErrorRtformatRtUNSUPPORTED_ELLIPTIC_CURVE(R R%((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt_sn_to_elliptic_curve<s
cC`s�|jj|j�}|j|dk�|jjd|�}|jjdd�}|jjd|t|�|||j�}|j|dk�|jj|�|d S(Nisunsigned char[]sunsigned int[]i(	Rt
ECDSA_sizet_ec_keyRRtnewt
ECDSA_signtlentbuffer(R tprivate_keytdatatmax_sizetsigbuft
siglen_ptrtres((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt_ecdsa_sig_signFs	!cC`sS|jjd|t|�|t|�|j�}|dkrO|j�t�ndS(Nii(RtECDSA_verifyR4R1t_consume_errorsR(R t
public_keyt	signatureR7R;((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt_ecdsa_sig_verifySs
	'
t_ECDSASignatureContextcB`s#eZd�Zd�Zd�ZRS(cC`s+||_||_tj||�|_dS(N(t_backendt_private_keyR
tHasht_digest(tselfR R6t	algorithm((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt__init__^s		cC`s|jj|�dS(N(RFtupdate(RGR7((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRJcscC`s%|jj�}t|j|j|�S(N(RFtfinalizeR<RCRD(RGtdigest((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRKfs(t__name__t
__module__RIRJRK(((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRB\s		t_ECDSAVerificationContextcB`s#eZd�Zd�Zd�ZRS(cC`s4||_||_||_tj||�|_dS(N(RCt_public_keyt
_signatureR
RERF(RGR R?R@RH((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRIns			cC`s|jj|�dS(N(RFRJ(RGR7((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRJtscC`s/|jj�}t|j|j|j|�dS(N(RFRKRARCRPRQ(RGRL((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytverifyws(RMRNRIRJRR(((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyROls		t_EllipticCurvePrivateKeycB`seeZd�Zejd�Zed��Zd�Zd�Z	d�Z
d�Zd�Zd�Z
RS(	cC`sM||_t||�||_||_t||�}t||�|_dS(N(RCR*R1t	_evp_pkeyR&R/t_curve(RGR tec_key_cdatatevp_pkeyR%((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRI�s	
		RUcC`s
|jjS(N(tcurvetkey_size(RG((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRY�scC`s4t�t|�t|j�t|j||j�S(N(R	RRRHRBRC(RGR((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytsigner�s


cC`s)|jj||j�s-tdtj��n|jj|jjkrTtd��n|jjj	|j
�}|jjj|�dd}|jj|dk�|jj
jd|�}|jjj|j
�}|jjj||||j
|jj
j�}|jj|dk�|jj
j|�| S(Ns1This backend does not support the ECDH algorithm.s2peer_public_key and self are not on the same curveiiis	uint8_t[](RCt+elliptic_curve_exchange_algorithm_supportedRXRRtUNSUPPORTED_EXCHANGE_ALGORITHMtnamet
ValueErrorRRR1tEC_GROUP_get_degreeRRR2tEC_KEY_get0_public_keytECDH_compute_keyRR5(RGRHtpeer_public_keyR"tz_lentz_buftpeer_keytr((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytexchange�s$	!cC`s+|jjj|j�}|jj||jjjk�|jjj|�}|jjj|�}|jj||jjjk�|jjj	||jjj
�}|jjj|j�}|jj||jjjk�|jjj||�}|jj|dk�|jj
|�}t|j||�S(Ni(RCRRR1RRRRtEC_KEY_new_by_curve_nametgctEC_KEY_freeR`tEC_KEY_set_public_keyt_ec_cdata_to_evp_pkeyt_EllipticCurvePublicKey(RGR"t	curve_nidt
public_ec_keytpointR;RW((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyR?�scC`sL|jjj|j�}|jj|�}tjd|d|j�j��S(Nt
private_valuetpublic_numbers(	RCRtEC_KEY_get0_private_keyR1t
_bn_to_intRtEllipticCurvePrivateNumbersR?Rr(RGtbnRq((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytprivate_numbers�s
	cC`s"|jj||||j|j�S(N(RCt_private_key_bytesRTR1(RGtencodingR-tencryption_algorithm((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt
private_bytes�s	cC`s;t|�t|j||j�\}}t|j||�S(N(RRRCt
_algorithmR<(RGR7RRH((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytsign�s
(RMRNRIRtread_only_propertyRXtpropertyRYRZRgR?RwR{R}(((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRS~s								RmcB`s\eZd�Zejd�Zed��Zd�Zd�Z	d�Z
d�Zd�ZRS(cC`sM||_t||�||_||_t||�}t||�|_dS(N(RCR*R1RTR&R/RU(RGR RVRWR%((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRI�s	
		RUcC`s
|jjS(N(RXRY(RG((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRY�scC`sGt�tjd|�t|�t|j�t|j|||j�S(NR@(R	Rt_check_bytesRRRHRORC(RGR@R((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytverifier�s

c

C`s|jj|j�\}}|jjj|j�}|jj||jjjk�|jj���}|jjj	|�}|jjj	|�}||||||�}|jj|dk�|jj
|�}|jj
|�}	WdQXtjd|d|	d|j
�S(NitxtyRX(RCt _ec_key_determine_group_get_funcR1RR`RRRt_tmp_bn_ctxt
BN_CTX_getRtRtEllipticCurvePublicNumbersRU(
RGtget_funcR"Rptbn_ctxtbn_xtbn_yR;R�R�((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRr�s	c	C`sz|tjjkr$|jjj}n'|tjjks<t�|jjj}|jjj	|j
�}|jj||jjj
k�|jjj|j
�}|jj||jjj
k�|jj���}|jjj||||jjj
d|�}|jj|dk�|jjjd|�}|jjj||||||�}|jj||k�WdQX|jjj|�S(Nischar[](RtPublicFormattCompressedPointRCRtPOINT_CONVERSION_COMPRESSEDtUncompressedPointtAssertionErrortPOINT_CONVERSION_UNCOMPRESSEDRR1RRRR`R�tEC_POINT_point2octR2R5(	RGR-t
conversionR"RpR�tbuflentbufR;((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt
_encode_points"!cC`s�|tjjkr!td��n|tjjksW|tjjksW|tjjkr�|tjjk	s�|tjjtjjfkr�td��n|j|�S|j	j
||||jd�SdS(Ns1EC public keys do not support PKCS1 serializationsKX962 encoding must be used with CompressedPoint or UncompressedPoint format(
RR�tPKCS1R^tEncodingtX962R�R�R�RCt_public_key_bytesRTtNone(RGRyR-((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pytpublic_bytes.s&	
	cC`sBt|�t|j||j�\}}t|j|||�dS(N(RRRCR|RA(RGR@R7RRH((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRROs
(
RMRNRIRR~RXRRYR�RrR�R�RR(((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyRm�s			
			!N(#t
__future__RRRtcryptographyRtcryptography.exceptionsRRRt*cryptography.hazmat.backends.openssl.utilsRRR	tcryptography.hazmat.primitivesR
Rt)cryptography.hazmat.primitives.asymmetricRR
RRR&R*R/R<RAtregister_interfacetobjectRBROt(EllipticCurvePrivateKeyWithSerializationRSt'EllipticCurvePublicKeyWithSerializationRm(((sO/tmp/pip-install-A1qMVe/cryptography/cryptography/hazmat/backends/openssl/ec.pyt<module>s&				
	
		e

https://t.me/AnonymousX5 - 2025