- I am using AWS KMS with ECC_SECG_P256K1 key. When I retreive the public key via aws-sdk the key is 88 bytes, which suppoed to be 64 bytes (as shown in the code)
- Even more the size of signature is varying between 70,71,72, which means we can't calculate the (r,s) values based on r=[0:32],s=[32,64]
var kms = new AWS.KMS();
var pubKeyParam = {
KeyId: 'xxxxxxxx', /* required */
};
kms.getPublicKey(pubKeyParam, function(err, data) {
if (err) console.log(err, err.stack);
else
publicKey = data.PublicKey
console.log(publicKey.length) <-- 88 bytes not 64 bytes
});
Thanks in advance for help