First part of the implementation of the CF mode.