@thurinlabs/identity-kit 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -264,6 +264,10 @@ The card talks directly to Ethereum and each proof platform — no intermediary,
264
264
  | Codeberg | Repository description |
265
265
  | Mastodon | Profile metadata |
266
266
 
267
+ ## Key algorithms
268
+
269
+ Any curve openpgp.js can compute is accepted: Ed25519, Cv25519, NIST P-256/384/521, brainpool, RSA, and **secp256k1**. openpgp.js rejects secp256k1 by default because RFC 9580 does not list it; identity-kit turns that rejection off, since it is a compatibility rule, not a security one. A secp256k1 PGP key doubles as an Ethereum key (the address is derived from the same public point), so anything that can sign with the PGP key can sign Ethereum transactions: hold such a key if you like, but do not fund its derived address. In Node, openpgp.js needs the `eckey-utils` package for this curve; identity-kit depends on it, so `npm install` brings it in. The browser build needs nothing extra.
270
+
267
271
  ## Migrating from 0.9.x
268
272
 
269
273
  1.0.0 reads the **PGPRegistry v2** contract. The v1 registry is no longer read.
@@ -31148,6 +31148,7 @@ ${prettyStateOverride(stateOverride)}`;
31148
31148
  }
31149
31149
 
31150
31150
  // src/core/pgp.ts
31151
+ var PGP_CONFIG = { rejectCurves: /* @__PURE__ */ new Set() };
31151
31152
  function algorithmName(keyOrSubkey) {
31152
31153
  try {
31153
31154
  const info = keyOrSubkey.getAlgorithmInfo();
@@ -31188,7 +31189,9 @@ ${prettyStateOverride(stateOverride)}`;
31188
31189
  await cert.verify(
31189
31190
  key.keyPacket,
31190
31191
  cert.signatureType,
31191
- { userID: user.userID, key: key.keyPacket }
31192
+ { userID: user.userID, key: key.keyPacket },
31193
+ void 0,
31194
+ PGP_CONFIG
31192
31195
  );
31193
31196
  } catch {
31194
31197
  continue;
@@ -31239,7 +31242,7 @@ ${prettyStateOverride(stateOverride)}`;
31239
31242
  return { verified: false, reason: "Key fingerprint mismatch" };
31240
31243
  }
31241
31244
  const message = await readCleartextMessage({ cleartextMessage: pgpSignature });
31242
- const { signatures } = await verify({ message, verificationKeys: publicKey });
31245
+ const { signatures } = await verify({ message, verificationKeys: publicKey, config: PGP_CONFIG });
31243
31246
  await signatures[0].verified;
31244
31247
  const signedText = message.getText();
31245
31248
  if (!signedText.toLowerCase().includes(ethAddress.toLowerCase())) {