Skip to content

Tag: amazon-kms

Convert AWS KMS ECDSA_SHA_256 Signature from DER encoded ANS.1 format to JWT base64url encoded R || S format in NodeJS/Javascript

I am trying to create JWT Signature in NodeJS with ES256 algorithm using AWS KMS Customer Managed Keys. The signature created using AWS KMS with cryptographic Signing Algorithms ECDSA_SHA_256 is not JWT accepted R || S format. As per AWS doc, Signature will be in DER encoded ANS X9.62–2005 format ( I tried to convert the AWS KMS Sign to