update usages of miller-rabin

db4
Doug Coleman 2009-05-10 12:24:43 -05:00 committed by Sascha Matzke
parent 9ab5ffa636
commit f30cdb1ea3
7 changed files with 15 additions and 14 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman. ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax kernel sequences math ; USING: help.markup help.syntax kernel sequences math ;
IN: math.miller-rabin IN: math.primes.miller-rabin
HELP: find-relative-prime HELP: find-relative-prime
{ $values { $values
@ -82,8 +82,8 @@ HELP: unique-primes
} }
{ $description "Generates a sequence of " { $snippet "n" } " unique prime numbers with exactly " { $snippet "numbits" } " bits." } ; { $description "Generates a sequence of " { $snippet "n" } " unique prime numbers with exactly " { $snippet "numbits" } " bits." } ;
ARTICLE: "math.miller-rabin" "Miller-Rabin probabilistic primality test" ARTICLE: "math.primes.miller-rabin" "Miller-Rabin probabilistic primality test"
"The " { $vocab-link "math.miller-rabin" } " vocabulary implements the Miller-Rabin probabilistic primality test and utility words that use it in order to generate random prime numbers." $nl "The " { $vocab-link "math.primes.miller-rabin" } " vocabulary implements the Miller-Rabin probabilistic primality test and utility words that use it in order to generate random prime numbers." $nl
"The Miller-Rabin probabilistic primality test:" "The Miller-Rabin probabilistic primality test:"
{ $subsection miller-rabin } { $subsection miller-rabin }
{ $subsection miller-rabin* } { $subsection miller-rabin* }
@ -97,4 +97,4 @@ ARTICLE: "math.miller-rabin" "Miller-Rabin probabilistic primality test"
{ $subsection next-safe-prime } { $subsection next-safe-prime }
{ $subsection random-safe-prime } ; { $subsection random-safe-prime } ;
ABOUT: "math.miller-rabin" ABOUT: "math.primes.miller-rabin"

View File

@ -1,6 +1,6 @@
USING: math.miller-rabin tools.test kernel sequences USING: math.primes.miller-rabin tools.test kernel sequences
math.miller-rabin.private math ; math.primes.miller-rabin.private math ;
IN: math.miller-rabin.tests IN: math.primes.miller-rabin.tests
[ f ] [ 473155932665450549999756893736999469773678960651272093993257221235459777950185377130233556540099119926369437865330559863 miller-rabin ] unit-test [ f ] [ 473155932665450549999756893736999469773678960651272093993257221235459777950185377130233556540099119926369437865330559863 miller-rabin ] unit-test
[ t ] [ 2 miller-rabin ] unit-test [ t ] [ 2 miller-rabin ] unit-test

View File

@ -3,7 +3,7 @@
USING: combinators kernel locals math math.functions math.ranges USING: combinators kernel locals math math.functions math.ranges
random sequences sets combinators.short-circuit math.bitwise random sequences sets combinators.short-circuit math.bitwise
math math.order ; math math.order ;
IN: math.miller-rabin IN: math.primes.miller-rabin
: >odd ( n -- int ) 0 set-bit ; foldable : >odd ( n -- int ) 0 set-bit ; foldable

View File

@ -1,7 +1,8 @@
! Copyright (C) 2007-2009 Samuel Tardieu. ! Copyright (C) 2007-2009 Samuel Tardieu.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: combinators kernel math math.functions math.miller-rabin USING: combinators kernel math math.functions
math.order math.primes.erato math.ranges sequences ; math.primes.miller-rabin math.order math.primes.erato
math.ranges sequences ;
IN: math.primes IN: math.primes
<PRIVATE <PRIVATE

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Doug Coleman. ! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: math.miller-rabin kernel math math.functions namespaces USING: math.primes.miller-rabin kernel math math.functions
sequences accessors ; namespaces sequences accessors ;
IN: crypto.rsa IN: crypto.rsa
! The private key is the only secret. ! The private key is the only secret.

View File

@ -1,7 +1,7 @@
! Copyright (c) 2007-2009 Aaron Schaefer. ! Copyright (c) 2007-2009 Aaron Schaefer.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays kernel lists make math math.functions math.matrices USING: accessors arrays kernel lists make math math.functions math.matrices
math.miller-rabin math.order math.parser math.primes.factors math.primes.miller-rabin math.order math.parser math.primes.factors
math.primes.lists math.ranges math.ratios namespaces parser prettyprint math.primes.lists math.ranges math.ratios namespaces parser prettyprint
quotations sequences sorting strings unicode.case vocabs vocabs.parser quotations sequences sorting strings unicode.case vocabs vocabs.parser
words ; words ;

View File

@ -1,5 +1,5 @@
USING: kernel math sequences namespaces USING: kernel math sequences namespaces
math.miller-rabin math.functions accessors random ; math.primes.miller-rabin math.functions accessors random ;
IN: random.blum-blum-shub IN: random.blum-blum-shub
! Blum Blum Shub, n = pq, x_i+1 = x_i ^ 2 mod n ! Blum Blum Shub, n = pq, x_i+1 = x_i ^ 2 mod n