U vf- @ s d Z ddlmZmZ ddlmZ ddlmZmZ ddl m Z ddlmZm Z ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ G dd d ZG dd dZG dd deZdS )z ECDSA keys )InvalidSignatureUnsupportedAlgorithm)default_backend)hashes serialization)ec)decode_dss_signatureencode_dss_signature) four_byte)Message)PKey)SSHException)deflate_longc @ s e Zd ZdZdd ZdS )_ECDSACurvez Represents a specific ECDSA Curve (nistp256, nistp384, etc). Handles the generation of the key format identifier and the selection of the proper hash function. Also grabs the proper curve from the 'ecdsa' package. c C sT || _ |j| _d| j | _| jdkr.tj| _n| jdkrBtj| _ntj| _|| _ d S )Necdsa-sha2- i ) nist_namekey_size key_lengthkey_format_identifierr SHA256hash_objectSHA384SHA512curve_class)selfr r r B/opt/alt/python38/lib/python3.8/site-packages/paramiko/ecdsakey.py__init__0 s z_ECDSACurve.__init__N)__name__ __module____qualname____doc__r r r r r r ' s r c @ s8 e Zd ZdZdd Zdd Zdd Zdd Zd d ZdS ) _ECDSACurveSetz A collection to hold the ECDSA curves. Allows querying by oid and by key format identifier. The two ways in which ECDSAKey needs to be able to look up curves. c C s || _ d S Necdsa_curves)r r&