Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    $\begingroup$ As the question stands now, the Second Least Significant Bit can be impossible to compute. Example: $b=2$, $p=19$, $r=4$, solutions include $x=2$ and $x=20$, and these have different Second Least Significant Bit. One fix is to add the constraint $1\le x<p$. Also, we want $b\not\equiv-1\pmod p$, and more generally that $b$ is a generator. $\endgroup$ Commented Nov 5 at 17:20
  • $\begingroup$ I have updated to add the constraint on $x$. b is any possible integer so I am unclear what else is needed to clarify. Please feel free to update. $\endgroup$ Commented Nov 5 at 18:35
  • $\begingroup$ Example of why we need restriction on $b$ [beside $b\ne p-1$ ]: $b=6$, $p=31$, $r=5$. Solution is $x\in\{8,14,20,26\}$ and again the Second Least Significant Bit in undefined. To fix this for good we can restrict to $b$ a generator as I first suggested [equivalently: such that $b^{(p-1)/s}\bmod p\ne1$ for all primes $s$ dividing $p-1$ ] and $1\le x<p$ [or $0\le x<p-1$ ]. Another option is to restrict to $1\le x\le\operatorname{ord}(b)$ [or $0\le x<\operatorname{ord}(b)$ ]. Yet another is to define that $x$ is the smallest positive [or non-negative] solution. $\endgroup$ Commented Nov 5 at 19:27