Implementing the security mechnism