开发者

Encrypt in C and decrypt in Python using AES

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜