We propose a novel scheme for high fidelity photonic controlled-phase gates using Rydberg blockade in an ensemble of atoms in an optical cavity. The gate operation is obtained by first storing a photonic pulse in the ensemble and then scattering a second pulse from the cavity, resulting in a phase change depending on whether the first pulse contained a single photon. We show that the combination of Rydberg blockade and optical cavities effectively enhances the optical non-linearity created by the strong Rydberg interaction and makes the gate operation more robust. The resulting gate can be implemented with cavities of moderate finesse allowing for highly efficient processing of quantum information encoded in photons. As an illustration, we show how the gate can be employed to increase the communication rate of quantum repeaters based on atomic ensembles.PACS numbers: Keywords:Large bandwidth, fast propagation and the non-interacting nature of photons, make them ideal for communicating quantum information over long distances [1]. In contrast, strong photon-photon interactions are desirable for processing of quantum information encoded in the photons, especially if both high fidelity and high efficiency are needed. To satisfy these requirements one needs a highly non-linear medium. Typically, the strength of photon-photon interactions mediated by a non-linear medium is very weak at the single-photon level where photonic quantum logic gates are operating [2]. As a consequence, the implementation of photonic quantum gates remains an unsolved challenge and requires novel means of efficient light-matter interaction. To enhance light-matter interactions, a viable solution is to use ensembles of atoms, e.g., configured for electromagnetically induced transparency (EIT) [3]; this can be further improved by placing the ensemble in an optical cavity, but these ensemble based approaches do not increase the essential photonic non-linearity. In recent years, there has been intense efforts to realize light-matter interactions via, non-linear interactions in a variety of medium, ranging from atoms [4-10] and atom like systems [11][12][13][14] to superconducting qubits [15][16][17].A promising approach towards creating strong quantum nonlinearities is to exploit excitation blockade in Rydberg EIT systems [18][19][20][21][22][23][24][25]. Several quantum effects like strong optical non-linearities and control of light by light [22][23][24][25][26][27][28], deterministic single-photon sources [29], and the generation of entanglement and atomic quantum gates [30][31][32][33][34] have been investigated. The strong nonlinearity originates from the fact that the Rydberg interaction prevents multiple excitations within a blockaded radius r b [35,36]. The ensemble then behaves as a two-level superatom consisting of N b atoms within a radius r b [35,36]. If the optical depth d b corresponding to the superatom is sufficiently large, d b 1 [22], a strong optical nonlinearity at the single-photon level can be achieved in the EIT configurati...