Hi there,
I've got a question regarding the computation of the key authorization as it seems like I'm missing something.
My function currently looks like this for HTTP-01:
TOKEN.BASE64URL(SHA256(JSON(SORT(JWK(Account's Public Key)))))
For DNS-01, I also hash the result of the function above with SHA256 again.
JWK, Challenge, and my computed Key Authorization
{"e":"AQAB","kty":"RSA","n":"0lppVXqPY1qq450eBDjlMAgbge-gIer8o5LKgeUx6aC0D7iSB9WUovRfQhnaF5wQkP1mZibyJAnRPoLlBXX9AavhAMxdeadbm7pOv8zjC6GFHBpx89DkvXW0SHfmDsnoDxNB6MIELPkAxVE7jRkGhBd6UchpA52ot1s8RC6BP2_w6ED6rzbNQlPSX3b1l5EShZmUKe2zFX50y6gzVVChouqho6b47D8Qu_6PMm_Tu7KdC7W2qMlJW8nwMxxV33YTVyIgAsR_YL8fFAPn56kxwHpS4C-rpt2vuKZKBzGVmtCtVqgUnZ9vG7z4FFVqN9ZbH95bYw1gFrIJRCFpf572gw"}
sAXdpE1TIxtm19JvwGnyce--vZl7qaqRGoEVwD1Kp30
sAXdpE1TIxtm19JvwGnyce--vZl7qaqRGoEVwD1Kp30.QjRlYVQ1L2ZuSTdLNEtNMGNxZW5OU2MvQ3JENzBhT2pyMGN2a1p2aEt3dz0
A snippet from my JS code
let thumbprint = sort(jrs.KEYUTIL.getJWKFromKey(accountKeypair.pubKeyObj));
thumbprint = JSON.stringify(thumbprint);
thumbprint = crypto.createHash('sha256').update(thumbprint).digest('base64');
thumbprint = base64url(thumbprint);
let keyAuthorization = `${challenge.token}.${thumbprint}`;
I verified that the functions are working as intended by trying the example from the RFC. So I'm wondering what I missed.
Hope someone has any idea how I might fix this. Sorry for bothering you