Skip to main content

ic_auth/
lib.rs

1//! Pure application-token encoding and optional signature/token/session machinery.
2//!
3//! Hashing untrusted material does not authenticate it. Applications must not
4//! admit tokens by hashing them or checking just one signature. Application
5//! authentication admits a token through the optional session engine, then checks
6//! the caller-bound session for each operation with current protected host inputs.
7//! Admission uses one explicit host transaction for verification and replay
8//! consumption. Standalone token verification remains a lower-level proof
9//! primitive; it does not establish a session or authorize application resources.
10
11pub mod admission_budget;
12pub mod canonical;
13pub mod certificate_issuance;
14pub mod chain_key_batch;
15pub mod portable;
16
17#[cfg(any(
18    feature = "portable-signature-verification",
19    feature = "token-verification"
20))]
21pub mod portable_credential;
22pub mod session_request;
23pub mod token_preparation;
24
25#[cfg(feature = "portable-signature-verification")]
26pub mod portable_signature;
27
28#[cfg(feature = "chain-key-verification")]
29pub mod chain_key_signature;
30
31#[cfg(feature = "canister-signature-preparation")]
32pub mod signature_store;
33
34#[cfg(feature = "canister-signature-verification")]
35pub mod canister_signature;
36
37#[cfg(feature = "token-verification")]
38pub mod token;
39
40#[cfg(feature = "token-verification")]
41pub mod portable_certified;
42
43#[cfg(feature = "sessions")]
44pub mod session;
45
46#[cfg(feature = "sessions")]
47mod storage_codec;