+
    @i3                         ^ RI t^ RIt^ RIt^RIHtHtHtHtH	t	H
t
 ^RIHtHtHt ^RIHt ^RIHt  ! R R]P&                  4      t ! R R	]P&                  4      t]P,                  P/                  R
]] U u. uF  q P0                  NK  	  up R7      R 4       t]P,                  P/                  R
]] U u. uF  q P0                  NK  	  up R7      R 4       t]P,                  P/                  R
]] U u. uF  q P0                  NK  	  up R7      R 4       t]P,                  P/                  R
]] U u. uF  q P0                  NK  	  up R7      R 4       tR#   ] d	    ^ RIt EL\i ; iu up i u up i u up i u up i )    N)CurveNIST256pcurvesUnknownCurveErrorPRIME_FIELD_OIDcurve_by_name)CurveFpPointJacobi	CurveEdTw)der)number_to_stringc                      a  ] tR t^t o ]R 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestParameterEncodingc                    R V n         R# )a0  MIHgAgEBMCwGByqGSM49AQECIQD/////AAAAAQAAAAAAAAAAAAAAAP///////////////zBEBCD/////AAAAAQAAAAAAAAAAAAAAAP///////////////AQgWsY12Ko6k+ez671VdpiGvGUdBrDMU7D2O848PifSYEsEQQRrF9Hy4SxCR/i85uVjpEDydwN9gS3rM6D0oTlF2JjClk/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1AiEA/////wAAAAD//////////7zm+q2nF56E87nKwvxjJVECAQE=N)base64_params)clss   &O/var/www/html/photoedit/myenv/lib/python3.14/site-packages/ecdsa/test_curves.py
setUpClass TestParameterEncoding.setUpClass   s    
C 	    c                b    R p\         P                  ! V4      pV P                  V\        4       R# )o  -----BEGIN EC PARAMETERS-----
MIHgAgEBMCwGByqGSM49AQECIQD/////AAAAAQAAAAAAAAAAAAAAAP/////////
//////zBEBCD/////AAAAAQAAAAAAAAAAAAAAAP///////////////AQgWsY12K
o6k+ez671VdpiGvGUdBrDMU7D2O848PifSYEsEQQRrF9Hy4SxCR/i85uVjpEDyd
wN9gS3rM6D0oTlF2JjClk/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1
AiEA/////wAAAAD//////////7zm+q2nF56E87nKwvxjJVECAQE=
-----END EC PARAMETERS-----
N)r   from_pemassertIsr   )self
pem_paramscurves   &  r   test_from_pem#TestParameterEncoding.test_from_pem"   s*    , 	 z*eX&r   c                
   R pV P                  \        P                  4      ;_uu_ 4       p\        P                  ! VR.4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)r   named_curveNzexplicit curve parameters notassertRaisesr   UnexpectedDERr   r   assertInstr	exceptionr   r   es   &  r   2test_from_pem_with_explicit_when_explicit_disabledHTestParameterEncoding.test_from_pem_with_explicit_when_explicit_disabled0   s_    , 	 s0011QNN:7 2 	5s1;;7GH 21   A22B	c                
   R pV P                  \        P                  4      ;_uu_ 4       p\        P                  ! VR.4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)zK-----BEGIN EC PARAMETERS-----
BggqhkjOPQMBBw==
-----END EC PARAMETERS-----
explicitNz named_curve curve parameters notr"   r(   s   &  r   8test_from_pem_with_named_curve_with_named_curve_disabledNTestParameterEncoding.test_from_pem_with_named_curve_with_named_curve_disabled?   s_    , 	
 s0011QNN:
|4 2 	8#akk:JK 21r,   c                   R pV P                  \        P                  4      ;_uu_ 4       p\        P                  ! V4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)ai  -----BEGIN PARAMETERS-----
MIHgAgEBMCwGByqGSM49AQECIQD/////AAAAAQAAAAAAAAAAAAAAAP/////////
//////zBEBCD/////AAAAAQAAAAAAAAAAAAAAAP///////////////AQgWsY12K
o6k+ez671VdpiGvGUdBrDMU7D2O848PifSYEsEQQRrF9Hy4SxCR/i85uVjpEDyd
wN9gS3rM6D0oTlF2JjClk/jQuL+Gn+bjufrSnwPnhYrzjNXazFezsu2QGg3v1H1
AiEA/////wAAAAD//////////7zm+q2nF56E87nKwvxjJVECAQE=
-----END PARAMETERS-----
NzPARAMETERS PEM headerr"   r(   s   &  r   test_from_pem_with_wrong_header5TestParameterEncoding.test_from_pem_with_wrong_headerJ   s[    ) 	 s0011QNN:& 2 	-s1;;/?@ 21s   A00B 	c                V    R p\         P                  ! 4       pV P                  W4       R# )sK   -----BEGIN EC PARAMETERS-----
BggqhkjOPQMBBw==
-----END EC PARAMETERS-----
N)r   to_pemassertEqual)r   r   encodings   &  r   test_to_pem!TestParameterEncoding.test_to_pemY   s(    - 	
 ??$.r   c                2    V P                  \        R 4       R# )   N)assertNotEqualr   )r   s   &r   "test_compare_with_different_object8TestParameterEncoding.test_compare_with_different_objectc   s    Hc*r   c                T    \         P                  ! 4       pV P                  R V4       R# )s
   *H=Nr   to_derr6   r   encodeds   & r   test_named_curve_params_der1TestParameterEncoding.test_named_curve_params_derf   s!    //# 	DgNr   c                ~    \         P                  ! 4       p\         P                  ! R 4      pV P                  W4       R# r!   Nr@   )r   encoded_defaultencoded_nameds   &  r   +test_verify_that_default_is_named_curve_derATestParameterEncoding.test_verify_that_default_is_named_curve_derl   s*    "//+ 68r   c                    \         P                  ! R 4      pV P                  V\        \        P
                  ! V P                  4      4      4       R# r.   N)r   rA   r6   bytesbase64	b64decoder   rB   s   & r    test_encoding_to_explicit_params6TestParameterEncoding.test_encoding_to_explicit_paramsr   s6    //*-%(8(89K9K(L"MNr   c                    V P                  \        4      ;_uu_ 4       p\        P                  ! R 4       RRR4       V P	                  R\        XP                  4      4       R#   + '       g   i     L7; i)unsupportedNzOnly 'named_curve')r#   
ValueErrorr   rA   r%   r&   r'   r   r)   s   & r   !test_encoding_to_unsupported_type7TestParameterEncoding.test_encoding_to_unsupported_typew   sI    z**aOOM* + 	*C,<= +*s   A$$A4	c                    \         P                  ! R R4      pRpV P                  V\        \        P
                  ! V4      4      4       R# )r.   
compresseda  MIHAAgEBMCwGByqGSM49AQECIQD/////AAAAAQAAAAAAAAAAAAAAAP///////////////zBEBCD/////AAAAAQAAAAAAAAAAAAAAAP///////////////AQgWsY12Ko6k+ez671VdpiGvGUdBrDMU7D2O848PifSYEsEIQNrF9Hy4SxCR/i85uVjpEDydwN9gS3rM6D0oTlF2JjClgIhAP////8AAAAA//////////+85vqtpxeehPO5ysL8YyVRAgEBN)r   rA   r6   rN   rO   rP   )r   rC   compressed_base_points   &  r   +test_encoding_to_explicit_compressed_paramsATestParameterEncoding.test_encoding_to_explicit_compressed_params}   sB    //*l; 	 	U6++,ABC	
r   c                    R p\         P                  ! \        \        P                  ! V4      4      4      pV P                  \        V4       R# )aP  MIH3AgEBMCwGByqGSM49AQECIQD/////AAAAAQAAAAAAAAAAAAAAAP///////////////zBbBCD/////AAAAAQAAAAAAAAAAAAAAAP///////////////AQgWsY12Ko6k+ez671VdpiGvGUdBrDMU7D2O848PifSYEsDFQDEnTYIhucEk2pmeOETnSa3gZ9+kARBBGsX0fLhLEJH+Lzm5WOkQPJ3A32BLeszoPShOUXYmMKWT+NC4v4af5uO5+tKfA+eFivOM1drMV7Oy7ZAaDe/UfUCIQD/////AAAAAP//////////vOb6racXnoTzucrC/GMlUQIBAQ==N)r   from_derrN   rO   rP   r6   r   )r   p256_explicitdecodeds   &  r   #test_decoding_explicit_from_openssl9TestParameterEncoding.test_decoding_explicit_from_openssl   s<     	 ..v'7'7'F!GH7+r   c                    \         P                  ! \        \        P                  ! V P
                  4      4      4      pV P                  V\        4       R # N)r   r_   rN   rO   rP   r   r   r   )r   r   s   & r   -test_decoding_well_known_from_explicit_paramsCTestParameterEncoding.test_decoding_well_known_from_explicit_params   s4    uV%5%5d6H6H%IJKeX&r   c                    V P                  \        4      ;_uu_ 4       p\        P                  ! R R.4       RRR4       V P	                  R\        XP                  4      4       R#   + '       g   i     L7; i)r   
explicitCANzOnly named_curve)r#   rU   r   r_   r%   r&   r'   rV   s   & r   ,test_decoding_with_incorrect_valid_encodingsBTestParameterEncoding.test_decoding_with_incorrect_valid_encodings   sM    z**aNN3/ + 	(#akk*:; +*s   A&&A6	c           	         \        ^^^4      p\        V^^^^	RR7      p\        V^^^^	RR7      p\        RWR4      p\        RWR4      pV P                  WE4       R# )   T	generatorunknownN)r	   r
   r   r<   )r   curve_fpbase_abase_bcurve_acurve_bs   &     r   -test_compare_curves_with_different_generatorsCTestParameterEncoding.test_compare_curves_with_different_generators   sb    2q!$Xr1adCXq"adC	8T:	8T:G-r   c           	     ,   \        ^^^4      p\        V^^^^	RR7      p\        RWR4      pVP                  4       p\        P                  ! V4      pV P                  W54       RpV P                  V\        \        P                  ! V4      4      4       R# )rm   Trn   rp   Nz0MCECAQEwDAYHKoZIzj0BAQIBFzAGBAEBBAEHBAMEDQMCAQk=)	r	   r
   r   rA   r_   r6   rN   rO   rP   )r   rq   
base_pointr   rC   ra   expecteds   &      r   $test_default_encode_for_custom_curve:TestParameterEncoding.test_default_encode_for_custom_curve   s~    2q!$ 2q!Q$G
it<,,...)(E%(8(8(B"CDr   c           	     :   \        ^^^4      p\        V^^^^	RR7      p\        RWR4      pV P                  \        4      ;_uu_ 4       pVP                  R4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)rm   Trn   rp   Nr!   zCan't encode curve)	r	   r
   r   r#   r   rA   r%   r&   r'   )r   rq   ry   r   r)   s   &    r   (test_named_curve_encode_for_custom_curve>TestParameterEncoding.test_named_curve_encode_for_custom_curve   sz    2q!$ 2q!Q$G
it<011QLL' 2 	*C,<= 21s   	B

B	c                   R pV P                  \        4      ;_uu_ 4       p\        P                  ! \        P
                  ! V4      4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)zMIGRAgEBMBwGByqGSM49AQIwEQIBcQYJKoZIzj0BAgMCAgEJMDkEDwAwiCUMpufH/mSc6Fgg9wQPAOi+5NPiJgdEGIvg6ccjAxUAEOcjqxTWluZ2h1YVF1b+v4/LSakEHwQAnXNhbzX0qxQH1zViwQ8ApSgwJ3lY7oTRMV7TGIYCDwEAAAAAAAAA2czsijnlbwIBAg==Nz#Characteristic 2 curves unsupported)	r#   r   r   r_   rO   rP   r%   r&   r'   )r   sect113r1_explicitr)   s   &  r   !test_try_decoding_binary_explicit7TestParameterEncoding.test_try_decoding_binary_explicit   sb     	 011QNN6++,>?@ 2 	;S=MN 21s   +A::B
	c                |   \         P                  ! \        P                  !  \         P                  ! ^4      ,           pV P                  \         P                  4      ;_uu_ 4       p\        P                  ! V4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)   NzUnexpected data after OID)r   
encode_oidr   oidencode_integerr#   r$   r   r_   r%   r&   r'   r   bad_derr)   s   &  r   !test_decode_malformed_named_curve7TestParameterEncoding.test_decode_malformed_named_curve   sq    ..(,,/#2D2DQ2GGs0011QNN7# 2 	13q{{3CD 21s   %B++B;	c                   \        \        P                  ! V P                  4      4      \        P
                  ! ^4      ,           pV P                  \        P                  4      ;_uu_ 4       p\        P                  ! V4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)r   Nz"Unexpected data after ECParameters)rN   rO   rP   r   r   r   r#   r$   r   r_   r%   r&   r'   r   s   &  r   4test_decode_malformed_explicit_garbage_after_ECParamJTestParameterEncoding.test_decode_malformed_explicit_garbage_after_ECParam   s    T//0
q!" s0011QNN7# 2 	:C<LM 21s   ,B22C	c                V   \         P                  ! \         P                  ! ^4      4      pV P                  \         P                  4      ;_uu_ 4       p\
        P                  ! V4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)   Nz!Unknown parameter encoding format)
r   encode_sequencer   r#   r$   r   r_   r%   r&   r'   r   s   &  r   ,test_decode_malformed_unknown_version_numberBTestParameterEncoding.test_decode_malformed_unknown_version_number   sj    %%c&8&8&;<s0011QNN7# 2 	93q{{;KL 21s   BB(	c                   \         P                  P                  4       p\        P                  ! \        P
                  ! ^4      \        P                  ! \        P                  ! ^^^4      \        P
                  ! V4      4      \        P                  ! \        P                  ! \        \         P                  P                  4       V,          V4      4      \        P                  ! \        \         P                  P                  4       V4      4      4      \        P                  ! \         P                  P                  R4      4      \        P
                  ! \         P                  P                  4       4      4      pV P                  \        4      ;_uu_ 4       p\         P"                  ! V4       RRR4       V P%                  R\'        XP(                  4      4       R#   + '       g   i     L7; i)r   uncompressedNzUnknown field type: (1, 2, 3))r   r   pr   r   r   r   encode_octet_stringr   abro   to_bytesorderr#   r   r   r_   r%   r&   r'   r   curve_pr   r)   s   &   r   (test_decode_malformed_unknown_field_type>TestParameterEncoding.test_decode_malformed_unknown_field_type   sK   ..""$%%q!q!Q'););G)D ''$X^^%5%5%7'%A7K ''$X^^%5%5%7A	 ##""++N; x11779:!
& 011QNN7# 2 	5s1;;7GH 21s   G  G0	c                "   \         P                  P                  4       p\        P                  ! \        P
                  ! ^4      \        P                  ! \        P                  ! \         \        P
                  ! V4      \        P
                  ! ^4      4      \        P                  ! \        P                  ! \        \         P                  P                  4       V,          V4      4      \        P                  ! \        \         P                  P                  4       V4      4      4      \        P                  ! \         P                  P                  R4      4      \        P
                  ! \         P                  P                  4       4      4      pV P                  \        P                   4      ;_uu_ 4       p\"        P$                  ! V4       RRR4       V P'                  R\)        XP*                  4      4       R#   + '       g   i     L7; i)r   r   NzPrime-p element)r   r   r   r   r   r   r   r   r   r   r   r   ro   r   r   r#   r$   r   r_   r%   r&   r'   r   s   &   r   )test_decode_malformed_garbage_after_prime?TestParameterEncoding.test_decode_malformed_garbage_after_prime  s[   ..""$%%q!0""7+""1%
 ''$X^^%5%5%7'%A7K ''$X^^%5%5%7A	 ##""++N; x11779:%
* s0011QNN7# 2 	'Q[[)9: 21s   8G>>H	 N)__name__
__module____qualname____firstlineno__classmethodr   r   r*   r/   r2   r8   r=   rD   rJ   rQ   rW   r\   rb   rf   rj   rv   r{   r~   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     	
 	
'I	LA/+O9O
>
, '
<.E 	>OENMI4; ;r   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestCurveSearchingi*  c                H    \        R 4      pV P                  V\        4       R# )r   Nr   r   r   r   cs   & r   test_correct_name$TestCurveSearching.test_correct_name+  s    *%a"r   c                H    \        R 4      pV P                  V\        4       R# )
prime256v1Nr   r   s   & r   test_openssl_name$TestCurveSearching.test_openssl_name/  s    ,'a"r   c                    V P                  \        4      ;_uu_ 4       p\        R 4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zfoo barNzFname 'foo bar' unknown, only curves supported: ['NIST192p', 'NIST224p'r#   r   r   r%   r&   r'   rV   s   & r   test_unknown_curve%TestCurveSearching.test_unknown_curve3  sK    011Q)$ 2 	&	
 21   AA)	c                    V P                  \        4      ;_uu_ 4       p\        R 4       R R R 4       V P                  R\	        XP
                  4      4       R #   + '       g   i     L7; i)NzAname None unknown, only curves supported: ['NIST192p', 'NIST224p'r   rV   s   & r   test_with_None_as_parameter.TestCurveSearching.test_with_None_as_parameter=  sK    011Q$ 2 	&	
 21r   r   N)
r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r   *  s     ##

 
r   r   r   )idsc                 `    \         P                  ! V P                  R 4      4      pW8X  g   Q hR# rG   r   r_   rA   r   rets   & r   %test_curve_params_encode_decode_namedr   H  s#    
..m4
5C<<r   c                 D   \        V P                  \        4      '       d?   \        P                  ! \
        4      ;_uu_ 4        V P                  R 4       RRR4       R# \        P                  ! V P                  R 4      4      pW8X  g   Q hR#   + '       g   i     R# ; irM   	
isinstancer   r   pytestraisesr   rA   r   r_   r   s   & r   (test_curve_params_encode_decode_explicitr   O  sf    %++y))]],--LL$ .- nnU\\*56|| .--s   BB	c                 ^    \         P                  ! V P                  4       4      pW8X  g   Q hR # re   r   r   s   & r   'test_curve_params_encode_decode_defaultr   Z  s     
..
(C<<r   c                 H   \        V P                  \        4      '       d@   \        P                  ! \
        4      ;_uu_ 4        V P                  R R4       RRR4       R# \        P                  ! V P                  R R4      4      pW8X  g   Q hR#   + '       g   i     R# ; i)r.   rZ   Nr   r   s   & r   3test_curve_params_encode_decode_explicit_compressedr   a  sj    %++y))]],--LL\2 .- nnU\\*lCD|| .--s   BB!	)	unittest2unittestImportErrorrO   r   r   r   r   r   r   r   ellipticcurver	   r
   r    r   utilr   TestCaser   r   markparametrizenamer   r   r   r   )is   0r   <module>r      sq       ; :  "R;H-- R;j
** 
< &v.Fv!vvv.FG H &v.Fv!vvv.FG H &v.Fv!vvv.FG H &v.Fv!vvv.FG H
  J
 /G /G /G /Gs)   E 9E&6E+3E00E5E#"E#