Explore BrainMass

Explore BrainMass

    Numerical example of encryption using the RSA method

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Please see the file below about encoding a birthday.
    For example the birthday is 250692, how to calculate?

    Exercise 2: Encode your date of birth (format DDMMYY) using the public key:

    n = 536813567

    a = 7582663

    (Use the correspondence 0 <-> 0, 1 <-> 1, ..., 9 <-> 9 and work in base 10 to encode this message.)

    © BrainMass Inc. brainmass.com December 24, 2021, 11:44 pm ad1c9bdddf
    https://brainmass.com/math/number-theory/numerical-encryption-rsa-method-598049

    Attachments

    SOLUTION This solution is FREE courtesy of BrainMass!

    The theory of RSA encryption states the following

    Choose two large numbers p and q and compute n = p*q
    Compute phi = (p-1)*(q-1)
    Choose a prime number a that is coprime with phi
    Compute the multiplicative inverse of phi w.r.t. i.e. d = a-1(phi)
    The numbers n and a shared as the public and private keys
    The encryption algorithm for any given number M is
    N = Ma mod n
    The encrypted number N along with the keys n and a are shared
    The decryption algorithm for crypted value N is
    M = Nd mod n

    In the present case

    n = 536813567 and a = 7582663
    Breaking it into factors we find 536813567 = 8191 X 65537
    Hence phi = 8190 X 65536 = 536739840

    (Hint: the following weblink can help www.math.wustl.edu/cgi-bin/primes)

    Now d = 7582663-1 536739840 = 38411

    (Hint: The following weblink can help www.cs.princeton.edu/~dsri)

    Let's assume 25061992 as the date of birth
    The encrypted number is N = 250619927582663 mod 536813567
    The decryption algorithm is M = N38411 mod 536813567

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    © BrainMass Inc. brainmass.com December 24, 2021, 11:44 pm ad1c9bdddf>
    https://brainmass.com/math/number-theory/numerical-encryption-rsa-method-598049

    Attachments

    ADVERTISEMENT