How can I encrypt/decrypt data using AES CBC+CTS (ciphertext stealing) mode in PHP?

前端 未结 2 1432
感情败类
感情败类 2021-01-21 11:19

I have to encrypt and decrypt data in AES CTS mode (ciphertext stealing, sometimes referred as AES-XTS) in PHP to interoperate with a remote system written in .NET platform. In

2条回答
  •  悲哀的现实
    2021-01-21 11:49

    I have found an implementation of AES algorithm in C, you can find it with source code here.

    The author's older implementation was used in Android. So I think the implementation would be very promising.

    Finally, after you have downloaded the source code, then check the file aesxam.c, there is a very good example of CTS with CBC for file encryption.

    All credits go to Brian Gladman.


    Brian Gladman now maintains his own github repo for AES.

提交回复
热议问题