To find the value of \( k \), we use the condition for tangency between the straight line and the given curve. Substituting the point \((a, b)\) into both the line and the curve, and applying the necessary conditions for tangency, we derive the relation:
\[
\frac{1}{a^2} + \frac{1}{b^2} = \frac{k}{p^2}
\]
After solving, it turns out \( k = 4 \).