rework imports in crypto module
fix {en,de}cryption and update test