akimp3

April 28th, 2002, 15:30

Hi

i have read the blum blum shub algo in applied cryptography(Bruce Schiner).

As i have understand the program should be like this:

//p=7 q=19 n=133

#include<iostream.h>

main(){

int n=133;

int s=11;

int x[14];

int b[14];

x[0]=((s*s)%n); //x0=s^2 mod n

for (int i=0;i<14;i++)

{

x[I]=((x[i-1]*x[i-1])% n);

b[I]=x[I]&1;

cout<< b[I];

}

}

This program give me a 14 digit random that i can use for the

Password.My question is if I want to produce 10000 random passwords I have to give p and q 10000 different number that

produce n witch is a blum integer.The problem is that this

number should be produced randomly i mean i have to produce

a big quantity of prime number p and q each congruent to 3 modulo 4 and different from the latest produced number.

As my program should produce n batch of card and each batch

contain 10000 different password I don't know how to produce

p and q.

Please give me some hints.

Thank in advance

akimp3

i have read the blum blum shub algo in applied cryptography(Bruce Schiner).

As i have understand the program should be like this:

//p=7 q=19 n=133

#include<iostream.h>

main(){

int n=133;

int s=11;

int x[14];

int b[14];

x[0]=((s*s)%n); //x0=s^2 mod n

for (int i=0;i<14;i++)

{

x[I]=((x[i-1]*x[i-1])% n);

b[I]=x[I]&1;

cout<< b[I];

}

}

This program give me a 14 digit random that i can use for the

Password.My question is if I want to produce 10000 random passwords I have to give p and q 10000 different number that

produce n witch is a blum integer.The problem is that this

number should be produced randomly i mean i have to produce

a big quantity of prime number p and q each congruent to 3 modulo 4 and different from the latest produced number.

As my program should produce n batch of card and each batch

contain 10000 different password I don't know how to produce

p and q.

Please give me some hints.

Thank in advance

akimp3