Repository navigation
llrt offers rind - #472
Closed
kixelated wants to merge 1 commit into
Closed
llrt offers rind#472kixelated wants to merge 1 commit into
kixelated wants to merge 1 commit into
Conversation
Quest-Claim: ecd9ff4fa688e7dc
This was referenced Nov 7, 2026
Collaborator
Author
|
Closing: the maintainer dropped this quest on 2026-11-07 (let projects pull rind rather than send them patches). moq-dev/rind#471 deletes it with the others. (Written by Claude Opus 5.5 with high) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claims quest/m2/adoption/llrt.md.
Summary
llrt gains
crypto-rindandtls-rindon kixelated/llrtcrypto-rind(fork of awslabs/llrt atb7ccc148, v0.10.0-beta), built against rind 0.2.1 and rind-rustls 0.23.0 from crates.io. Nothing lands in rind and nothing was posted to awslabs; the upstream issue and PR are drafted below for the maintainer to post.Two commits:
refactor(crypto): providers hash the message they sign or verify: llrt'sCryptoProvidertook a precomputed digest for ECDSA and RSA. rind signs and verifies only digests it computed (noimport_less_safe, moq-dev/rind#379), so the trait now takes the message plusHashAlgorithm, and the existing rust/ring/graviola/openssl providers hash first through a sharedhash()helper. No behavior change for them.feat: add rind crypto and TLS backends:provider/rind.rsimplements the whole trait on rind;tls-rindwiresrind_rustls::default_provider()through llrt_tls, llrt_http, llrt_fetch, llrt_test_tls and llrt_core; README, docs/install.md,build.ymlrelease mapping,build-modules.yml, andci.ymlmatrix entries mirror graviola's (Linux x64/arm64, macOS arm64, Windows gnu).Fork CI run: kixelated/llrt#1 (draft, fork-internal, not for merge).
Findings
CryptoProvidertrait: every method calls rind. Outside the trait,crypto-rindstill builds what every llrt backend builds:_modern-webcrypto(ChaCha20-Poly1305, SHA-3, cSHAKE from RustCrypto, called directly by llrt's subtle code, not through the provider) and_subtle-full(der/pkcs8/spki encoding, plus ed25519-dalek and x25519-dalek for llrt's own JWK checks).pkcs1is added for RSA key encoding only. Withpqc, ML-KEM, ML-DSA and the hybrid KEMs stay on RustCrypto as on every other backend.OperationError/NotSupportedError, andsubtle.supports()reports them as unsupported. llrt's tests generated 1024-bit RSA keys; they now use 2048, which every backend generates.graviolarelease build iscrypto-graviola-rust: graviola for hashing, HMAC and AES-GCM, RustCrypto for everything else. So against it rind replaces RustCrypto's ECDSA, ECDH, Ed25519, X25519, RSA, AES-CBC/CTR/KW and PBKDF2.Validation
cargo clippy --all-targets -- -D warningsclean forlambda,macro,no-sdk,uncompressedwithcrypto-rind,tls-rind(with and withoutpqc) andcrypto-rust,tls-ring;llrt_cryptoclean withcrypto-openssl;cargo check -p llrt_cryptoclean forcrypto-rust,crypto-ring,crypto-ring-rust,crypto-graviola,crypto-graviola-rust.cargo fmt --checkclean; prettier applied to changed lines only (the touched test files and docs/install.md were already off prettier upstream).cargo test -p llrt_crypto --features crypto-rind: 24 passed.llrt test -d bundle/js/__tests__/unit, x86_64 i7-8700):crypto-rind,tls-rindand thecrypto-rust,tls-ringbaseline fail the identical 60 tests (Temporal/Intl withoutintl402, fetch needing network, buffer and date environment cases, and ML-KEM/ML-DSA withoutpqc). Withpqcadded, the rind build passes every crypto test (1066 passed, 52 environment failures).x86_64-pc-windows-gnutoolchain; rind's CI covers MSVC only) and arm64. The fork CI run covers both.Benchmarks
One pass of
webcrypto-bench.mjs(the WebCrypto timing script below, not committed to llrt) ondesktop, Intel Core Ultra 7 270K Plus (Arrow Lake), pinned to P-core 2 under aquest gate --hosthold, release builds of the three llrt feature sets. µs per op, lower is better.crypto-graviola-rust)crypto-rust)Times include llrt's JS-to-Rust call overhead (the 0.9 µs HMAC row is mostly that). The host carried other non-gated load (load average ~29 on 24 threads), so treat it as one indicative pass. No Graviton numbers: no arm64 host was free; the plan's Graviton claim needs one before the upstream PR leans on it.
webcrypto-bench.mjs
Upstream drafts
llrt has no AI-contribution policy (none in CONTRIBUTING.md or the PR template). Its CONTRIBUTING.md asks for an issue before significant work, and its PR template ends with a licensing confirmation the poster must make themselves. awslabs/llrt#877 ("Reduce number of dependencies of llrt_crypto") is related.
Issue: "Add a rind crypto and TLS backend"
PR: "feat: add rind crypto and TLS backends" (from kixelated/llrt:crypto-rind, after the issue gets a yes)
Choices made without asking
Digest::import_less_safeto rind, keeping rind's moq-dev/rind#379 decision.tls-rindpanics at TLS setup with rind'sMissingFeaturemessage when the CPU lacks a required feature, matching rind's refuse-don't-fall-back rule; every Lambda CPU has them.crypto-rindkeeps llrt's RustCrypto PQC (pqc) and modern-WebCrypto code like every other backend.Waiting
kixelated/llrt:crypto-rindonce it gets a yes and kixelated/llrt#1 is green (recommended: CONTRIBUTING asks for an issue first, and the trait refactor touches every backend); (b) post issue and PR together; (c) hold. The PR template's licensing line is a statement the poster makes. Done when the issue URL is added here.Follow-ups
webcrypto-bench.mjson an arm64 runner before the PR leans on the plan's Graviton pitch. Plan (small, fold into this quest).pqccould run on rind too. Drop unless llrt maintainers ask: llrt's PQC is shared RustCrypto code outside the provider trait.rindWindows jobs fail, addx86_64-pc-windows-gnuto rind's build matrix. Plan only if it fails.Models
(Written by Claude Opus 5.5 with high)
🤖 Generated with Claude Code