# Path: mom/security/rsa/keys.py
# ZERO_BYTE = _compat.ZERO_BYTE
# SHA1_DIGESTINFO = b("""\
# \x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00\x04\x14""")
# SHA1_DIGESTINFO_LEN = len(SHA1_DIGESTINFO)
# ZERO_ONE_BYTES = b("\x00\x01")
# FF_BYTE = b("\xff")
# def pkcs1_v1_5_encode(key_size, data):
#   def __init__(self,
#                key_info,
#                encoded_key,
#                encoding,
#                *unused_args,
#                **unused_kwargs):
#   def encoded_key(self):
#   def encoding(self):
#   def key(self):
#   def size(self):
#   def key_info(self):
#   def sign(self, digest):
#   def verify(self, digest, signature_bytes):
#   def pkcs1_v1_5_sign(self, digest):
#   def pkcs1_v1_5_verify(self, digest, signature_bytes):
#   def _sign(self, digest):
#   def _verify(self, digest, signature):
# class Key(object):
# class PrivateKey(Key):
# class PublicKey(Key):


from Crypto import PublicKey
from mom.security.rsa import keys
        self.key_info["prime2"],
        #self.key_info["exponent1"],
        #self.key_info["exponent2"],
        #self.key_info["coefficient"],
        )
    self._key = PublicKey.RSA.construct(key_info_args)

  def _sign(self, digest):
    """
    Sign the digest.
    """
    return self.key.sign(digest, "")[0]

  def _verify(self, digest, signature):
    """
    Verify signature against digest signed by public key.
    """
    #public_key = self.key.publickey()
    #return public_key.verify(digest, (signature,))
    return self.key.verify(digest, (signature,))

  @property
  def key(self):
    return self._key

  @property
  def size(self):
    return self.key.n



# Path: mom/security/rsa/keys.py
# ZERO_BYTE = _compat.ZERO_BYTE
# SHA1_DIGESTINFO = b("""\
# \x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00\x04\x14""")
# SHA1_DIGESTINFO_LEN = len(SHA1_DIGESTINFO)
# ZERO_ONE_BYTES = b("\x00\x01")
# FF_BYTE = b("\xff")
# def pkcs1_v1_5_encode(key_size, data):
#   def __init__(self,
#                key_info,
#                encoded_key,
#                encoding,
#                *unused_args,
#                **unused_kwargs):
#   def encoded_key(self):
#   def encoding(self):
#   def key(self):
#   def size(self):
#   def key_info(self):
#   def sign(self, digest):
#   def verify(self, digest, signature_bytes):
#   def pkcs1_v1_5_sign(self, digest):
#   def pkcs1_v1_5_verify(self, digest, signature_bytes):
#   def _sign(self, digest):
#   def _verify(self, digest, signature):
# class Key(object):
# class PrivateKey(Key):
# class PublicKey(Key):


# Path: mom/security/rsa/pycrypto.py
from Crypto import PublicKey
from mom.security.rsa import keys

        self.key_info["prime2"],
        #self.key_info["exponent1"],
        #self.key_info["exponent2"],
        #self.key_info["coefficient"],
        )
    self._key = PublicKey.RSA.construct(key_info_args)

  def _sign(self, digest):
    """
    Sign the digest.
    """
    return self.key.sign(digest, "")[0]

  def _verify(self, digest, signature):
    """
    Verify signature against digest signed by public key.
    """
    #public_key = self.key.publickey()
    #return public_key.verify(digest, (signature,))
    return self.key.verify(digest, (signature,))

  @property
  def key(self):
    return self._key

  @property
  def size(self):
    return self.key.n



class PublicKey(keys.PublicKey):