| 2258 | } |
| 2259 | |
| 2260 | Integer MontgomeryRepresentation::Square(const Integer &a) const |
| 2261 | { |
| 2262 | word *const T = workspace.ptr; |
| 2263 | word *const R = result.reg.ptr; |
| 2264 | const unsigned int N = modulus.reg.size; |
| 2265 | assert(a.reg.size<=N); |
| 2266 | |
| 2267 | RecursiveSquare(T, T+2*N, a.reg, a.reg.size); |
| 2268 | SetWords(T+2*a.reg.size, 0, 2*N-2*a.reg.size); |
| 2269 | MontgomeryReduce(R, T+2*N, T, modulus.reg, u.reg, N); |
| 2270 | return result; |
| 2271 | } |
| 2272 | |
| 2273 | Integer MontgomeryRepresentation::ConvertOut(const Integer &a) const |
| 2274 | { |
nothing calls this directly
no test coverage detected