Skip to content

modexp: use intx::shl() and intx::shr() #1820

Open

Description

@chfast

modexp.cpp has its own shr() for word spans (line 120): it moves the words and then shifts the bits with its own loop. intx has public intx::shl() and intx::shr() for word spans (shifts below 64 bits), which can do the bit part. On the next intx update rem() also has to follow the division kernels, which normalize the words themselves since chfast/intx#412, #413 and #420, so the normalization shifts there go away.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions