Cubic splines (piecewise interpolator with $C_2$ continuity) are well-known to be computable from a tridiagonal system of equations that give estimates of the second derivatives at the interpolated points.
Different endpoint conditions are allowed, such as natural or constrained. The resolution is easy and fast.
The cyclic case (equal derivatives at endpoints) is more difficult, as the matrix is cyclic-tridiagonal (nonzero coefficients in the corners). Despite Web search, I didn't find a clear explanation of the modified resolution in this case. Can you help ?
I haven't looked at that case specifically, but Wilf's "generatingfunctionology" (available for free at the link) gives a delightful treatment of cubic splines using generating functions to solve the equations. Worth a read.