![]() Q = int(input("Enter a key - this must be a prime number between 0 and 500:\n"))Įncrypted_message, N, e = encrypted, encrypted, encrypted ![]() P = int(input("Enter a key - this must be a prime number between 0 and 500:")) ![]() Message = input("Enter a message to encrypt:")Ĭhoice = input("Do you want to: \nA: enter a key \nB: use a random key?\n") The encryption function works to produce what looks like a feasible output but when I put it into the decryption function it either doesn't return the message correctly or gives me this error: ValueError: chr() arg not in range(0x110000) I've based the code off of the formulae c = m^e(mod N) and (c^d)mod N. I'm currently coding a simplified RSA algorithm for a project at school but can't get it to work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |