# Relationship between an elements order and the DLP [closed]

How can I use these properties to attack the DHKE? I know that the order of $a$ is always $2$ for $a = P - 1$ in $Z_p$. The subgroups generated by a will be $\{1,a\}$.

If the order of $a=-1\mod{p}$ and $b=a^{e}\mod{p}$, then $b=\pm{1}\mod{p}$.
If $b=1\mod{p}$, the discrete logarithm is $0$.
If $b=-1\mod{p}$, the discrete logarithm is $1$.