RSA How to find the private key to a given public key when n doesn't consist of two primes?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have the homework to find to the public key (120, 3) the private key. I guess 120 is n and 3 will be e.
So that $lfloorsqrt120rfloor=10$ I can't find a matching prime number. So it gets more complicated. I also know $phi(n)=(p-1)(q-1)$ and $3cdot dequiv 1mod (p-1)(q-1)$
But here I stuck, could somebody help me from this point on?










share|improve this question







New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2




    $120=2^3cdot 3cdot 5$ so this is indeed multi-prime RSA.
    – SEJPM♦
    4 hours ago










  • so do I need to compute $phi(n)=(2-1)^3cdot(3-1)cdot(5-1)$ and then $3cdot dequiv 1mod 8$ with $d = e = 3$?
    – baxbear
    4 hours ago










  • does multi-prime RSA make any sense in practical use?
    – baxbear
    4 hours ago










  • Multi prime RSA can be usefull as long as you keep all primes large. I read a while ago a proposal to use multiprime RSA for post quantom encryption relying on a large polynomial advantage for honest user over attacker. I liked not requiring expononetial advantage as usuall.
    – Meir Maor
    20 mins ago














up vote
1
down vote

favorite












I have the homework to find to the public key (120, 3) the private key. I guess 120 is n and 3 will be e.
So that $lfloorsqrt120rfloor=10$ I can't find a matching prime number. So it gets more complicated. I also know $phi(n)=(p-1)(q-1)$ and $3cdot dequiv 1mod (p-1)(q-1)$
But here I stuck, could somebody help me from this point on?










share|improve this question







New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2




    $120=2^3cdot 3cdot 5$ so this is indeed multi-prime RSA.
    – SEJPM♦
    4 hours ago










  • so do I need to compute $phi(n)=(2-1)^3cdot(3-1)cdot(5-1)$ and then $3cdot dequiv 1mod 8$ with $d = e = 3$?
    – baxbear
    4 hours ago










  • does multi-prime RSA make any sense in practical use?
    – baxbear
    4 hours ago










  • Multi prime RSA can be usefull as long as you keep all primes large. I read a while ago a proposal to use multiprime RSA for post quantom encryption relying on a large polynomial advantage for honest user over attacker. I liked not requiring expononetial advantage as usuall.
    – Meir Maor
    20 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have the homework to find to the public key (120, 3) the private key. I guess 120 is n and 3 will be e.
So that $lfloorsqrt120rfloor=10$ I can't find a matching prime number. So it gets more complicated. I also know $phi(n)=(p-1)(q-1)$ and $3cdot dequiv 1mod (p-1)(q-1)$
But here I stuck, could somebody help me from this point on?










share|improve this question







New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have the homework to find to the public key (120, 3) the private key. I guess 120 is n and 3 will be e.
So that $lfloorsqrt120rfloor=10$ I can't find a matching prime number. So it gets more complicated. I also know $phi(n)=(p-1)(q-1)$ and $3cdot dequiv 1mod (p-1)(q-1)$
But here I stuck, could somebody help me from this point on?







rsa






share|improve this question







New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









baxbear

62




62




New contributor




baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






baxbear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 2




    $120=2^3cdot 3cdot 5$ so this is indeed multi-prime RSA.
    – SEJPM♦
    4 hours ago










  • so do I need to compute $phi(n)=(2-1)^3cdot(3-1)cdot(5-1)$ and then $3cdot dequiv 1mod 8$ with $d = e = 3$?
    – baxbear
    4 hours ago










  • does multi-prime RSA make any sense in practical use?
    – baxbear
    4 hours ago










  • Multi prime RSA can be usefull as long as you keep all primes large. I read a while ago a proposal to use multiprime RSA for post quantom encryption relying on a large polynomial advantage for honest user over attacker. I liked not requiring expononetial advantage as usuall.
    – Meir Maor
    20 mins ago












  • 2




    $120=2^3cdot 3cdot 5$ so this is indeed multi-prime RSA.
    – SEJPM♦
    4 hours ago










  • so do I need to compute $phi(n)=(2-1)^3cdot(3-1)cdot(5-1)$ and then $3cdot dequiv 1mod 8$ with $d = e = 3$?
    – baxbear
    4 hours ago










  • does multi-prime RSA make any sense in practical use?
    – baxbear
    4 hours ago










  • Multi prime RSA can be usefull as long as you keep all primes large. I read a while ago a proposal to use multiprime RSA for post quantom encryption relying on a large polynomial advantage for honest user over attacker. I liked not requiring expononetial advantage as usuall.
    – Meir Maor
    20 mins ago







2




2




$120=2^3cdot 3cdot 5$ so this is indeed multi-prime RSA.
– SEJPM♦
4 hours ago




$120=2^3cdot 3cdot 5$ so this is indeed multi-prime RSA.
– SEJPM♦
4 hours ago












so do I need to compute $phi(n)=(2-1)^3cdot(3-1)cdot(5-1)$ and then $3cdot dequiv 1mod 8$ with $d = e = 3$?
– baxbear
4 hours ago




so do I need to compute $phi(n)=(2-1)^3cdot(3-1)cdot(5-1)$ and then $3cdot dequiv 1mod 8$ with $d = e = 3$?
– baxbear
4 hours ago












does multi-prime RSA make any sense in practical use?
– baxbear
4 hours ago




does multi-prime RSA make any sense in practical use?
– baxbear
4 hours ago












Multi prime RSA can be usefull as long as you keep all primes large. I read a while ago a proposal to use multiprime RSA for post quantom encryption relying on a large polynomial advantage for honest user over attacker. I liked not requiring expononetial advantage as usuall.
– Meir Maor
20 mins ago




Multi prime RSA can be usefull as long as you keep all primes large. I read a while ago a proposal to use multiprime RSA for post quantom encryption relying on a large polynomial advantage for honest user over attacker. I liked not requiring expononetial advantage as usuall.
– Meir Maor
20 mins ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote














I also know $phi(n)=(p-1)(q-1)$




This actually only holds if $n=pq$ and if $p$ and $q$ are both primes.



When $n$ doesn't factor as nicely you'll need the more general definition of $phi(n)$ which can be computed from the following three axioms (given the prime factorization of $n$):



  • If $gcd(n,m)=1$ for any $n,m$ then $phi(ncdot m)=phi(n)phi(m)$

  • If $p$ is prime and $kgeq 1$ then $phi(p^k)=p^k-1(p-1)$

So in your case $$phi(120)=phi(2^3cdot 3cdot 5)=phi(2^3)phi(3)phi(5)=(2^2cdot1)cdot2cdot4=32$$




does multi-prime RSA make any sense in practical use?




Yes, using more than two primes can make sense if you use the chinese remainder theorem (CRT) which yields a speed-up of $k^2/4$ for $k$ primes compared to using only $k=2$. See fgrieu's excellent answer for a discussion of why one wants that and what one has to look out for when actually deploying multi-prime RSA and the table in DW's answer to the same question for an overview of how many primes to use for each modulus size.






share|improve this answer






















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "281"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    baxbear is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f62567%2frsa-how-to-find-the-private-key-to-a-given-public-key-when-n-doesnt-consist-of%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote














    I also know $phi(n)=(p-1)(q-1)$




    This actually only holds if $n=pq$ and if $p$ and $q$ are both primes.



    When $n$ doesn't factor as nicely you'll need the more general definition of $phi(n)$ which can be computed from the following three axioms (given the prime factorization of $n$):



    • If $gcd(n,m)=1$ for any $n,m$ then $phi(ncdot m)=phi(n)phi(m)$

    • If $p$ is prime and $kgeq 1$ then $phi(p^k)=p^k-1(p-1)$

    So in your case $$phi(120)=phi(2^3cdot 3cdot 5)=phi(2^3)phi(3)phi(5)=(2^2cdot1)cdot2cdot4=32$$




    does multi-prime RSA make any sense in practical use?




    Yes, using more than two primes can make sense if you use the chinese remainder theorem (CRT) which yields a speed-up of $k^2/4$ for $k$ primes compared to using only $k=2$. See fgrieu's excellent answer for a discussion of why one wants that and what one has to look out for when actually deploying multi-prime RSA and the table in DW's answer to the same question for an overview of how many primes to use for each modulus size.






    share|improve this answer


























      up vote
      3
      down vote














      I also know $phi(n)=(p-1)(q-1)$




      This actually only holds if $n=pq$ and if $p$ and $q$ are both primes.



      When $n$ doesn't factor as nicely you'll need the more general definition of $phi(n)$ which can be computed from the following three axioms (given the prime factorization of $n$):



      • If $gcd(n,m)=1$ for any $n,m$ then $phi(ncdot m)=phi(n)phi(m)$

      • If $p$ is prime and $kgeq 1$ then $phi(p^k)=p^k-1(p-1)$

      So in your case $$phi(120)=phi(2^3cdot 3cdot 5)=phi(2^3)phi(3)phi(5)=(2^2cdot1)cdot2cdot4=32$$




      does multi-prime RSA make any sense in practical use?




      Yes, using more than two primes can make sense if you use the chinese remainder theorem (CRT) which yields a speed-up of $k^2/4$ for $k$ primes compared to using only $k=2$. See fgrieu's excellent answer for a discussion of why one wants that and what one has to look out for when actually deploying multi-prime RSA and the table in DW's answer to the same question for an overview of how many primes to use for each modulus size.






      share|improve this answer
























        up vote
        3
        down vote










        up vote
        3
        down vote










        I also know $phi(n)=(p-1)(q-1)$




        This actually only holds if $n=pq$ and if $p$ and $q$ are both primes.



        When $n$ doesn't factor as nicely you'll need the more general definition of $phi(n)$ which can be computed from the following three axioms (given the prime factorization of $n$):



        • If $gcd(n,m)=1$ for any $n,m$ then $phi(ncdot m)=phi(n)phi(m)$

        • If $p$ is prime and $kgeq 1$ then $phi(p^k)=p^k-1(p-1)$

        So in your case $$phi(120)=phi(2^3cdot 3cdot 5)=phi(2^3)phi(3)phi(5)=(2^2cdot1)cdot2cdot4=32$$




        does multi-prime RSA make any sense in practical use?




        Yes, using more than two primes can make sense if you use the chinese remainder theorem (CRT) which yields a speed-up of $k^2/4$ for $k$ primes compared to using only $k=2$. See fgrieu's excellent answer for a discussion of why one wants that and what one has to look out for when actually deploying multi-prime RSA and the table in DW's answer to the same question for an overview of how many primes to use for each modulus size.






        share|improve this answer















        I also know $phi(n)=(p-1)(q-1)$




        This actually only holds if $n=pq$ and if $p$ and $q$ are both primes.



        When $n$ doesn't factor as nicely you'll need the more general definition of $phi(n)$ which can be computed from the following three axioms (given the prime factorization of $n$):



        • If $gcd(n,m)=1$ for any $n,m$ then $phi(ncdot m)=phi(n)phi(m)$

        • If $p$ is prime and $kgeq 1$ then $phi(p^k)=p^k-1(p-1)$

        So in your case $$phi(120)=phi(2^3cdot 3cdot 5)=phi(2^3)phi(3)phi(5)=(2^2cdot1)cdot2cdot4=32$$




        does multi-prime RSA make any sense in practical use?




        Yes, using more than two primes can make sense if you use the chinese remainder theorem (CRT) which yields a speed-up of $k^2/4$ for $k$ primes compared to using only $k=2$. See fgrieu's excellent answer for a discussion of why one wants that and what one has to look out for when actually deploying multi-prime RSA and the table in DW's answer to the same question for an overview of how many primes to use for each modulus size.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 3 hours ago

























        answered 3 hours ago









        SEJPM♦

        26.6k350128




        26.6k350128




















            baxbear is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            baxbear is a new contributor. Be nice, and check out our Code of Conduct.












            baxbear is a new contributor. Be nice, and check out our Code of Conduct.











            baxbear is a new contributor. Be nice, and check out our Code of Conduct.













             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f62567%2frsa-how-to-find-the-private-key-to-a-given-public-key-when-n-doesnt-consist-of%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            What does second last employer means? [closed]

            One-line joke