mirror of
https://github.com/Such-Software/smirk-backend-core.git
synced 2026-10-17 15:31:38 +02:00
core/crypto/nip98.rs: - verify_nip98 (login-grade): binds url+method+freshness - verify_signed_action (state-change): adds single-use nonce + purpose + canonical request-descriptor hash + optional target-id/instance-id, each an exactly-one tag, constant-time compared, all checked on the signature- authenticated event (id recomputed + schnorr-verified before any tag trusted) - hardening from adversarial review: length-guard pubkey/id/sig before k256 construction (no panic on short input), saturating freshness window (no overflow wrap); regressions for all three core/crypto/signatures.rs: BIP-137 ECDSA + Ed25519 verification returning Result<(),AppError> (Ok only on valid; malformed->400, mismatch->401) — closes the Ok(false) fail-open. Cargo.toml: overflow-checks=true in release (defense-in-depth for auth paths).
16 lines
517 B
Rust
16 lines
517 B
Rust
//! smirk-backend-core
|
|
//!
|
|
//! Open, self-hostable backend for the Smirk non-custodial multi-chain wallet:
|
|
//! authentication, per-chain wallet access (Bitcoin, Litecoin, Monero, Wownero,
|
|
//! Grin), the Grin slatepack relay, and Nostr-based identity.
|
|
//!
|
|
//! The HTTP contract is generated from the handlers (`utoipa`) into
|
|
//! `openapi.json`, which is the single source of truth for the API and the
|
|
//! wallet's generated TypeScript client.
|
|
|
|
pub mod api;
|
|
pub mod config;
|
|
pub mod core;
|
|
pub mod error;
|
|
pub mod models;
|