encryption, valid

added message validation and finished encryption