HW 4.1

0 views
Skip to first unread message

Crista

unread,
Apr 28, 2009, 7:15:24 PM4/28/09
to 480-uw09
On problem 1 for homework 4 I am getting a Run time Error when I try
to compute the secret key g^(a*b).

b is supposed to be a random integer between 1 and p, right? I know
that randint(x,y) includes x and y, should I use another function?

Thanks for the help!

Crista Moreno
mor...@u.washington.edu

William Stein

unread,
Apr 28, 2009, 7:17:56 PM4/28/09
to 480-...@googlegroups.com
On Tue, Apr 28, 2009 at 4:15 PM, Crista <mor...@u.washington.edu> wrote:
>
> On problem 1 for homework 4 I am getting a Run time Error when I try
> to compute the secret key g^(a*b).

Without knowing more details I can't think of any helpful advice.

> b is supposed to be a random integer between 1 and p, right?

b should be between 1 and p-1.

>  I know
> that randint(x,y) includes x and y, should I use another function?

No, that should be fine.

William

Reply all
Reply to author
Forward
0 new messages