Ice*_*ind 2 .net c# security encryption rijndaelmanaged
我试图弄清楚如何制作AES加密的公钥/私钥.我希望能够像这样使用它:
byte[] BytesToEncrypt = { 0x01, 0x02, 0x03, 0x04, 0x05 };
byte[] PublicKey;
byte[] PrivateKey;
byte[] EncryptedBytes;
byte[] UnencryptedBytes;
PrivateKey = CreatePrivateKey();
PublicKey = CreatePublicKey(PrivateKey);
EncryptedBytes = EncryptBytes(PrivateKey);
// This line should return unencrypted bytes
UnencryptedBytes = UnencryptBytes(EncryptedBytes, PrivateKey);
// This line should also return the unencrypted bytes
UnencryptedBytes = UnencryptBytes(EncryptedBytes, PublicKey);
Run Code Online (Sandbox Code Playgroud)
我该如何实现这样的东西?我见过公共/私有加密,但我见过的所有例子似乎都使用RSA加密.我想使用AES.这可能吗?