JavaScript code that signs and verifies signatures using NRS algo