def gen_mpi_key(): pub, pri = util.genKey() keyname = raw_input("Choose a name for the key (q to Quit): ") while 1: if keyname == "q": exit() elif keyname == "": keyname = raw_input("Choose a name for the key (q to Quit): ") elif bucket.get_key("id-%s" % keyname): print "That key name is already in use." keyname = raw_input("Choose a name for the key (q to Quit): ") else: break keyname = keyname.replace(" ", "-") pub_key = bucket.new_key("id-%s.pub" % keyname) pub_key.set_contents_from_string(s=pub, policy="private") pri_key = bucket.new_key("id-%s" % keyname) pri_key.set_contents_from_string(s=pri, policy="private") return keyname
import util padchar = 'A' (p, q), N = util.genKey(1024) p = 12716795933303046439883985133206568651800727459082108076540122730281649707218637917233431186104080427487005200961260674559436133910118906406831786959878007 q = 13034103868293556962925024008453553523621351203719798559783361102665614797778749823144453591121726712430967766321008837549224354864468178323558779647265479 N = 165752039066565011610593218583129322316755573734493004253802323087121390743169798069827240445252171405285059943217990071313492266655877987053486579193979697308720002274191979491764685736189772791061360365927537602897855800838399852922649692267089866544036755916892232533995226123404963061641392884844982420353 print 'p:', p print 'q:', q print 'N:', N
import util padchar = 'A' (p,q), N = util.genKey(1024) p = 12716795933303046439883985133206568651800727459082108076540122730281649707218637917233431186104080427487005200961260674559436133910118906406831786959878007 q = 13034103868293556962925024008453553523621351203719798559783361102665614797778749823144453591121726712430967766321008837549224354864468178323558779647265479 N = 165752039066565011610593218583129322316755573734493004253802323087121390743169798069827240445252171405285059943217990071313492266655877987053486579193979697308720002274191979491764685736189772791061360365927537602897855800838399852922649692267089866544036755916892232533995226123404963061641392884844982420353 print 'p:', p print 'q:', q print 'N:', N