A method of implementing binary multiplication in a processing device
includes obtaining a multiplicand and a multiplier from a storage device;
in the event the multiplier is larger than a selected length,
partitioning the multiplier into a plurality of multiplier subgroups; in
the event the multiplicand is larger than a selected length, partitioning
the multiplicand into a plurality of multiplicand subgroups and at least
one of zeroing out of unused bits of the multiplicand subgroup and
sign-extending a smaller portion of the multiplicand subgroup;
establishing a plurality of multiplicand multiples based on at least one
of a selected multiplicand subgroup of the plurality of multiplicand
subgroups and the multiplicand; selecting one or more of the multiplicand
multiples of the plurality of multiplicand multiples based on the each
multiplier subgroup of the plurality of multiplier subgroups; and
generating a first modular product based on the selected multiplicand
multiples.