Skip to content
docs.
WORKSPACE

Your documentation

Explore the project catalog
Localzet ServerАсинхронный PHP-серверTriangleФреймворк и компонентыMIX IDИдентификация и интеграцииHack APIПубличные API хакатонаACNПроект и компонентыUserlay / UserNetПроект и компонентыAxiomПроект и компонентыМесседжинг через почтуПроект и компонентыLWT / JWT / JOSEПроект и компоненты✓Финансовая аналитика KimaiПроект и компонентыМультипарадигмальная БДПроект и компонентыZorin PlatformПроект и компонентыZorin TrustПроект и компонентыFloraScope / VegwatchПроект и компонентыaegis-qДокументация проектаaevumdbДокументация проектаauditДокументация проектаauto-invest-managerАвтотрейдерcaine-companionДокументация проектаcertbot-cloudflareДокументация проектаClusterLocalzet Server / ClustercmdveilДокументация проектаConsolePHP CLICronБиблиотеки Localzet Serverdata-connectorДокументация проектаdevice-controlDevice Controlenn-projectДокументация проектаEventsБиблиотеки Localzet ServerflowsintДокументация проектаforgeДокументация проектаHttpClientБиблиотеки Localzet ServerinterpreterСобственный языкinvariaДокументация проектаkeynotesДокументация проектаknotrouteKnotroutelaravel-personal-analyticsДокументация проектаlocalzet-osДокументация проектаmeridianДокументация проектаMQTTБиблиотеки Localzet Servernano-kernelСобственная ОСNoterДокументация проектаpersonal-analyticsДокументация проектаProxyБиблиотеки Localzet ServerPSRБиблиотеки Localzet ServerPSR-7Библиотеки Localzet Serverrschs-monitorДокументация проектаsemsealДокументация проектаshardsealДокументация проектаSocketIOБиблиотеки Localzet ServerSOCKS5Библиотеки Localzet Serverstandalone-analyticsДокументация проектаstatic-php-cliДокументация проектаStorageБиблиотеки Localzet ServersutureДокументация проектаtempoweaveДокументация проектаttsСинтез речиTunnelБиблиотеки Localzet Serverui-kitUI KitvesperДокументация проектаWebAnalyzerWebAnalyzerzorin-access-brokerДокументация проектаzorin-authority-brokerДокументация проектаzorin-authority-sdk-phpДокументация проектаzorin-authority-sdk-pythonДокументация проектаzorin-authority-sdk-tsДокументация проектаzorin-client-intelДокументация проектаzorin-device-core-aospДокументация проектаzorin-host-agentДокументация проектаzorin-native-labДокументация проектаzorin-nodeДокументация проектаzorin-opsДокументация проектаdonstu-python-sdkДокументация проектаfloortraceFloortraceserver-rsLocalzet Server / Cluster
Catalog
Documentation/LWT / JWT / JOSE

localzet-jose

Educational/reference JOSE library in Rust: JWS, JWE, JWK and JWT. This is an unfinished continuation of JWT and LWT, grouped by localzet-tokens. Полная документация на русском.

Cryptographic primitives come from RustCrypto crates; the library implements JOSE framing, signing input, key/claims models and explicit verification policies. It is not an audited replacement for a mature production library.

  • JWS compact serialization, detached payload, RFC 7797 b64=false, critical-header handling and explicit algorithm allow-lists.
  • HMAC SHA-256/384/512; RSA PKCS#1 v1.5/PSS; ECDSA P-256/P-384/P-521/secp256k1; Ed25519. Unsecured none requires a separate explicit opt-in.
  • JWE compact framing with dir or RSA-OAEP variants and A128GCM/A256GCM. Decryption requires explicit alg/enc allow-lists.
  • JWK/JWK Set models, key ID selection, symmetric key extraction and RFC 7638 thumbprints.
  • Typed registered JWT claims with preserved additional claims. Cryptographic verification and application claim validation are separate operations.
  • Registry snapshots preserve unknown future identifiers. An identifier in the registry does not imply a working cryptographic provider.

JSON serialization has data models, rather than complete signing/decryption APIs. RSA1_5, Ed448, ML-DSA, AES-KW, ECDH-ES, PBES2, CBC-HMAC and A192GCM remain unsupported cryptographic operations.

Окно терминала
cargo test --locked --all-targets
cargo run --locked --example hs256
let policy = VerificationPolicy::new().allow_algorithm("Ed25519");
let verified = jwt::verify(token, &key, &policy, &claims_validation)?;

Caller policy, provider algorithm and key type must agree. Never derive trust solely from the token’s alg. Review SECURITY.md before integration.

Rust 1.85 is required by locked dependencies; the old 1.75 declaration was inaccurate. Local tests were run on Rust 1.98.1. CI checks 1.85 and 1.98.1. CI rejects Clippy warnings in the library. Existing test/example style warnings remain outside that gate.

The current tests cover compact and detached HMAC signing, JWT round trips and explicit rejection of unsecured signatures without opt-in. They do not establish interoperability of every listed provider.

  1. RFC 7520 vectors, negative algorithm/key confusion tests and parser fuzzing.
  2. Complete JSON serialization APIs and JWK-to-provider key import.
  3. Add AES-KW/ECDH-ES/PBES2 only with interoperability coverage.
  4. Review key lifetime, secret storage and errors before production use.

License: AGPL-3.0-or-later.

Source · AGPL-3.0