]> git.ardis.lu - static-encrypt-passkey/log
static-encrypt-passkey
12 months agoOrganize <link> tags so they are together
Ardis Lu [Wed, 1 Oct 2025 06:02:50 +0000 (23:02 -0700)]
Organize <link> tags so they are together

14 months agoFix type annotation
Ardis Lu [Fri, 15 Aug 2025 04:23:52 +0000 (21:23 -0700)]
Fix type annotation

`ArrayBufferLike` annotations in `lib.d.ts` were updated in TypeScript 5.9, see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-9.html

14 months agoCleanup unnecessary code
Ardis Lu [Wed, 6 Aug 2025 05:03:53 +0000 (22:03 -0700)]
Cleanup unnecessary code

14 months agoAdd Yubikey support (resident keys only)
Ardis Lu [Thu, 31 Jul 2025 07:33:35 +0000 (00:33 -0700)]
Add Yubikey support (resident keys only)

In the future, non-resident keys may be allowed by storing the credential `rawId` in `localStorage`.

14 months agoMake user handle a non-zero value
Ardis Lu [Thu, 24 Jul 2025 04:56:34 +0000 (21:56 -0700)]
Make user handle a non-zero value

The specification says:

> The user handle MUST NOT be empty, though it MAY be null.

Source: https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialuserentity-id

Some authenticators (e.g., Windows Hello) consider `new ArrayBuffer(0)` to be invalid, others (e.g., 1Password) consider it to be valid. Setting `id` to a non-zero value enables wider compatibility.

14 months agoRefactor to avoid spread operator
Ardis Lu [Wed, 23 Jul 2025 04:57:27 +0000 (21:57 -0700)]
Refactor to avoid spread operator

Spread operator will get stack overflow on large inputs. Can simplify in the future with `Uint8Array.prototype.toBase64()` once widely available.

14 months agoPad plaintext bytes so the encoded ciphertext has no base64 padding
Ardis Lu [Wed, 23 Jul 2025 04:18:51 +0000 (21:18 -0700)]
Pad plaintext bytes so the encoded ciphertext has no base64 padding

Since base64 padding is ignored on decode, the padding can be deleted or replaced with junk data. As a result, it is possible to decode different strings into the same bytes. By padding the bytes so the bytes are a multiple of 3, there is never base64 padding and exactly one input yields the desired output.

14 months agoExtend params to recommended minimum
Ardis Lu [Tue, 22 Jul 2025 03:08:35 +0000 (20:08 -0700)]
Extend params to recommended minimum

https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-pubkeycredparams

14 months agoFix centering on Firefox
Ardis Lu [Tue, 22 Jul 2025 02:57:50 +0000 (19:57 -0700)]
Fix centering on Firefox

14 months agoRemove challenge
Ardis Lu [Mon, 21 Jul 2025 03:47:34 +0000 (20:47 -0700)]
Remove challenge

Challenge does not make sense in this context because both passkey creation and retrieval are entirely client-side.

The signed challenge is also not verified, and so challenge is actually unused and could be replaced by any junk value in the output content without affecting the decryption.

14 months agoSet domain to `108117.xyz`
Ardis Lu [Sun, 20 Jul 2025 07:34:17 +0000 (00:34 -0700)]
Set domain to `108117.xyz`

14 months agoInitial commit
Ardis Lu [Sun, 20 Jul 2025 06:08:48 +0000 (23:08 -0700)]
Initial commit

This page took 0.041613 seconds and 4 git commands to generate.