We did not implement the crypto part ourselves.
We use the SuptleCrypto Web API implementation and a library called scrypt (this one: https://github.com/ricmoo/scrypt-js).
We also had someone from the EteSync/EteBase project take a look at the code before Obsidian Sync was released.
We also had someone from the EteSync/EteBase project take a look at the code before Obsidian Sync was released.