basic implementation of validation levels

Closes #6213
s/keytype/EncryptionKey/