Commitf114337fRecorded30 Apr 2026Repositorysigil-crypto

v0.15.3: import (sigil math) for `quotient` in hkdf-sha256-expand

Message

Stage 0 oversight — hkdf-sha256-expand uses (quotient (+ length 31) 32) to compute the number of HMAC chain rounds, but the (sigil crypto) library body had no explicit imports, so quotient was unbound at runtime. Surfaced when integrating into the enclave-server WEBPUSH delivery path: HKDF-Extract works (it's pure HMAC-SHA256), but HKDF-Expand throws "unbound variable 'quotient'".

Adding the (sigil math) import resolves the symbol. No behavior change to any other primitive.

Patch release; additive-only metadata change.

Changed
 package.sgl          | 2 +-
 src/sigil/crypto.sgl | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
Diff
package.sglmodified
@@ -15,7 +15,7 @@
15
16
(package
17
name: "sigil-crypto"
18
version: "0.15.2"
+18
version: "0.15.3"
19
sigil: "^0.14"
20
description: "Cryptographic functions for Sigil (SHA, HMAC, ECDSA, ECDH, AES-GCM, HKDF, base64, random)"
21
url: "https://codeberg.org/sigil/sigil-crypto"
src/sigil/crypto.sglmodified
@@ -53,6 +53,8 @@
53
hkdf-sha256-expand
54
hkdf-sha256)
55
+56
(import (sigil math))
+57
58
(begin
59
60
;;; Compute the SHA-1 hash of data.