Skip to content

fix(passkey-crypto): change deriveEnterpriseSalt output encoding from base64 to base64url#8677

Open
derranW26 wants to merge 1 commit intomasterfrom
WCN-410-fix-passkey-crypto-base64url
Open

fix(passkey-crypto): change deriveEnterpriseSalt output encoding from base64 to base64url#8677
derranW26 wants to merge 1 commit intomasterfrom
WCN-410-fix-passkey-crypto-base64url

Conversation

@derranW26
Copy link
Copy Markdown
Contributor

@derranW26 derranW26 commented May 4, 2026

Ticket: WCN-410

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 4, 2026

@derranW26 derranW26 marked this pull request as ready for review May 4, 2026 14:16
@derranW26 derranW26 requested review from a team as code owners May 4, 2026 14:16
const resultBits = hmacInstance.mac(dataBits);

return codec.base64.fromBits(resultBits);
return codec.base64url.fromBits(resultBits);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any code that decodes this value with a standard base64 decoder will get wrong bytes or fail and it must use base64url decoding now. Have we checked if this affects any callers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the passkey-crypto package so I have checked for all callers -> we will continue this after brandon's changes get merged (he is apart of the shift to use base64url)

@derranW26 derranW26 force-pushed the WCN-410-fix-passkey-crypto-base64url branch from 522b892 to ecdabe8 Compare May 6, 2026 19:06
@derranW26 derranW26 requested a review from a team as a code owner May 6, 2026 19:06
… base64 to base64url

Retail's hmac.ts now returns base64url-encoded PRF salt. The SDK must
match this encoding so HMAC values are compatible and passkey
authentication does not silently fail.

WCN-410

TICKET: WCN-410
@derranW26 derranW26 force-pushed the WCN-410-fix-passkey-crypto-base64url branch from ecdabe8 to 8b9e2f5 Compare May 6, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants