I am trying to encrypt and then decrypt files using asymmetric encryption. I\'ve created a test certificate using makecert and installed it into my personal localmachine store.
Ensure that the key you're using was created with "-sky Exchange" if using makecert.exe. Without this, you can only use the key for signing and authentication, not encryption/decryption which is the use case you're implementing here.