Ideally it would be a constitutional ammendent, stating that privacy is a right of every citizen, and a human right.
Legislation to the right to encryption would then just follow from it, but having it in the constitution would make it harder for future governments to pass certain kinds of legislation, or if they pass them, the supreme court would declare them inconstitutional.