Open bumi opened 2 years ago
There seems to be in issue with the hmac generation:
we use crypto.js hmacSHA256 zeus uses HMAC from fast-sha256
const hashingKey = '...'
//Alby
const AlinkingKeyPriv = hmacSHA256("getalby.com", hashingKey).toString(Hex);
console.log({ AlinkingKeyPriv });
//Zeus
const ZlinkingKeyPriv = new sha256HMAC(Buffer.from(hashingKey, "hex"))
.update(stringToUint8Array("getalby.com"))
.digest();
console.log({ ZlinkingKeyPriv });
Describe the bug LNURL-auth with LND does not generate the same key as Zeus.
To Reproduce Steps to reproduce the behavior:
Those should log you into the same account.
Expected behavior The lnurl-auth should create the same keys.
Information About Alby
Further info:
https://github.com/fiatjaf/lnurl-rfc/blob/luds/13.md
https://github.com/alexbosworth/balanceofsatoshis/blob/6d83d2c8ef133a0fad7fb89b067bb9f0dc8400be/lnurl/sign_auth_challenge.js#L34