File: //lib/python2.7/site-packages/rsa/key.pyc
�
N$�_c @ s� d Z d d l Z d d l Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l
Z e j e � Z
d Z d e f d � � YZ d e f d � � YZ d e f d
� � YZ e j j e d � Z d � Z d
� Z e e d � Z e d e d � Z d d d g Z e d k r�d d l Z ye x^ e d � D]P Z e j � \ Z Z e rbPn e d d k rxe s�e d k r@d e GHq@q@WWn e! k
r�d GHq�Xd GHn d S( sj RSA key generation code.
Create new keys with the newkeys() function. It will give you a PublicKey and a
PrivateKey object.
Loading and saving keys requires the pyasn1 module. This module is imported as
late as possible, such that other functionality will remain working in absence
of pyasn1.
.. note::
Storing public and private keys via the `pickle` module is possible.
However, it is insecure to load a key from an untrusted source.
The pickle module is not secure against erroneous or maliciously
constructed data. Never unpickle data received from an untrusted
or unauthenticated source.
i����N( t rangei t AbstractKeyc B s� e Z d Z d Z d � Z e d � � Z e d � � Z d � Z d � Z e d d � � Z
e d
� � Z d d � Z
d � Z d
� Z RS( s0 Abstract superclass for private and public keys.t nt ec C s | | _ | | _ d S( N( R R ( t selfR R ( ( s+ /usr/lib/python2.7/site-packages/rsa/key.pyt __init__8 s c C s d S( s� Loads a key in PKCS#1 PEM format, implement in a subclass.
:param keyfile: contents of a PEM-encoded file that contains
the public key.
:type keyfile: bytes
:return: the loaded key
:rtype: AbstractKey
N( ( t clst keyfile( ( s+ /usr/lib/python2.7/site-packages/rsa/key.pyt _load_pkcs1_pem<