sign and encrypt basically working