| Theleo wrote: |
| What on earth is a Primitive element? Does is it have to do with coprime numbers? I have found a number of definitions but cannot get them. |
| Quote: |
| Fermats LT etc) but things went bad really quick. |
| Quote: |
| Given the fact that it took me on average 1 hour for understanding a page, and that what for me what difficult or impossible to prove was usually left as an exercise(ridiculously easy apparently)for the reader. I do not have a degree in mathematics and although I like them i do not have the time ( I would need at least a month if i not more) to go through a difficult to read mathematical book. |
| Quote: |
| Any resources that do explain how the underlying mathematics works in simpler terms? |
| Quote: |
| P.S Does it get even worse when i get to Elyptic curves? |
| Quote: |
|
Datah said: Usually an element is said to be primitive, if it cannot be further broken down, i.e not factorisable |
| Quote: |
|
Datah said: There is the Fermat's Little theorem and the Fermat's Last theorem, you must decide which |
| Quote: |
| The first two steps when setting up El-Gammal is
A) To choose a large prime P (Which I presume you create by two primes, because you will need knowledge of these primes in the choice of the primitive element) B) Why it has to be co prime with P? |
| Code: |
| We check if 2 is a generator with respect to the prime number 19.
Let == indicate the linear congruence. 2^1==2 mod 19 2^2==4 mod 19 2^3==8 mod 19 2^4==16 mod 19 2^5==13 mod 19 2^6==7 mod 19 2^7==14 mod 19 2^8==9 mod 19 2^9==18 mod 19 2^10==17 mod 19 2^11==15 mod 19 2^12==11 mod 19 2^13==3 mod 19 2^14==6 mod 19 2^15==12 mod 19 2^16= =5 mod 19 2^17== 10 mod 19 2^18==1 mod 19 We see it generates the sequence {2,4,8,16,13,7,14,9,18,17,15,11,3,6,12,5,10,1} |
| Quote: |
| Choose a primitive element. How do you choose it? |
| Quote: |
| I meant Fermat’s little theorem I am not aware of any practical use of Fermat’s last theorem in cryptography. |
| Amitabh wrote: |
| I have heard that finding generators for any random prime is a hard problem... is it true? |
| Quote: |
| In the case of DSA etc, we generate q and p = 1 mod q
in this case, q is a generator of p |
| Amitabh wrote: |
|
Suppose p, q are primes such that p = 1 mod q for any random g, let h = g^((p-1)/q) mod p if h is not equal to 1, then h is a generator of p |
| Quote: |
| However finding a generator of a prime p seems to be an easier problem than finding a prime q < p such that p is 1 mod q. (is this true ?) |
| Quote: |
|
Suppose p, q are primes such that p = 1 mod q for any random g, let h = g^((p-1)/q) mod p if h is not equal to 1, then h is a generator of p |
| Amitabh wrote: |
| What I meant was: g is a generator of p.
Since if r = (p-1)/q and h != 1 then the only bigger order of g has to be (p-1) because q itself is prime. Thus it is enough to check if g^r = 1 mod p or not. Thus my claim is that to find a generator of a prime p, all we need is another smaller prime q such that p = 1 mod q |
| Quote: |
|
(additionally, finding such a q will imply that we can factor p-1. |
| Quote: |
| Thus if p is large, finding generators of p is a hard problem of the order of factoring |
| Quote: |
| I am unable to prove that if we can somehow find generators of p, then we can also factor p-1.
Can anyone shed light on this? [finding generators of p is equivalent to factoring p-1: TRUE/FALSE] |
| Amitabh wrote: |
|
Modified algorithm: Find prime q and p > q such that p = 1 mod q. let r = (p-1)/q for random g, if (a) g ^ r mod p != 1 AND (b) g ^ q mod p != 1 Then g is a generator.. (I missed the second test g^q != 1 mod p) Hopefully there are no loopholes this time |
| Quote: |
| In fact thats the idea of having q prime so we dont have to worry about factors of q |
| Quote: |
| I think this test will work..
the order of any such g will be the product of r and q and that is p-1 This is Lagrange's Group Theorem (I may have misunderstood.. could the order be a product of q and a factor of r?) |
| Quote: |
|
I have heard that finding generators for any random prime is a hard problem... is it true? |
output generated using printer-friendly topic mod, All times are GMT + 2 Hours