  Optimization problems under affine constraints appear in various areas of
machine learning. We consider the task of minimizing a smooth strongly convex
function $F(x)$ under the affine constraint $K x = b$, with an oracle providing
evaluations of the gradient of $F$ and matrix-vector multiplications by $K$ and
its transpose. We provide lower bounds on the number of gradient computations
and matrix-vector multiplications to achieve a given accuracy. Then we propose
an accelerated primal--dual algorithm achieving these lower bounds. Our
algorithm is the first optimal algorithm for this class of problems.
