I need to verify the SIGNATURE of PLAIN with the given PUBLIC_KEY:
PLAIN = "0423c072623380" (7 byte)
PUBLIC_KEY = "04494e1a386d3d3cfe3dc10e5de68a499b1c202db5b132393e89ed19fe5be8bc61" (32 byte, skip first "04")
SIGNATURE = "e3d0c9fddc7dc7711767d302b55973ed4787ed4615e07252c877fe89856a1631" (32 byte)
Algorithm is ECDSA 'secp128r1'
The following script prints false
var cryptopp = require('cryptopp');
var plain = "0423c072623380";
var signature = "e3d0c9fddc7dc7711767d302b55973ed4787ed4615e07252c877fe89856a1631";
var xypublic_key = {
x: '494e1a386d3d3cfe3dc10e5de68a499b',
y: '1c202db5b132393e89ed19fe5be8bc61'
}
var ecdsaIsValid = cryptopp.ecdsa.prime.verify(plain, signature, xypublic_key, "secp128r1");
console.log("Is valid : " + ecdsaIsValid);