import tkinter as tk import math window = tk.Tk() window.title(\"RSA Encryption/Decryption\") window.geometry(\"500x500\") #screen.configure(background=\"black\") #functions def Modulus(): p = int(p_input1.get()) q = int(q_input1.get()) n = p*q    open_text...

60.1K

Verified Solution

Question

Programming

import tkinter as tk
import math

window = tk.Tk()
window.title(\"RSA Encryption/Decryption\")
window.geometry(\"500x500\")
#screen.configure(background=\"black\")

#functions
def Modulus():
p = int(p_input1.get())
q = int(q_input1.get())
n = p*q

  
open_text = tk.Label(text=\"Keep your Messages Secure\", fg =\"white\", bg = \"blue\")
open_text.pack()


Encryp_text = tk.Label(text=\"Encryption\", fg=\"white\",bg=\"red\")
Encryp_text.place(x=200, y=35)

Decryp_text = tk.Label(text=\"Decryption\", fg=\"white\",bg=\"green\")
Decryp_text.place(x=200, y=270)

p_input=tk.Label(text=\"Enter the value of P: \")
p_input.place(x=10, y=58)

p_input1=tk.Entry()
p_input1.place(x = 130, y=58)

q_input=tk.Label(text=\"Enter the value of q:\")
q_input.place(x=10, y=78)

q_input1=tk.Entry()
q_input1.place(x = 130, y=78)


mod = tk.Label(text= \"RSA Modulus(n)is: \",command = Modulus)
mod.place(x=10, y=100)

window.mainloop()

i'm not able to get the result which is the value of n. can youplease help with this?

Answer & Explanation Solved by verified expert
4.1 Ratings (572 Votes)
For this program the control with the name mod should not be alabel it should be a button which must be created asmod tkButtontext RSA Modulusnis command ModulusThe button control has command argumentTo display the result ie value of n a label is created insidethe Modulus function to which value of n is assigned afterconverting n to    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students