  Quantum entanglement has become an essential resource in quantum information
processing. Existing works employ entangled quantum states to perform various
tasks, while little attention is paid to the control of the resource. In this
work, we propose a simple protocol to upgrade an entanglement source with
access control through phase randomization at the optical pump. The enhanced
source can effectively control all users in utilizing the entanglement resource
to implement quantum cryptography. In addition, we show this control can act as
a practical countermeasure against memory attack on device-independent quantum
key distribution at a negligible cost. To demonstrate the feasibility of our
protocol, we implement an experimental setup using just off-the-shelf
components and characterize its performance accordingly.
