I have a multichannel application that has a Web Version and a mobile version using C#.
This application uses 'Trust No One' security model. That means, the keys generated when the user registers are encrypted using a passphrase on the client side before being sent to the server.
These keys are used to encrypt the data, which is also stored on the server side.
The reason, RSA private key is encrypted is, we don't want to have the ability to decrypt the data.
Now, the application can be used on the browser or through mobile applications using Xamarin and C#.
The data encrypted using the keys generated in JS, should be able to be decrypted using C# on the mobile app and vice versa.
What's the best way to implement this kind of encryption that's compatible with JS and C#.
PS: The Keys are generated using the Browser Plugin! So, it's kind of safer since other applications will not be able to access the background scope of the plugin.