crypto.modpow
Computes modular exponentiation (base^exponent mod modulus) from integer strings, returning the residue as an integer string for cryptographic and modular arithmetic calculations.
Instructions
모듈러 거듭제곱 base^exponent mod modulus 를 구한다. 세 인자는 정수 문자열(자릿수 한도 2048)이며 modulus 는 1 이상, exponent 는 0 이상이어야 한다. result 는 0 이상 modulus 미만의 정수 문자열이다. 음수 지수로 역원을 구하려면 modinv 를 쓴다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| modulus | Yes | ||
| exponent | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| result | Yes |