Cryptography stuff from scratch is very hard, even if you know the theory, you might still fail to implement it correctly.
If there isn’t a ready solution available, I would always consider first using Ports or another mechanism to borrow the implementation from another ecosystem, as I’ve fallen myself into this trap of spending countless days debugging myself.


















