CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2015
    Posts
    8

    RSA encryption algorithm in logarithm .

    Factorization and primality test of Lepore-Santo in log [(Y-X)/6]+1

    http://howtodecodersa.altervista.org...-in-logarithm/

    thanks in advance for your opinions

  2. #2
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    Factorization and primality test of Lepore-Santo in log [(Y-X)/6]+1

    I will show you the basic example, that i sto say the factorization of two prime numbers because reterating this process we can factor any number.

    Each number NR (not multiple of 2 and 3) divided by six gives as decimal 1666p and 8333p (the p is periodic) as for each NR module six we will have

    1/6= 0,1666p

    2 is divisible by 2

    3 is divisible by 3

    4 is divisible by 2

    5/6=0,8333p

    6 is divisible by 2and 3

    and this is the same if we start from 1 , doing before +4 and then +2 , so the set of numbers not multiple of 2 and 3 will be:

    1
    1+4=5
    5+2=7
    7+4=11
    11+2=13
    13+4=17
    17+2=19
    19+4=23
    23+2=25
    25+4=29
    29+2=31
    …..
    …..
    ecc.ecc.

    So we can see this:

    5*5; 25+(1*30) ; 25+(2*30); 25+(3*30); ecc.
    5*7; 35+(1*30) ; 35+(2*30); 35+(3*30); ecc.
    7*7; 49+(1*42); 49+(2*42); ecc. ecc.
    7*11; 77+(1*42); 77+(2*42); ecc. ecc.

    From this we can derive the three equations:

    X^2+n*(X*6)=NR
    X*(X+2)+n(X*6)=NR
    X*(X+4)+n(X*6)=NR

    n=(Y-X)/6 in the first equation
    n=(Y-X-2)/6 in the second equation
    n=(Y-X-4)/6 in the third equation

    So if we find the value of n we can get X.

    Alberico Lepore 12/04/2015

    The idea is to divide by 2 the n until to come at n = 1 (so test for n = 1 if the equation transformed produced results).

    If n is even it’s okay, but if n is odd we must remove 1 and divide by two.

    How the algorithm works.

    Consider 6001=17*357
    given that 6001/6=1000,1666p and therefore has as part decimal 1666p we will use the first equation, in fact:

    X ^ 2 + n * (X * 6) = 6001

    and n = 56

    Don’t worry if you don’t understand how I know if n is equal or odd I’ll tell you later.

    then

    56/2 = 28

    2/28 = 14

    14/2 = 7 so 7-1 = 6

    6/2 = 3 so 3-1 = 2

    2/1 = 1

    So the sequence is

    Even

    E

    E

    Odd

    O

    Then we can modify X ^ 2 + n * (X * 6) = 6001 to

    X ^ 2 + n * (X * 12) = 6001

    X ^ 2 + n * (X * 24) = 6001

    X ^ 2 + n * (X * 48) = 6001

    We are in the odd so remove 1 to n that means adding X*48 more divide by 2:

    X^2+n*(X*96)+48X=6001

    yet odd so

    X^2+n*(X*192)+96X+48X=6001 that better written is

    X^2+n*(X*192)+144X=6001 for n = 1

    X^2+(X*336)=6001 we will have X = 17

    Now let’s see how do to decide if n is even or odd

    we bring the equation in the form

    n*X=(6001 – X^2)/6

    The left part is equal to the right part so if one is equal , is equal also the other ; if one is odd, is odd the other also.

    We have to consider that X is always odd then n * X will be even if n is even and will be odd if n is odd.

    We see the procedure with an example

    6001/6=1000,166p

    (X^2)/6=k,1666 because squares are always in this form

    So we remove 0,1666p to 1000,1666p and we remove to K, 1666p that will become k

    then we would have 1000-k that is an integer and we need to evaluate if it is even or is odd

    we have to find the integer values of n.

    So the equation x^2 + n*(6x) = 6001

    k is always even because

    x^2=(6k+5)^2=36k^2+60k+25

    or

    x^2=(6k+1)^2=36k^2+12k+1

    if you take away one and divide by 6 both are equal it follows.

    So 1000-k is even and then n is even

    So the new equation will be x ^ 2 + n * (12x) = 6001 , we divide by 2



    n(i) is odd if n(i)^2=odd

    then

    n(i) is odd if NR(i)=((NR-1)/6)/(i*2)=odd

    1) if n(i) is odd and NR(i) is odd and k(i) is even we have to subtract 3 at NR(i) and 2 at k(i); then divide by 2, n(i)

    2) if n(i) is odd and NR(i) is even and k(i) is odd we have to subtract 2 at NR(i) and 1 at k(i) ; then divide by 2, n(i)

    3) if n(i) is even and NR(i) is odd and k(i) is odd we have to subtract 1 at NR(i) and 1 at k(i) ; then divide by 2, n(i)

    1000=even then n=even

    1000/2=500

    500=even then n/2=even

    500/2=250

    250=even then n/4=even

    250/2=125

    125=odd then n/8=odd

    125=odd then n/8=odd then that k/8=even

    for the 1) we have to subtract 3 a 125 then 125-3=122

    122/2=61

    61=odd then n/8=odd

    ————————————————————————————————————————————————————-

    For cases NR / 6 = k, 83333 behave similarly.

    only

    NR + 1 and is divided by 6 if n * X = (NR – X ^ 2 + 2) / 6.

    NR – 5 and divide by 6 if n * X = (NR – X ^ 2 + 4) / 6.

    then complexity is log[(Y-X-2)/6]+log[(Y-X-4)/6]

    Alberico Lepore, Ruggiero Santo 23/04/2015

  3. #3
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    Sorry.

    this part

    For cases NR / 6 = k, 83333 behave similarly.

    only

    NR + 1 and is divided by 6 if n * X = (NR – X ^ 2 + 2) / 6.

    NR – 5 and divide by 6 if n * X = (NR – X ^ 2 + 4) / 6.

    then complexity is log[(Y-X-2)/6]+log[(Y-X-4)/6]
    is

    only

    NR + 1 and is divided by 6

  4. #4
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    better that way

    For cases NR / 6 = k, 83333 behave similarly.

    NR^2=H,1666

    the new equation will be: Z^2+n*(Z*6)=NR where Z=X^2

    Z is proceeding normally, and X= the square root of Z.

    The time taken will log{[(Y-X)^2]/6}+1

  5. #5
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    Complete solution

    Factorization and primality test of Lepore-Santo in log [(Y-X)/6]+1

    I will show you the basic example, that i sto say the factorization of two prime numbers because reterating this process we can factor any number.

    Each number NR (not multiple of 2 and 3) divided by six gives as decimal 1666p and 8333p (the p is periodic) as for each NR module six we will have

    1/6= 0,1666p

    2 is divisible by 2

    3 is divisible by 3

    4 is divisible by 2

    5/6=0,8333p

    6 is divisible by 2and 3

    and this is the same if we start from 1 , doing before +4 and then +2 , so the set of numbers not multiple of 2 and 3 will be:

    1
    1+4=5
    5+2=7
    7+4=11
    11+2=13
    13+4=17
    17+2=19
    19+4=23
    23+2=25
    25+4=29
    29+2=31
    …..
    …..
    ecc.ecc.

    So we can see this:

    5*5; 25+(1*30) ; 25+(2*30); 25+(3*30); ecc.
    5*7; 35+(1*30) ; 35+(2*30); 35+(3*30); ecc.
    7*7; 49+(1*42); 49+(2*42); ecc. ecc.
    7*11; 77+(1*42); 77+(2*42); ecc. ecc.

    From this we can derive the three equations:

    X^2+n*(X*6)=NR
    X*(X+2)+n(X*6)=NR
    X*(X+4)+n(X*6)=NR

    n=(Y-X)/6 in the first equation
    n=(Y-X-2)/6 in the second equation
    n=(Y-X-4)/6 in the third equation

    So if we find the value of n we can get X.

    Alberico Lepore 12/04/2015

    The idea is to divide by 2 the n until to come at n = 1 (so test for n = 1 if the equation transformed produced results).

    If n is even it’s okay, but if n is odd we must remove 1 and divide by two.

    How the algorithm works.

    Consider 6001=17*357
    given that 6001/6=1000,1666p and therefore has as part decimal 1666p we will use the first equation, in fact:

    X ^ 2 + n * (X * 6) = 6001

    and n = 56

    Don’t worry if you don’t understand how I know if n is equal or odd I’ll tell you later.

    then

    56/2 = 28

    2/28 = 14

    14/2 = 7 so 7-1 = 6

    6/2 = 3 so 3-1 = 2

    2/1 = 1

    So the sequence is

    Even

    E

    E

    Odd

    O

    Then we can modify X ^ 2 + n * (X * 6) = 6001 to

    X ^ 2 + n * (X * 12) = 6001

    X ^ 2 + n * (X * 24) = 6001

    X ^ 2 + n * (X * 48) = 6001

    We are in the odd so remove 1 to n that means adding X*48 more divide by 2:

    X^2+n*(X*96)+48X=6001

    yet odd so

    X^2+n*(X*192)+96X+48X=6001 that better written is

    X^2+n*(X*192)+144X=6001 for n = 1

    X^2+(X*336)=6001 we will have X = 17

    Now let’s see how do to decide if n is even or odd

    we bring the equation in the form

    n*X=(6001 – X^2)/6

    The left part is equal to the right part so if one is equal , is equal also the other ; if one is odd, is odd the other also.

    We have to consider that X is always odd then n * X will be even if n is even and will be odd if n is odd.

    We see the procedure with an example

    6001/6=1000,166p

    (X^2)/6=k,1666 because squares are always in this form

    So we remove 0,1666p to 1000,1666p and we remove to K, 1666p that will become k

    then we would have 1000-k that is an integer and we need to evaluate if it is even or is odd

    we have to find the integer values of n.

    So the equation x^2 + n*(6x) = 6001

    k is always even because

    x^2=(6k+5)^2=36k^2+60k+25

    or

    x^2=(6k+1)^2=36k^2+12k+1

    if you take away one and divide by 6 both are equal it follows.

    So 1000-k is even and then n is even

    So the new equation will be x ^ 2 + n * (12x) = 6001 , we divide by 2



    n(i) is odd if n(i)/2=not integer e k(i) is even



    1) if n(i) is odd and NR(i) is odd and k(i) is even we have to subtract 3 at NR(i) and 2 at k(i); then divide by 2, n(i)

    2) if n(i) is odd and NR(i) is even and k(i) is odd we have to subtract 2 at NR(i) and 1 at k(i) ; then divide by 2, n(i)

    3) if n(i) is even and NR(i) is odd and k(i) is odd we have to subtract 1 at NR(i) and 1 at k(i) ; then divide by 2, n(i)



    1000/2=500

    500=integer then n=even

    500/2=250

    250=integer then n/2=even

    250/2=125

    125=integer then n/4=even

    125/2=62,5

    62,5=not integer then n/4=odd

    then 125 – k/8=odd then k/8=even

    for the 1) we have to subtract 3 a 125 then 125-3=122

    122/2=61

    61/2=30,5

    30,5=not integer then n/8=odd

    ————————————————————————————————————————————————————-

    For cases NR / 6 = k, 83333 behave similarly.

    NR^2=H,1666

    the new equation will be: Z^2+n*(Z*6)=NR where Z=X^2

    Z is proceeding normally, and X= the square root of Z.

    The time taken will log{[(Y-X)^2]/6}+1

    Alberico Lepore, Ruggiero Santo 23/04/2015

  6. #6
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    final solution

    Factorization and primality test of Lepore-Santo in logarithm

    I will show you the basic example, that i sto say the factorization of two prime numbers because reterating this process we can factor any number.

    Each number NR (not multiple of 2 and 3) divided by six gives as decimal 1666p and 8333p (the p is periodic) as for each NR module six we will have

    1/6= 0,1666p

    2 is divisible by 2

    3 is divisible by 3

    4 is divisible by 2

    5/6=0,8333p

    6 is divisible by 2and 3

    and this is the same if we start from 1 , doing before +4 and then +2 , so the set of numbers not multiple of 2 and 3 will be:

    1

    1+4=5

    5+2=7

    7+4=11

    11+2=13

    13+4=17

    17+2=19

    19+4=23

    23+2=25

    25+4=29

    29+2=31

    …..

    …..

    ecc.ecc.

    So we can see this:

    5*5; 25+(1*30) ; 25+(2*30); 25+(3*30); ecc.

    5*7; 35+(1*30) ; 35+(2*30); 35+(3*30); ecc.

    7*7; 49+(1*42); 49+(2*42); ecc. ecc.

    7*11; 77+(1*42); 77+(2*42); ecc. ecc.

    From this we can derive the three equations:

    X^2+n*(X*6)=NR

    X*(X+2)+n(X*6)=NR

    X*(X+4)+n(X*6)=NR

    n=(Y-X)/6 in the first equation

    n=(Y-X-2)/6 in the second equation

    n=(Y-X-4)/6 in the third equation

    So if we find the value of n we can get X.

    Alberico Lepore 12/04/2015

    ———————————————————————————-

    Ora vediamo come facciamo a trovare il valore di n.

    portiamo l’equazione nella forma

    n*X=(6001 – X^2)/6

    La parte a sinistra è uguale alla parte di destra quindi se è pari una è pari anche l’altra , se è dipari una è dispari anche l’altra.

    Dobbiamo considerare che X è sempre dispari quindi n*X sarÃ* pari se n è pari e sarÃ* dispari se n è dipari.

    Vediamo con un esempio il procedimento.

    6001/6=1000,166p

    (X^2)/6=k,1666 perchè i quadrati sono sempre in questa forma

    Quindi togliamo 0,1666p a 1000,1666p e lo togliamo a K,1666p che diventerÃ* k

    quindi avremmo 1000-k che è un intero ed è da valutare se è pari o è dispari

    noi dobbiamo trovare i valori interi di n

    Quindi l’equazione x^2 + n*(6x) = 6001

    k è sempre pari perchè

    x^2=(6h+5)^2=36h^2+60h+25

    oppure

    x^2=(6h+1)^2=36h^2+12h+1

    ad entrambe se togliete 1 e dividete per 6 sono pari
    ne segue

    quindi 1000-k è pari e quindi n è intero pari

    ————————————————————————————————————————————————————

    Algoritmo

    7201

    1) controlliamo se 7201/6=G,16666=OK

    2) facciamo la divisione per 6 di NR-1 fino ad uno, i decimali devono essere solo 0,0 oppure 0,5

    (7201-1)/6=1200

    3) dividiamo per 2 fino ad uno, i decimali devono essere solo 0,0 oppure 0,5

    NR=7201
    1200
    600
    300
    150
    75
    37,5
    18,5
    9
    4,5
    2
    1

    4) prendiamo l’insieme{ 2 ; 2,5 ; 3; 3,5 } e sottraiamo uno per volta dal terzo numero a partire da sotto (e cioè 4,5) che chiamiamo NR1.

    Il risultato della sottrazione chiamiamolo k1.
    quindi fai n=k1*2^PROF dove PROF è la profonditÃ* cioè

    1200->PROF=0

    600->PROF=1

    300->PROF=2

    ecc.ecc.
    Se NR1 è intero e n1 ha parte decimale 0,5 allora prendi [0,5*2*(PROF-1)] e lo addizioni ad n sostituisci la nuova n nell’equazione;
    se non va bene riinizi dallo step successivo; se va bene il gioco è fatto.

    ——————————————————————————————————————————————————————

    ESEMPI:

    7201

    7201/6=1200,1666…

    (7201-1)/6=1200

    NR=7201
    1200
    600
    300
    150
    75
    37,5
    18,5
    9
    4,5

    Proviamo con 2

    4,5-2=2,5 non intero quindi 0,5*(2^7)=64

    2,5*(2^8)=

    1200-640-64=496

    per n=496

    X^2 + (6 * 496 * X) =7201

    non abbiamo soluzioni intere quindi non va bene

    non va bene devi riiniziare da 4,5 provare con 2,5
    non va bene devi riiniziare da 4,5 provare con 3
    non va bene devi riiniziare da 4,5 provare con 3,5

    non va bene devi riiniziare da 9 provare con 2
    non va bene devi riiniziare da 9 provare con 2,5
    non va bene devi riiniziare da 9 provare con 3
    non va bene devi riiniziare da 9 provare con 3,5

    non va bene devi riiniziare da 18,5 provare con 2
    non va bene devi riiniziare da 18,5 provare con 2,5
    non va bene devi riiniziare da 18,5 provare con 3
    non va bene devi riiniziare da 18,5 provare con 3,5

    non va bene devi riiniziare da 37,5 provare con 2
    non va bene devi riiniziare da 37,5 provare con 2,5
    non va bene devi riiniziare da 37,5 provare con 3
    non va bene devi riiniziare da 37,5 provare con 3,5

    non va bene devi riiniziare da 75 provare con 2
    non va bene devi riiniziare da 75 provare con 2,5
    non va bene devi riiniziare da 75 provare con 3
    non va bene devi riiniziare da 75 provare con 3,5

    vediamo tutti i passaggi da 75 provando con 3,5

    75-3,5=71,5 non intero quindi 0,5*(2^3)=4

    71,5*(2^4)=1144

    1200-1144-4=60

    per n=60

    X^2 + (6 * 60 * X) =7201

    e troviamo X=19

    ————————————————————————————————————————————————————-

    Per i casi NR/6=k,83333 ci si comporta analogamente.






    Alberico Lepore, Ruggiero Santo 26/04/2015

    clearly it is here, in Italian http://howtodecodersa.altervista.org...lepore-in-log/
    Last edited by AlbericoLepore; April 27th, 2015 at 04:24 AM.

  7. #7
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    27/04/2015
    I posted the final solution can give me an opinion?
    thanks in advance for your opinions
    Last edited by AlbericoLepore; April 27th, 2015 at 03:31 AM.

  8. #8
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: RSA encryption algorithm in logarithm .

    And the point of all of this is... ???

  9. #9
    Join Date
    Apr 2015
    Posts
    8

    Re: RSA encryption algorithm in logarithm .

    learn, experiment, innovate, understand, reflect , go beyond........etc.etc.

  10. #10
    Join Date
    Jul 2013
    Posts
    576

    Re: RSA encryption algorithm in logarithm .

    Quote Originally Posted by AlbericoLepore View Post
    learn, experiment, innovate, understand, reflect , go beyond........etc.etc.
    To achieve that in a forum like this you need to formulate specific consise focused problems accessible to people who are not specialists in your field of technology.

    Also use English throughout.

  11. #11
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: RSA encryption algorithm in logarithm .

    I'm not going to say I'm an expert or specialist in the field of cryptology, but I know 'enough' about it to follow typical documentation and lectures in the field.

    But this doesn't make a whole lot of sense.

    If you want to make a point with theory.
    You typically start by formulating the problem, the typical issues associated with solving the problem (a.k.a. the "abstract") and a brief summary of how you are going to solve or improve solutions or how you are going to refute prior 'proof'.

    The rest of your text is in an "unreadable" format. As it is, it's a pile of mumbo jumbo nonsense.

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

Featured