#!/usr/bin/env perl # # Copyright Supranational LLC # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # # "Sparse" in subroutine names refers to most significant limb of the # modulus. Though "sparse" is a bit of misnomer, because limitation is # just not-all-ones. Or in other words not larger than 2^256-2^192-1. # In general Montgomery multiplication algorithm can handle one of the # inputs being non-reduced and capped by 1<