EDIT: I messed up something (see comments at answer). This question contains some false statements EditEnd.
For tetration modulo prime $P$
$$^{i}g = g\uparrow \uparrow i = \underbrace{g^{g^{\cdot\cdot\cdot^{g}}}}_i\equiv v \mod P$$
with suitable $g,P$ so that
$$|\{^jg \mod P\}| = P-1 \text{ }\text{ , or }\text{ } v\in[1,P-1] $$
Given $P,g,v$, how difficult is finding the related $i$?
Harder than DLP? (finding $i$ for $g^i \equiv v \mod P$)
I'm interested at the number of steps ($O$ notation ).
To compare it with the normal DLP problem we assume one step - so $g^c$ and $g\cdot c$ with constant $c$ does need the same time.
To get all values $v$ the variables $g,P$ need some special property:
$$^{P-1}g \equiv 1 \mod P$$
$$\forall j \in [1,N-2]: \text{ }^{j}g \not\equiv 1 \mod P$$
We also assume $g,P$ are picked as safe as possible (like $P = 2q+1$, with $q$ prime (also better here?))
toy example:
With $P=5, g=3$ the sequence would be
$$\begin{split}
&[3, 3^3, 3^{3^3}, 3^{3^{3^3}}] \mod 5 \\
\equiv&[3, 3^3\equiv 2, 3^{2} \equiv 4, 3^{4} \equiv 1] \mod 5 \\
\equiv&[3, 2, 4, 1] \mod 5
\end{split}$$
Or $P=23, g=20$ or $P=59, g=39$
main-question:
- How many steps needed to compute $i$ out of given $v,g,P$?
side-questions:
How many steps needed to compute the result $v$ for given $i,g,P$? Faster than $O(i)$?
If a value $v_i$ for a certain $i$ is known the next value $v_{i+1}$ can be computed with $$ ^{i+1}g \equiv g^{v_{i}} \equiv v_{i+1} \mod P$$
Is it also possible to compute $v_{i-1}$ out of $v_{i}$ ? Or is it similar to the DLP?