Vault rewrite, pass 1
Fix decryption error
Merge pull request #6151 from jctanner/vault_rewrite

Vault rewrite, pass 1