开发者

Encrypt in C and decrypt in Python using AES

开发者 https://www.devze.com 2023-02-13 19:48 出处:网络
I was wondering if there is any straightforwar开发者_运维技巧d way to encrypt text or string in C so it can easily be decrypted in python using shared key encryption (AES) ?I would recommend calling G

I was wondering if there is any straightforwar开发者_运维技巧d way to encrypt text or string in C so it can easily be decrypted in python using shared key encryption (AES) ?


I would recommend calling GPG, the Gnu Privacy Gaurd in C via GPGME. You can read the data with Python using python-gnupg. This is the most secure option since you are relying on an open source, peer reviewed, and widely used cryptography implementation (GPG). There are many, many security pitfalls when implementing cryptography. In general, application developers should not implement cryptography themselves.


PyCrypto (not distributed as part of Python) implements algorithms like AES, and Mozilla Network Security Services provides C libraries to use encryption algorithms in C. Alternatively, there is OpenSSL, but its documentation is lacking.

I'd recommend a commonly used one like AES or Blowfish.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号