ic_auth_verifier
IC-Auth is a web authentication system based on the Internet Computer.
ic_auth_verifier verifies IC-Auth signatures, delegation chains, signed HTTP envelopes, and deep-link sign-in payloads. The base crate works with raw public keys; optional features add HTTP envelope parsing and ic-agent identity helpers for clients and services.
Features
- Parses DER SubjectPublicKeyInfo values for Ed25519, ECDSA P-256, ECDSA secp256k1, and IC canister signatures.
- Verifies basic signatures and IC canister signatures against the mainnet root key or a supplied root key.
- Provides SHA-256, SHA3-256, and Keccak-256 helpers.
envelopefeature: signed envelope encoding,Authorization: ICP ...,IC-Auth-*headers, delegation-chain validation, and deep-link request/response helpers.identityfeature:ic-agentidentity helpers, random basic identities, delegated session identities, andAtomicIdentity.
Installation
Add this to your Cargo.toml:
[]
= "0.9"
Enable signed envelope and deep-link support:
[]
= { = "0.9", = ["envelope"] }
Enable identity helpers for native/server targets:
[]
= { = "0.9", = ["identity"] }
Use full to enable the same identity-oriented surface:
[]
= { = "0.9", = ["full"] }
Do not enable identity or full in canister code.
Usage
Envelope Signing
Requires the identity or full feature.
use ;
Envelope Verification
Requires the envelope feature.
use SignedEnvelope;
use ;
Raw Signature Verification
use ;
Related Crates
ic_auth_types: shared delegation, byte, and deterministic CBOR types.ic_auth_verify_server: HTTP verification service built on this crate.
License
Copyright © 2024-2026 LDC Labs.
ldclabs/ic-auth is licensed under the MIT License. See LICENSE for the full license text.