Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)
Generate a new RSA keypair with 'bits' bits and exponent 'e'.  It is
safe to use the default value of 'e'.

        def pk_generate(bits=1024,e=65537):
    """Generate a new RSA keypair with 'bits' bits and exponent 'e'.  It is
       safe to use the default value of 'e'.
    return _ml.rsa_generate(bits,e)

src/m/i/mixminion-HEAD/lib/mixminion/server/ServerKeys.py   mixminion(Download)
            LOG.info("Generating identity key. (This may take a while.)")
            key = mixminion.Crypto.pk_generate(bits)
            mixminion.Crypto.pk_PEM_save(key, fn, password)
            LOG.info("Generated %s-bit identity key.", bits)
    def _newTLSContext(self, now=None):
        """Create and return a TLS context."""
        if now is None:
            now = time.time()
        mmtpKey = mixminion.Crypto.pk_generate(MMTP_KEY_BYTES*8)
        # First, we generate both of our short-term keys...
        packetKey = mixminion.Crypto.pk_generate(PACKET_KEY_BYTES*8)
        # ...and save them to disk, setting up our directory structure while

src/m/i/mixminion-HEAD/lib/mixminion/directory/Directory.py   mixminion(Download)
        if not os.path.exists(fname):
            print "No public key found; generating new key..."
            key = mixminion.Crypto.pk_generate(2048)
            mixminion.Crypto.pk_PEM_save(key, fname)
            return key

src/m/i/mixminion-HEAD/lib/mixminion/directory/DirMain.py   mixminion(Download)
from mixminion.Config import ConfigError
from mixminion.Crypto import init_crypto, pk_fingerprint, pk_generate, \
     pk_PEM_load, pk_PEM_save
from mixminion.directory.Directory import Directory, DirectoryConfig

src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        lst = ServerList(baseDir, cfg)
        identity = Crypto.pk_generate(2048)
        now = time.time()