Skip to content

Fix Raz input padding and restore CI builds - #18

Draft
y-richie-y wants to merge 3 commits into
mainfrom
fix/raz-input-padding
Draft

y-richie-y wants to merge 3 commits into
mainfrom
fix/raz-input-padding

Conversation

@y-richie-y

@y-richie-y y-richie-y commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Short second inputs to Raz.extract were padded with a negative repetition count, leaving the buffer shorter than the native NTT expects. Reverse the subtraction so inputs are zero-extended to the field width before transform padding.

Add nine regression cases across three field sizes, covering one-bit, short, and full-width inputs. They check equivalence with explicit zero extension and preservation of the caller's input. A buffer-length guard prevents the original bug from causing an out-of-bounds native read during the regression test.

Validation: all 104 Python tests pass; six new cases fail before the fix and all nine pass afterward. Flake8 and git diff --check pass. Tests use the unchanged native extension from the published Cryptomite 0.3.0 macOS arm64 / Python 3.11 wheel, so no binding regeneration or native rebuild was needed for the fix.

Pin package and documentation CI to Ubuntu 22.04: the newer ubuntu-latest image cannot install Python 3.9 for package checks or Python 3.8 for documentation. This preserves the existing Python test matrix.

@y-richie-y y-richie-y changed the title Fix zero padding for short Raz extractor inputs Fix Raz input padding and restore CI builds Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant