What is the expression for the confidence interval in a Kaplan-Meier curve? In R, the survival fit object gives the non-parametric MLE for the survival curve via the Kaplan-Meier estimator. The fit also provides a confidence interval. What is the expression for the confidence interval, or where is the reference, to reproduce the method?

leukemia.surv <- survfit(Surv(time, status) ~ 1, data = aml, subset=x=='Nonmaintained') 
plot(leukemia.surv) 


The survival package is support software for
Terry M. Therneau, Patricia M. Grambsch (2000). Modeling Survival Data: Extending the Cox Model. Springer, New York. ISBN 0-387-98784-3.
And I suspect that would be the best place to start with the detail of what is implemented in these functions. There are more conceptual details in ?survfit.formula including what method is used bye default ("log" which bases the CI on the log(survival)).
As it happens I saw this YouTube video the other day that covers some of the details of how these confidence intervals are computed.
