Revert "encryption: needed changes to allow encryption"

This reverts commit a466109a27046e1bd70e2c36f59a46e6ffd0ba8b.