This is the algorithm for signing the data in C# using a private key from a certificate that is used from both me and the client in order to define an unique key to identify the user: I then pass the private key to my Javascript using Bouncy Castle: This one is the algorithm used in Javascript: The signatures returned