The infectious spread of coronavirus disease (COVID-19) has been prevailing in more than two hundred countries and causing millions of deaths all over the world. The pandemic has wreaked havoc in all sectors of life. Since the start of COVID-19, the most common and effective preventive measure to control the transmission has been to wear face masks. With the decline of infectious cases of the virus in most countries due to vehement vaccination programs, people are now reluctant to wear masks. However, the recent variants of the virus such as Delta, Omicron, etc. have proven to be resistant to a degree against vaccines. So there is no alternative to wearing masks to protect ourselves and those around us. The proposed work in this paper implements a full-proof automated system to detect whether a person has worn a mask and warns the person if he has not. The proposed system works in several parts: monitoring to detect persons without masks using a close circuit camera, evaluating whether they are wearing a mask using a machine learning algorithm, capturing their pictures, then comparing with the NID database in a secure way, finally, the persons without masks are notified via email. As the data fetched from the NID database is a piece of private and sensitive information, we have proposed a cryptographic solution of authenticating message or tag generation to assure the validity of the data sent by a valid sender. Therefore, a fully automated and secured system is proposed that is suitable for densely populated countries like Bangladesh where real-time monitoring is unachievable. The mentioned system is an efficient working implementation of a paradigm proposal published very recently.