Cross platform compatibility of iOS encryption

304 Views Asked by At

I'm using iOS Security framework for encryption. Specifically I'm using the ECIES encryption which seems to be very specific in the selection of key exchange, derivation, hashing and authenticated encryption. Is the output cross-platform compatible in any way? i.e. suppose I'm encrypting plaintext directed to Bob with the following in iOS:

let algorithm: SecKeyAlgorithm = .eciesEncryptionStandardX963SHA1AESGCM
guard let cipherText = SecKeyCreateEncryptedData(publicKeyBob!,
                                                 algorithm,
                                                 plainText as! CFData,
                                                 &error) as Data? else {
                                                    throw error!.takeRetainedValue() as Error
}

Is it possible to take this cipher (along with Bob's private key) and decrypt it?

If the answer is no, is there anything in the security framework that is cross platform compatible in that sense?

Thanks, Z

0

There are 0 best solutions below