Conceptually the algorithm has two parts. The first part involves an expression for the Bernoulli numbers in terms of distributions on $\Z_p$ from Lang's ``Cyclotomic Fields'' (chapter 2, Theorem 2.3) ...