Results 1 to 1 of 1

Thread: RSA encrption Help

Threaded View

  1. #1

    Thread Starter
    Fanatic Member THEROB's Avatar
    Join Date
    Oct 2000
    Location
    I'm cold and there are wolves after me
    Posts
    575

    RSA encrption Help

    Can someone please help me with understanding RSA encryption. Starting small I can encrypt and decrypt using:
    P = 11
    q = 3
    e = 3

    and
    p=17, q=11, e=7

    However when I try p = 257, q=263, e = 7, Letter for Encrption = R (ascii 82).
    I can't get it to work. I am using BigInt to do all of the math - attached is all of my code - can anyone tell where I have gone wrong

    Cheers

    Rob

    output:
    p=17, q=11, e=7
    N= 67591
    C=59156

    phi:67072
    d:38327
    C^d:433370372864891793361365563191187492639486140446836071782674040345154835633626032994202073684903 505243341240218748940410
    M:64415 - wrong
    Attached Files Attached Files
    Last edited by THEROB; Jul 21st, 2004 at 08:54 AM.
    My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width