Re: modular arithmetic (in finite field - part of elliptic curves)
- To: mathgroup at smc.vnet.net
- Subject: [mg84756] Re: [mg84747] modular arithmetic (in finite field - part of elliptic curves)
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sat, 12 Jan 2008 05:21:43 -0500 (EST)
- References: <200801120315.WAA19581@smc.vnet.net>
On 12 Jan 2008, at 12:15, Peppy wrote:
> Part of my calculations give me
> 11/20 mod 23
>
> How can this be expressed as a whole number?
>
> I know 1/20 mod 23 = 15
> seeing that 15 * 20 mod 23 = 1 (inverse mod mult)
>
> Just wondering if it'd be 11 * 15 mod 23 which is 4?
>
One way:
Mod[11*PowerMod[20, -1, 23], 23]
4
Anoter way:
Solve[{x*20 == 11, Modulus == 23}, x, Mode -> Modular]
{{Modulus -> 23, x -> 4}}
Yet another way:
Reduce[x*20 == 11, x, Modulus -> 23]
x == 4
and so on ....
Andrzej Kozlowski
- References:
- modular arithmetic (in finite field - part of elliptic curves)
- From: Peppy <BrenOMahony@gmail.com>
- modular arithmetic (in finite field - part of elliptic curves)