def test_keycracker() :
	"""
	Uses user input to test key cracking
	"""

	e = int(raw_input("\nEnter e from public key to crack: "))
	c = int(raw_input("Enter c from public key to crack: "))

	d = miniRSA.key_cracker(e, c)
	print "\n** Private key: (%0d, %0d) **\n" % (d, c)

	message = str(raw_input("Enter message to crack (no spaces): "))

	print "Decrypted message:"
	print decrypt(message, e, c)
Esempio n. 2
0
def test_keycracker():
    """
	Uses user input to test key cracking
	"""

    e = int(raw_input("\nEnter e from public key to crack: "))
    c = int(raw_input("Enter c from public key to crack: "))

    d = miniRSA.key_cracker(e, c)
    print "\n** Private key: (%0d, %0d) **\n" % (d, c)

    message = str(raw_input("Enter message to crack (no spaces): "))

    print "Decrypted message:"
    print decrypt(message, e, c)
def test_example() :
	"""
	Automated text example for key cracking
	"""

	e, c = 277, 737

	d = miniRSA.key_cracker(e, c)
	print "\n** Private key: (%0d, %0d) **\n" % (d, c)

	message = "37,635,418,54"
	print "Message to decrypt: %s\n" % message

	print "Decrypted message:"
	print decrypt(message, e, c)
Esempio n. 4
0
def test_example():
    """
	Automated text example for key cracking
	"""

    e, c = 277, 737

    d = miniRSA.key_cracker(e, c)
    print "\n** Private key: (%0d, %0d) **\n" % (d, c)

    message = "37,635,418,54"
    print "Message to decrypt: %s\n" % message

    print "Decrypted message:"
    print decrypt(message, e, c)