def _generate_x(self):
while <NUM_LIT:1>:<EOL><INDENT>x_bytes = os.urandom(<NUM_LIT>)<EOL>x_bytes = byte_mask(x_bytes[<NUM_LIT:0>], <NUM_LIT>) + x_bytes[<NUM_LIT:1>:]<EOL>first = x_bytes[:<NUM_LIT:8>]<EOL>if first not in (self.b7fffffffffffffff, self.b0000000000000000):<EOL><INDENT>break<EOL><DEDENT><DEDENT>self.x = util.inflate_long(x_bytes)<EOL>
generate an "x" (1 < x < q), where q is (p-1)/2.
p is a 128-byte (1024-bit) number, where the first 64 bits are 1.
therefore q can be approximated as a 2^1023.  we drop the subset of
potential x where the first 63 bits are 1, because some of those will
be larger than q (but this is a tiny tiny subset of potential x).