# Request for 1024-bit primes $p$ , subgroup $q$ and subgroup generator $g$

I need to find a prime $p$ of $1024$ bits with a $160$ bit sub group size $q$, such that $q|p-1$ , and $g$ is the generator of the sub group size $q$.

I'm looking for the numeric values of $p$ , $q$ and $g$.

-
What do you want to use those for? The requirements for those differ subtly with use. For example ElGamal signatures need a large generator. For most uses I'd just look up a set of group parameters in a DSA or DH standard. –  CodesInChaos Feb 8 '13 at 15:35
To continue @CodesInChaos's comment, for DSA, you need q to be exactly a specified size (for example, precisely 160 bits). What do you need this for? –  poncho Feb 8 '13 at 15:40
Hi , thanks to all of you . Im looking for those value for my project. q need to be 160 bit. i was looking in the rfc 2412. but i could not find the q that will produce me a subgroup is size of 160. –  USer22999299 Feb 9 '13 at 9:36

Suitable values are $q=2^{159}+9593, p=2^{1023-159}*q+1, g=2^{2^{1023-159}}\mod p$

I have checked the values given in section 2.1 of RFC 5114 and they seem fine too.

Whether "it's safe to use them" depends entirely on how they're being used, what you're trying to prevent, against whom and for how long and what the consequences of getting it wrong are.

-
Hi , im looking for subgroup size of 160. i was guided to look at the RFC 2412, but i couldn't find it. i found at RFC 5114 at section 2.1 page 4 , a well known p q and g . can you explain me if it safe to use them? thanks. –  USer22999299 Feb 9 '13 at 10:20
@Barack You should merge your accounts. See crypto.stackexchange.com/help/user-merge –  CodesInChaos Feb 10 '13 at 8:29