Found the solution:
this code:
let symmetricKey = sharedSecret.hkdfDerivedSymmetricKey(
using: SHA256.self,
salt: Data(),
sharedInfo: Data(),
outputByteCount: 32
)
should be replaced with this code:
let symmetricKey = SymmetricKey(data: sharedSecret)
Post
Replies
Boosts
Views
Activity
Can't edit :( I have working decryption methods*
Sorry, I now realize how unclear my comment was. Unfortunately, I don't have information on how the data is encrypted; I only have instructions on how to decrypt it. "The mobile application generates a pair of EC private/public keys using the SECP256R1 curve. Using the held private key and the public key received from the API, a shared key is derived and used to decrypt the received card number. The card number is encrypted using the AES algorithm in GCM mode." I have working encryption methods written in Java and Python, but I need one in Swift.