Oddbean new post about | logout
 You can also look at the rust code if that helps: https://github.com/mikedilger/nip44

You need libs for base64, chacha20, hkdf, hmac, secp256k1 and sha256.  If you want to compare how the data changes from step to step to see which step is not working I'm happy to help with that. 
 I’m already using the secp256k1 library and the rest come for free from Apple with CryptoKit. I have all the code written and the unit tests pass for most of the base functions. It just doesn’t pass on the encrypt and decrypt tests because of the ciphertext being different in the hmac_aad function. I’ll compare with your Rust implementation and see how far I get. If I’m still stuck, I’ll preemptively commit it to GitHub to get more eyes on it. Thanks, Mike. 🙏🏼 
 I figured it out. Code coming soon.