RNCryptorNative icon indicating copy to clipboard operation
RNCryptorNative copied to clipboard

Support Key-Based encryption (not from keys derived from a password)

Open LookingSharp opened this issue 8 years ago • 4 comments

Thanks for sharing this @TGIO!

I use RNCryptor on iOS, and the iOS version supports encrypting directly from the keys, without having to pay for PBKDF2. In the readme he covers it in the Key-Based Encryption section.

In swift, key based encryption code looks like this -

let _keyEncryption: NSData
let _keyHMAC: NSData

let encryptor = RNCryptor.EncryptorV3(encryptionKey: _keyEncryption, hmacKey: _keyHMAC)
let encryptedData = encryptor.encryptData(clearData)

It would be great if RNCryptorNative supported just using the keys.

LookingSharp avatar May 19 '16 22:05 LookingSharp

You mean both encryptionKey and hmacKey?

getsadzeg avatar Nov 07 '16 16:11 getsadzeg

Correct. The v3 format requires that you provide both an encryption and hmac key. It will generate both for you from a password, but in the key mode, you need to provide both.

rnapier avatar Nov 07 '16 17:11 rnapier

Yes. I think it's gonna be written in native, C++.

getsadzeg avatar Nov 07 '16 17:11 getsadzeg

Is there any update on the progress on this issue? Any open/in-progress pull requests? Any way to help?

erawhctim avatar Sep 11 '17 21:09 erawhctim