Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Q: Are we not men? A: We are Vaxen.


sci / sci.crypt.random-numbers / Re: generateur p1.mod(p2)

SubjectAuthor
* generateur p1.mod(p2)remy
+- Re: generateur p1.mod(p2)remy
`- Re: generateur p1.mod(p2)Nomen Nescio

1
Subject: generateur p1.mod(p2)
From: remy
Newsgroups: sci.crypt.random-numbers
Organization: Guest of ProXad - France
Date: Tue, 22 Dec 2020 13:07 UTC
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp1-1.free.fr!not-for-mail
Newsgroups: sci.crypt.random-numbers
X-Mozilla-News-Host: news://proxad.free.adsl.degroupage:119
From: remy@fctpas.fr (remy)
Subject: generateur p1.mod(p2)
Date: Tue, 22 Dec 2020 14:07:41 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: fr
Content-Transfer-Encoding: 7bit
Lines: 79
Message-ID: <5fe1ef9a$0$3263$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 22 Dec 2020 14:07:38 CET
NNTP-Posting-Host: 178.16.162.106
X-Trace: 1608642458 news-2.free.fr 3263 178.16.162.106:40674
X-Complaints-To: abuse@proxad.net
View all headers

hello

take 2 prime numbers (p1)mod(p2) and change the two prime numbers

cdl remy

import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

public class gene
{ static FileOutputStream file;
public static void main(String args[])
{

BigInteger p1,p2,tmpp1,tmpp2;
String p;

//initialisation if args[] is empy
Random rnd = new Random();
p1 = BigInteger.probablePrime(512, rnd);
p2 = BigInteger.probablePrime(128, rnd);
tmpp1=p1;
tmpp2=p2;

try {file=new FileOutputStream ("sortie08.bin");
} catch (FileNotFoundException e){System.out.println(e);}

while(true)
{ p=(p1.mod(p2)).toString(2);
write(p.substring(0,p.length()-3));
p1=newP(p1,p1.toString(2).length());
p2=newP(p2,p2.toString(2).length());
if(p1.toString(2).length()>1024)
{p1 =newP(tmpp1,tmpp1.toString(2).length()/2);tmpp1=p1;}
if(p2.toString(2).length()>256)
{p2 =newP(tmpp2,tmpp2.toString(2).length()/2);tmpp2=p2;}

}
}

public static void write(String p)
{ byte monByte;
String t;
int max=(int)p.length()/8-2;
for(int i=0;i<max;i++)
{ t=p.substring(p.length()-(i+1)*8,p.length()-i*8);
monByte = (byte)Integer.parseInt(t,2);
System.out.println(t+" "+monByte);
try {file.write(monByte);
} catch (IOException e){System.out.println(e);}
}

}

public static BigInteger newP(BigInteger p,int n )
{ BigInteger pow=new BigInteger("2");
pow=pow.pow(n);
p=p.add(pow);
int qtTest=0;
while(!p.isProbablePrime(100)){ p=p.add(pow);qtTest++;}
//System.out.println("qt de test pour generer un nombre
premier"+qtTest+" taille en base 2 "+p.toString(2).length());
return p;
} }

--
http://remyaumeunier.chez-alice.fr/
toujours autant dyslexique

Subject: Re: generateur p1.mod(p2)
From: remy
Newsgroups: sci.crypt.random-numbers
Organization: Guest of ProXad - France
Date: Mon, 11 Jan 2021 09:34 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!fdn.fr!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp1-1.free.fr!not-for-mail
Subject: Re: generateur p1.mod(p2)
Newsgroups: sci.crypt.random-numbers
References: <5fe1ef9a$0$3263$426a74cc@news.free.fr>
From: remy@fctpas.fr (remy)
Date: Mon, 11 Jan 2021 10:34:16 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <5fe1ef9a$0$3263$426a74cc@news.free.fr>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: fr
Content-Transfer-Encoding: quoted-printable
Lines: 1661
Message-ID: <5ffc1b8d$0$19447$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 11 Jan 2021 10:34:05 CET
NNTP-Posting-Host: 178.16.162.106
X-Trace: 1610357645 news-3.free.fr 19447 178.16.162.106:47334
X-Complaints-To: abuse@proxad.net
View all headers

Le 22/12/2020 à 14:07, remy a écrit :
> hello
>
> take 2 prime numbers (p1)mod(p2) and change the two prime numbers
>
> cdl remy
>
>
> import java.util.*;
> import java.lang.*;
> import java.math.*;
> import java.io.*;
>
>
> public class gene
> {
> static FileOutputStream file;
> public static void main(String args[])
> {
>
> BigInteger p1,p2,tmpp1,tmpp2;
> String p;
>
> //initialisation if args[] is empy
> Random rnd = new Random();
> p1 = BigInteger.probablePrime(512, rnd);
> p2 = BigInteger.probablePrime(128, rnd);
> tmpp1=p1;
> tmpp2=p2;
>
>
> try {file=new FileOutputStream ("sortie08.bin");
> } catch (FileNotFoundException e){System.out.println(e);}
>
> while(true)
> {
> p=(p1.mod(p2)).toString(2);
> write(p.substring(0,p.length()-3));
> p1=newP(p1,p1.toString(2).length());
> p2=newP(p2,p2.toString(2).length());
> if(p1.toString(2).length()>1024)
> {p1 =newP(tmpp1,tmpp1.toString(2).length()/2);tmpp1=p1;}
> if(p2.toString(2).length()>256)
> {p2 =newP(tmpp2,tmpp2.toString(2).length()/2);tmpp2=p2;}
>
> }
> }
>
> public static void write(String p)
> {
> byte monByte;
> String t;
> int max=(int)p.length()/8-2;
> for(int i=0;i<max;i++)
> {
> t=p.substring(p.length()-(i+1)*8,p.length()-i*8);
> monByte = (byte)Integer.parseInt(t,2);
> System.out.println(t+" "+monByte);
> try {file.write(monByte);
> } catch (IOException e){System.out.println(e);}
> }
>
> }
>
> public static BigInteger newP(BigInteger p,int n )
> {
> BigInteger pow=new BigInteger("2");
> pow=pow.pow(n);
> p=p.add(pow);
> int qtTest=0;
> while(!p.isProbablePrime(100)){ p=p.add(pow);qtTest++;}
> //System.out.println("qt de test pour generer un nombre
> premier"+qtTest+" taille en base 2 "+p.toString(2).length());
> return p;
> }
> }
>

Hello
I saw the result of the tests on a file

cdl remy

Value Char Occurrences Fraction

0 47118 0.003871

1 47218 0.003879

2 47543 0.003906

3 47683 0.003917

4 47960 0.003940

5 47019 0.003863

6 47506 0.003903

7 47650 0.003915

8 47461 0.003899

9 47660 0.003915

10 47642 0.003914

11 47710 0.003920

12 47863 0.003932

13 47442 0.003898

14 47399 0.003894

15 47221 0.003879

16 47749 0.003923

17 47310 0.003887

18 47075 0.003867

19 47843 0.003931

20 47475 0.003900

21 47354 0.003890

22 47235 0.003881

23 47810 0.003928

24 47432 0.003897

25 47958 0.003940

26 47494 0.003902

27 47789 0.003926

28 47612 0.003912

29 47413 0.003895

30 47462 0.003899

31 47576 0.003909

32 47751 0.003923

33 ! 47552 0.003907

34 " 47592 0.003910

35 # 47480 0.003901

36 $ 47566 0.003908

37 % 47078 0.003868

38 & 47493 0.003902

39 ' 47134 0.003872

40 ( 47398 0.003894

41 ) 47587 0.003909

42 * 47291 0.003885

43 + 47726 0.003921

44 , 47506 0.003903

45 - 47745 0.003922

46 . 47653 0.003915

47 / 47929 0.003938

48 0 47628 0.003913

49 1 47426 0.003896

50 2 47755 0.003923

51 3 47790 0.003926

52 4 47603 0.003911

53 5 47698 0.003919

54 6 47184 0.003876

55 7 47217 0.003879

56 8 47605 0.003911

57 9 47396 0.003894

58 : 47378 0.003892

59 ; 47583 0.003909

60 < 47762 0.003924

61 = 47351 0.003890

62 > 47620 0.003912

63 ? 47428 0.003896

64 @ 47700 0.003919

65 A 47494 0.003902

66 B 47508 0.003903

67 C 47850 0.003931

68 D 47306 0.003886

69 E 47659 0.003915

70 F 47668 0.003916

71 G 47522 0.003904

72 H 47446 0.003898

73 I 47369 0.003892

74 J 47602 0.003911

75 K 47514 0.003903

76 L 47756 0.003923

77 M 47876 0.003933

78 N 47345 0.003890

79 O 47429 0.003896

80 P 47872 0.003933

81 Q 47807 0.003928

82 R 47513 0.003903

83 S 47524 0.003904

84 T 47348 0.003890

85 U 47921 0.003937

86 V 48021 0.003945

87 W 47595 0.003910

88 X 47936 0.003938

89 Y 47534 0.003905

90 Z 47845 0.003931

91 [ 46976 0.003859

92 \ 47364 0.003891

93 ] 47713 0.003920

94 ^ 47699 0.003919

95 _ 47700 0.003919

96 ` 47503 0.003903

97 a 47267 0.003883

98 b 47925 0.003937

99 c 47918 0.003937

100 d 47258 0.003882

101 e 47570 0.003908

102 f 47724 0.003921

103 g 47514 0.003903

104 h 47623 0.003912

105 i 47320 0.003888

106 j 47424 0.003896

107 k 47249 0.003882

108 l 47874 0.003933

109 m 47418 0.003896

110 n 47848 0.003931

111 o 47666 0.003916

112 p 47665 0.003916

113 q 47654 0.003915

114 r 47252 0.003882

115 s 47732 0.003921

116 t 47713 0.003920

117 u 47246 0.003881

118 v 47393 0.003894

119 w 47537 0.003905

120 x 47291 0.003885

121 y 47610 0.003911

122 z 47367 0.003891

123 { 47087 0.003868

124 | 47609 0.003911

125 } 48039 0.003947

126 ~ 47394 0.003894

127 47797 0.003927

128 47507 0.003903

129 47681 0.003917

130 47681 0.003917

131 47489 0.003901

132 48065 0.003949

133 47689 0.003918

134 47589 0.003910

135 47569 0.003908

136 47536 0.003905

137 47567 0.003908

138 47821 0.003929

139 47569 0.003908

140 47065 0.003867

141 47207 0.003878

142 47187 0.003877

143 47440 0.003897

144 47717 0.003920

145 47351 0.003890

146 47368 0.003891

147 47712 0.003920

148 47610 0.003911

149 47463 0.003899

150 47218 0.003879

151 47275 0.003884

152 47460 0.003899

153 47305 0.003886

154 47369 0.003892

155 47440 0.003897

156 47747 0.003923

157 47666 0.003916

158 47532 0.003905

159 47743 0.003922

160 47251 0.003882

161 ¡ 47285 0.003885

162 ¢ 47759 0.003924

163 £ 47687 0.003918

164 € 47644 0.003914

165 ¥ 47665 0.003916

166 Š 47572 0.003908

167 § 47665 0.003916

168 š 47523 0.003904

169 © 47775 0.003925

170 ª 47835 0.003930

171 « 47851 0.003931

172 ¬ 47605 0.003911

173 ­ 47217 0.003879

174 ® 47286 0.003885

175 ¯ 47558 0.003907

176 ° 47656 0.003915

177 ± 47761 0.003924

178 ² 47469 0.003900

179 ³ 47353 0.003890

180 Ž 47439 0.003897

181 µ 47993 0.003943

182 ¶ 47488 0.003901

183 · 47782 0.003925

184 ž 47933 0.003938

185 ¹ 47500 0.003902

186 º 47069 0.003867

187 » 47626 0.003913

188 Œ 47289 0.003885

189 œ 47394 0.003894

190 Ÿ 47393 0.003894

191 ¿ 47600 0.003911

192 À 47656 0.003915


Click here to read the complete article
Subject: Re: generateur p1.mod(p2)
From: Nomen Nescio
Newsgroups: sci.crypt.random-numbers
Organization: dizum.com - The Internet Problem Provider
Date: Sun, 10 Apr 2022 02:02 UTC
References: 1
From: nobody@dizum.com (Nomen Nescio)
References: <5fe1ef9a$0$3263$426a74cc@news.free.fr>
Subject: Re: generateur p1.mod(p2)
Message-ID: <4504b636f50f3255903243a2e7fb0bd3@dizum.com>
Date: Sun, 10 Apr 2022 04:02:18 +0200 (CEST)
Newsgroups: sci.crypt.random-numbers
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!alphared!sewer!news.dizum.net!not-for-mail
Organization: dizum.com - The Internet Problem Provider
X-Abuse: abuse@dizum.com
Injection-Info: sewer.dizum.com - 2001::1/128
View all headers

ton programme java est-il autant dyslexique que toi ?

"remy" <remy@fctpas.fr> a �crit dans le message de news:
5fe1ef9a$0$3263$426a74cc@news.free.fr...
> hello
>
> take 2 prime numbers (p1)mod(p2) and change the two prime numbers
>
> cdl remy
>
>
> import java.util.*;
> import java.lang.*;
> import java.math.*;
> import java.io.*;
>
>
> public class gene
> {
> static FileOutputStream file;
> public static void main(String args[])
> {
>
> BigInteger p1,p2,tmpp1,tmpp2;
> String p;
>
> //initialisation if args[] is empy
> Random rnd = new Random();
> p1 = BigInteger.probablePrime(512, rnd);
> p2 = BigInteger.probablePrime(128, rnd);
> tmpp1=p1;
> tmpp2=p2;
>
>
> try {file=new FileOutputStream ("sortie08.bin");
> } catch (FileNotFoundException e){System.out.println(e);}
>
> while(true)
> {
> p=(p1.mod(p2)).toString(2);
> write(p.substring(0,p.length()-3));
> p1=newP(p1,p1.toString(2).length());
> p2=newP(p2,p2.toString(2).length());
> if(p1.toString(2).length()>1024)
> {p1 =newP(tmpp1,tmpp1.toString(2).length()/2);tmpp1=p1;}
> if(p2.toString(2).length()>256)
> {p2 =newP(tmpp2,tmpp2.toString(2).length()/2);tmpp2=p2;}
>
> }
> }
>
> public static void write(String p)
> {
> byte monByte;
> String t;
> int max=(int)p.length()/8-2;
> for(int i=0;i<max;i++)
> {
> t=p.substring(p.length()-(i+1)*8,p.length()-i*8);
> monByte = (byte)Integer.parseInt(t,2);
> System.out.println(t+" "+monByte);
> try {file.write(monByte);
> } catch (IOException e){System.out.println(e);}
> }
>
> }
>
> public static BigInteger newP(BigInteger p,int n )
> {
> BigInteger pow=new BigInteger("2");
> pow=pow.pow(n);
> p=p.add(pow);
> int qtTest=0;
> while(!p.isProbablePrime(100)){ p=p.add(pow);qtTest++;}
> //System.out.println("qt de test pour generer un nombre premier"+qtTest+"
> taille en base 2 "+p.toString(2).length());
> return p;
> }
> }
>
> --
> http://remyaumeunier.chez-alice.fr/
> toujours autant dyslexique

1

rocksolid light 0.9.8
clearnet tor