From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA05399 for caml-red; Wed, 26 Jul 2000 00:01:47 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA00656 for ; Tue, 25 Jul 2000 11:33:36 +0200 (MET DST) Received: from suburbia.net (suburbia.net [203.4.184.1]) by nez-perce.inria.fr (8.10.0/8.10.0) with ESMTP id e6P9XWf00481 for ; Tue, 25 Jul 2000 11:33:34 +0200 (MET DST) Received: by suburbia.net (Postfix, from userid 110) id 4D0886C4C1; Tue, 25 Jul 2000 19:33:29 +1000 (EST) To: caml-list@inria.fr Subject: Re: Big_int a^x mod m References: Cc: proff@iq.org, quercia@cal.enst.fr From: Julian Assange Date: 25 Jul 2000 19:33:29 +1000 In-Reply-To: Julian Assange's message of "24 Jul 2000 07:29:06 +1000" Message-ID: User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Big Bend) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: weis@pauillac.inria.fr Julian Assange writes: > val (**/) : num -> num -> num > val power_num : num -> num -> num > Exponentiation > > The num library documentation doesn't seem to support modular > exponentiation. This is seems to be an unusual oversight, and means > the library isn't useful for real-world cryptographic applications. > > Is anyone working on adding mod exp's? Or are there other bigint > ocaml libraries? Following this up, there is the fast Numerix library, an extended replacement for Big_int, which also contains a subset of bindings to libgmp (Numerix native code is usally faster than gmp2.x -- but it's worth noting that gmp3.0 has recently been released). It would be nice to see this library replace Big_int entirely, with wrappers for for backwards compatability. Unfortunately Numerix doesn't support modular exponents either, although it does support a lot of other nice operations that Big_int does not, and is well structured. Numerix, btw is not listed either in the Hump or in Gerd's O'Caml link database. But you can find it here: http://pauillac.inria.fr/~quercia/ There is also a naive libgmp ocaml wrapper: http://www.di.ens.fr/~monniaux/download/mlgmp_0.13.tar.gz Which *does* contain bindings to the gmp modular exponentiation functions mpz_powm and mpz_powm_ui. Cheers, Julian.