ECDSA Private Key from SSS I have all of the Shamir's secret shares required to Lagrange-interpolate f(0), which represents an ECDSA private key. The field of this object is secp256k1, which has associated prime number p=115792089237316195423570985008687907853269984665640564039457584007908834671663.

The Lagrange interpolation produces a negative f(0), but because curves over secp256k1 can have exactly 0 or exactly 2 y-coordinates at any x, I'm assuming I can use the absolute value of f(0).

My other understanding is that since we're working over the finite field Zp, S = f(0) (mod p). Where I'm held up is how to turn this 77-byte number (S) into the ECDSA private key.

I've tried reconstructing a wallet using S in hexadecimal as the private key, as well as the sha256 of S, but I don't believe either of those methods are correct. 

Are my previous assumptions correct, and if so, how should I go from S to the ECDSA private key?
In ECDSA one randomly selects the private key $d_A$ from interval $[1,n-1]$, where the $n$ is the order of the Elliptic curve with $n-1$ non-trivial points, and with the point at infinity, $\mathcal O$ as the trivial point.

$n = \texttt{FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141}$ that is 64 bytes, or as an integer

$n = 115792089237316195423570985008687907852837564279074904382605163141518161494337$

one should prefer $S = \operatorname{Hash}(f(0)) \pmod n$ so that all the information mixed before the modulus. Actually, one can still use the original number, however, if the number is bigger than the order, it generates unnecessary bigger calculations, when this step is performed

$$s=k^{-1}(z+rd_{A})\,{\bmod {\,}}n$$

Note that the $p$ is used to represent the elements of the curve and an easy observation is that it limits the number of points of any curve $\leq p^2$. The Hasse theorem gives a tighter relation;

$$|n-(p+1)|\leq 2{\sqrt  {p}}$$