AES encrypt with OpenSSL, decrypt with C# .Net

后端 未结 2 868
小蘑菇
小蘑菇 2020-12-22 00:01

I need to know how to encrypt a message in AES-OpenSSL and decrypt in .NET (C# or VB) OR Know what is the difference between AES-OPENSSL and AES-.NET

Thank you!

2条回答
  •  执念已碎
    2020-12-22 00:25

    AES is AES. There are NIST test vectors that make sure that implementations are compatible, and the byte order has been specified as well. So it comes down to choosing the correct mode (e.g. CBC or the authenticated GCM mode) and padding mode (PKCS#7 for CBC and "none" for GCM). Choose the correct key and IV and you are on your way. Take extra care to understand the input of AES, especially make sure you understand encoding and character-encoding and random number generation.

提交回复
热议问题