skeleton implementation of encryption