Is it possible to use AES128 with GCM mode on iOS?

后端 未结 3 641
孤街浪徒
孤街浪徒 2020-12-19 17:31

So my question for you stackoverflow geniuses is: if there a way (native, library, framework, whatever..) to encrypt data with AES (preferably 128 but could

3条回答
  •  萌比男神i
    2020-12-19 18:12

    RNCryptor uses a HMAC, which is considered a cryptographically strong method of creating an authentication tag. It is open source as well. So I would seriously consider cloning RNCryptor code for this (keep the copyright in the header intact!).

    Password based encryption consists of deriving a keys (and possibly an IV), then performing the encryption and authentication. So you should get a long way by simply removing the key derivation part.

    The only time when this doesn't work is if the code for key derivation is woven into the part that does the encryption/authentication, but this does not seem to be the case for RNCryptor.

提交回复
热议问题