+
    '(j                     N    ^ RI Ht ^ RIHtHtHtHt R tR tR t	R t
R tR tR	# )
    )long_to_bytes)EccKey	construct_import_curve25519_public_key_import_curve448_public_keyc                    VP                   V P                  ,          pVP                  4       '       d   \        R 4      hV P                  R8X  d)   \        VP                  P                  ^ RR7      4      pV# V P                  R8X  d)   \        VP                  P                  ^8RR7      4      pV# \        VP                  VP                  4       4      pV# )zInvalid ECDH point
Curve25519little)	byteorderCurve448)
pointQdis_point_at_infinity
ValueErrorcurve	bytearrayxto_bytesr   size_in_bytes)key_privkey_pubpointPzs   &&  G/home/ubuntu/cf-venv/lib/python3.14/site-packages/Crypto/Protocol/DH.py_compute_ecdhr      s    ^^hjj(F""$$./	/~~%fhh''h'?@ H 
:	%fhh''h'?@ H &((F$8$8$:;H    c                2    \        V 4      p\        RVR7      # )aT  Create a new X25519 public key object,
starting from the key encoded as raw ``bytes``,
in the format described in RFC7748.

Args:
  encoded (bytes):
    The x25519 public key to import.
    It must be 32 bytes.

Returns:
  :class:`Crypto.PublicKey.EccKey` : a new ECC key object.

Raises:
  ValueError: when the given key cannot be parsed.
r	   r   point_x)r   r   encodedr   s   & r   import_x25519_public_keyr"      s    " 	&g.A<33r   c                    \        V RR7      # )aV  Create a new X25519 private key object,
starting from the key encoded as raw ``bytes``,
in the format described in RFC7748.

Args:
  encoded (bytes):
    The X25519 private key to import.
    It must be 32 bytes.

Returns:
  :class:`Crypto.PublicKey.EccKey` : a new ECC key object.

Raises:
  ValueError: when the given key cannot be parsed.
r	   seedr   r   r!   s   &r   import_x25519_private_keyr(   ,   s    " '66r   c                2    \        V 4      p\        RVR7      # )aP  Create a new X448 public key object,
starting from the key encoded as raw ``bytes``,
in the format described in RFC7748.

Args:
  encoded (bytes):
    The x448 public key to import.
    It must be 56 bytes.

Returns:
  :class:`Crypto.PublicKey.EccKey` : a new ECC key object.

Raises:
  ValueError: when the given key cannot be parsed.
r   r   )r   r   r    s   & r   import_x448_public_keyr*   @   s    " 	$G,A:q11r   c                    \        V RR7      # )aR  Create a new X448 private key object,
starting from the key encoded as raw ``bytes``,
in the format described in RFC7748.

Args:
  encoded (bytes):
    The X448 private key to import.
    It must be 56 bytes.

Returns:
  :class:`Crypto.PublicKey.EccKey` : a new ECC key object.

Raises:
  ValueError: when the given key cannot be parsed.
r   r$   r&   r'   s   &r   import_x448_private_keyr,   U   s    " '44r   c                 6   V P                  RR4      pV P                  RR4      pV P                  RR4      pV P                  RR4      pV P                  RR4      pVf   \        R4      h^ p^ pRpR p	Ve   V	! WRR	4      pV^,          pVe   V	! WRR
4      pV^,          pVe   V	! WRR	4      pV^,          pVe   V	! WRR
4      pV^,          pWg,           ^8  g   V^ 8X  g   V^ 8X  d   \        R4      hRp
RpV'       d   V'       d   \        W4      p
V'       d9   V'       d1   \        V4      \        V4      8w  d   \        R4      h\        W44      pM7V'       d   V'       d   \        W24      pMV'       d   V'       d   \        W4      pW,           pV! V4      # )a  Perform a Diffie-Hellman key agreement.

Keywords:
  kdf (callable):
    A key derivation function that accepts ``bytes`` as input and returns
    ``bytes``.
  static_priv (EccKey):
    The local static private key. Optional.
  static_pub (EccKey):
    The static public key that belongs to the peer. Optional.
  eph_priv (EccKey):
    The local ephemeral private key, generated for this session. Optional.
  eph_pub (EccKey):
    The ephemeral public key, received from the peer for this session. Optional.

At least two keys must be passed, of which one is a private key and one
a public key.

Returns (bytes):
  The derived secret key material.
static_privN
static_pubeph_priveph_pubkdfz'kdf' is mandatoryc                    \        V\        4      '       g   \        R V,          4      hV'       d)   VP                  4       '       g   \        RV,          4      hV f   VP                  p V # WP                  8w  d   \        RV,          4      hV # )z'%s' must be an ECC keyz'%s' must be a private ECC keyz('%s' is defined on an incompatible curve)
isinstancer   	TypeErrorhas_privater   )r   keynameprivates   &&&&r   check_curve"key_agreement.<locals>.check_curve   sw    #v&&5<==3??,,<tCDD=IIE  iiFMNNr   TFz'Too few keys for the ECDH key agreementr   z"DH mode C(2e, 1s) is not supported)getr   r   bool)kwargsr.   r/   r0   r1   r2   
count_priv	count_pubr   r:   ZsZeZs   ,            r   key_agreementrD   i   s   . **]D1KL$/Jzz*d+HjjD)G
**UD
!C
{-..JIE	 EtDa
E|UCQ	EZ>a
EIu=Q	!#zQ)q.BCC	B	Bz;3GZ 00ABB8-	j80	[;0
Aq6Mr   N)Crypto.Util.numberr   Crypto.PublicKey.ECCr   r   r   r   r   r"   r(   r*   r,   rD    r   r   <module>rH      s1    ,? ?4*7(2*5(Wr   