Re: BN_rand question

2001-01-18 Thread Ben Laurie
Marco Russo wrote: > > - Original Message - > From: "Ben Laurie" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, January 17, 2001 7:18 PM > Subject: Re: BN_rand question > > > Marco Russo wrote: > > > > > &

Re: BN_rand question

2001-01-18 Thread Marco Russo
- Original Message - From: "Ben Laurie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 7:18 PM Subject: Re: BN_rand question > Marco Russo wrote: > > > > I need to generate a random polynomial in Zp, with p very larg

Re: BN_rand question

2001-01-17 Thread Ben Laurie
Marco Russo wrote: > > I need to generate a random polynomial in Zp, with p very large (1024-2048 > bits). > Sorry for my math...:-(, > but I think that with your method the problem is that the numbers in [0, > p-1] are equally likely only if > (2^(n - 1))mod p = 0, where n is the number of bits

BN_rand question

2001-01-17 Thread Marco Russo
Hi all, how can I use BN_rand to generate a random integer n in the range [0, p-1], where p is a given integer? Thanks