Just be aware, that it applies to all unauthenticated encryption, not only CBC. Of course you can build authenticated protocol using CBC, but that is still full of pitfalls.
Small correction, XChaCha20 not XSalsa20. The difference is compression function that optimises better on the X86-64 CPUs, as there is reduced dependency between rows. However XChaCha20 is still not standardised by IETF and due to that is not included in OpenSSL.
That.
Actually not really. Implementing most of the cryptographic primitives (with exception to AES due to the design issues) is quite easy and straightforward. What is hard is how to implement protocols, as this is where most of the cryptographic problems is happening. Erlang has quite nice API for using the primitives, which is simple, the hard part is how to join primitives with other to have secure protocol.


















