I'm currently exploring to generate private keys on kms, I already get the public key, however every time I use KMS.SignRequest with the same message, it generate different signature. was that the expected output? I thought it should be the same?
async function sign(msgHash: Buffer, keyId: string) {
const params : KMS.SignRequest = {
KeyId: keyId,
Message: msgHash,
// 'ECDSA_SHA_256' is the one compatible with ECC_SECG_P256K1.
SigningAlgorithm: 'ECDSA_SHA_256',
MessageType: 'DIGEST'
};
// console.debug("params: ",params)
const res = await kms.sign(params).promise();
return res;
}