Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting the base correctly #1299

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

OlivierBBB
Copy link
Collaborator

No description provided.

@OlivierBBB OlivierBBB added the bug Something isn't working label Sep 24, 2024
@OlivierBBB OlivierBBB self-assigned this Sep 24, 2024
@OlivierBBB OlivierBBB linked an issue Sep 24, 2024 that may be closed by this pull request
final int firstOffset = BASE_MIN_OFFSET;
if (callData.size() > firstOffset) {
final int sizeToExtract = Math.min(bbsInt(), callData.size() - firstOffset);
unpadded = callData.slice(BASE_MIN_OFFSET, sizeToExtract);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were using MBS_MIN_OFFSET as opposed to BASE_MIN_OFFSET. Also the comparisons have to be strict.

Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

Copy link
Collaborator

@lorenzogentile404 lorenzogentile404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OlivierBBB OlivierBBB enabled auto-merge (squash) September 24, 2024 13:14
@OlivierBBB OlivierBBB merged commit 00372ce into arith-dev Sep 24, 2024
5 checks passed
@OlivierBBB OlivierBBB deleted the 1298-base-in-modexp-is-incorrectly-set branch September 24, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Base in Modexp is incorrectly set
4 participants