,jd fails with 'Exception in hmac: crypto error (rc=-2)' after ,unlock #87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On macOS, after a successful
,unlock("Unlocked 806 embedded files."), every,jdcommand fails immediately:Reproduced with
,jd lswhile the embed store is unlocked.Reproduction
,unlock→ passphrase accepted, files unlocked.,jd ls→jdisk error: Exception in hmac: crypto error (rc=-2)Environment
jsh-macosbinary0.10.53Analysis
The error chain:
(
vendor/jerboa-shell-extras/vendor/jerboa-drive/jdrive/s3/namecrypto.ss,hkdf-sha256-expand, andcomponent-nonce), callinghmac-sha256from the(jerboa-crypto)library.(jerboa-crypto)'shmaccalls the C entryjerboa_hmacand raises(error 'hmac "crypto error (rc=...)")viacheck-rc(
jerboa-crypto/src/jerboa-crypto.ss:278-280), which is what prints asException in hmac: crypto error (rc=-2).-2comes from the ffi shimjerboa_hmac(
support/extras-jdisk-crypto-compat.c:286-296): it returns-2wheneverjerboa_hmac_sha256(the ring-backed Rust native) returns non-zero — whichincludes the dynamic-stub path where
dlsym("jerboa_hmac_sha256")fails andthe resolver returns
-1(jc_hmac_sha256, lines 77-83).So the hmac native symbol is effectively missing/unresolvable in this build.
Note the mainline builds dropped the OpenSSL jerboa-crypto shim in favor of the
Rust ring natives; jdrive/jdisk still reaches
jerboa_hmacthrough the(jerboa-crypto)ABI, and this is the integration seam that is broken on themacOS binary at VERSION 0.10.53.
Suggested investigation
jerboa_hmac_sha256is resolved (static link oflibjerboa_native.avs
JSH_FFI_DYNAMIC_STUB_EMBEDdlsym path) in the failingjsh-macosbuildand whether
jerboa_hmacis routed through the ring native.make features-allextras integration) can performa
hmac-sha256round-trip, e.g. via,jd unlock-test/ a small HKDF name-encryption path, beforels.the natives) so
,unlocksucceeds while name-crypto's HMAC path fails.