Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vetkeys

БесплатноБез исполняемых скриптовНе проверен

Build vetKeys cryptography on the Internet Computer via the vetKD system API and the ic-vetkeys (Rust, Motoko) and @icp-sdk/vetkeys (frontend) libraries…

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

vetKeys (Verifiable Encrypted Threshold Keys)

vetKeys bring on-chain privacy to the IC via the vetKD protocol: a canister requests a key derived by the subnet's threshold key-derivation infrastructure, receives it encrypted under a client-supplied transport key, and only the client decrypts it locally. No subnet node ever sees the raw key, and in this standard client-delivery pattern neither does the canister — it relays the still-encrypted key to the client. (Some flows deliberately have the canister obtain key material itself: threshold BLS signing and in-canister timelock decryption — see those sections.) Derivation is deterministic: the same (canister, context, input) always yields the same key.

Build on the maintained libraries — do not hand-roll the cryptography or the Candid interface:

Layer Rust Motoko Frontend
Package ic-vetkeys 0.9 (crates.io) ic-vetkeys 0.6 (mops) @icp-sdk/vetkeys 0.7 (npm)
Management API ic-cdk-management-canister, ic_vetkeys::management_canister mo:ic-vetkeys/ManagementCanister —
Low-level primitives crate root (ic_vetkeys::…) — (not available, see below) package root (@icp-sdk/vetkeys)

@dfinity/vetkeys is legacy (frozen at 0.4.0). The package was renamed to @icp-sdk/vetkeys at 0.5.0. Frontend agent/identity types come from @icp-sdk/core (@icp-sdk/core/agent, @icp-sdk/core/principal), not @dfinity/agent/@dfinity/principal.

Use 0.7 or later. 0.5 and 0.6 declared @icp-sdk/core as a plain dependency, so they could nest a second copy of core beside the one the app installs instead of failing; 0.7 peers it as ^5 || ^6. The API is identical across all three.

Also required: Rust ic-cdk = "0.20" + ic-cdk-management-canister = "0.1" (and ic-dummy-getrandom-for-wasm for IBE); Motoko ic-vetkeys 0.6 needs moc ≥ 1.13.0 / core ≥ 2.6.1; frontend @icp-sdk/core@^6 — vetKeys itself accepts ^5 || ^6, but the rest of the SDK peers ^6.

Which skill / which feature

You want to… Use
Store & share encrypted key-value data (password manager, notes, vault) encrypted-maps skill (higher-level, start there)
Encrypt to a principal so only they can decrypt (messaging) IBE → references/ibe.md
Reveal data only after a deadline (sealed-bid auction, timelock) Timelock IBE → references/ibe.md
Have the canister produce a signature verifiable by anyone Threshold BLS → references/bls-signing.md
Derive a per-user/per-resource symmetric (AES) key Symmetric derivation → this file
Encrypt to a principal without any canister call Offline public-key derivation → this file
Produce on-chain verifiable randomness Verifiable randomness (VRF) → this file
Authenticate users / logins not vetKeys — use the user-sign-in skill

Core concepts

  • context — a domain-separator blob that namespaces derived keys within a canister (e.g. "my_app", or a per-purpose value like "symmetric_key"). It must be identical between the public-key call, the derive call, and any client-side verify/decrypt, or the keys will not match — decryptAndVerify then throws (the Rust APIs return an error), so handle that failure rather than assuming success.
  • input — application data identifying which key to derive (e.g. a caller principal, a document ID). It is sent to the management canister in plaintext — use it as an identifier, never for secret data.
  • transport key — an ephemeral key pair the client generates per request. The public half is sent so the subnet can encrypt the derived key for delivery; only the holder of the secret half can decrypt. Generate a fresh one each request (TransportSecretKey.random()).
  • encrypted vs unencrypted vetKeys — IBE and symmetric derivation use the encrypted delivery flow (transport key → decryptAndVerify → VetKey). Threshold BLS uses the unencrypted vetKey directly; the library's sign_with_bls / signWithBls handles that — never feed an encrypted vetKey into BLS.
  • Motoko asymmetry — the Motoko ic-vetkeys library exposes only the management API + KeyManager/EncryptedMaps. It has no IBE, transport keys, MasterPublicKey/DerivedPublicKey, or vetKey decryption. In a Motoko app the canister returns the encrypted vetKey and the frontend (@icp-sdk/vetkeys) does transport-key generation, decryptAndVerify, IBE, and symmetric derivation. Those primitives exist in Rust and TypeScript only.

Key names & cycles

Key name Where vetkd_derive_key cost
test_key_1 local + mainnet (testing) 10_000_000_000
key_1 local + mainnet (production) 26_153_846_153

`v

Полный SKILL.md на GitHub

Установить vetkeys в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSESOURCE.mdTRUST.auto.yamlreferences/bls-signing.mdreferences/ibe.md

FAQ

Что делает скилл vetkeys?

Build vetKeys cryptography on the Internet Computer via the vetKD system API and the ic-vetkeys (Rust, Motoko) and @icp-sdk/vetkeys (frontend) libraries: identity-based encryption (IBE), threshold BLS signatures, timelock encryption, symmetric key derivation, and offline public-key derivation. Use when implementing IBE, encrypting to a principal, BLS signing, sealed-bid or timelock schemes, deriving encryption keys on-chain, transport keys, or calling vetkd_public_key / vetkd_derive_key. For access-controlled encrypted key-value storage (password managers, encrypted notes), use the encrypted-maps skill instead. Not for authentication — use user-sign-in.

Как установить скилл vetkeys?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vetkeys запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить vetkeys с