uh oh... I just got quarantined because I said something distantly =
related to a "F" word in the last line of this message. Are you kidding =
me??
- DM
On Jan 31, 2010, at 04:29 AM, David McClain wrote:
> Hi Marcel,
>=20
> No, it needs to be a 1024-bit prime P =3D3D 2*Q+1 with Q also prime. =
We =3D
> want a maximal length subgroup of length P-1 so that we don't get =3D
> trapped in a short-cycle subgroup a you would if Q were composite. P =3D=
> itself must be prime or the SRP-6 (which is using a variant of =3D
> Diffie-Hellman) won't work properly. So if P is 1024 bits then Q is =
1023 =3D
> bits, right?
>=20
> Miller-Rabin is a good start, but it is not definitive. You also need =
to =3D
> test with a probabilistic Lucas test, which tests for the probability =
=3D
> that a number is composite -- goes the other way from Miller-Rabin, =
see?
>=20
> And you need Bignum modulo arithmetic, conversion from strings to =3D
> numeric bytes in the SHA256 hashings (not a problem for Forth, eh? I =3D=
> have to do an explicit conversion in Lisp because characters are most =
=3D
> likely 32-bit composite objects, or 16-bit Unicode at the very least, =
or =3D
> maybe UTF-8, your choice...)
>=20
> So, floating point is out. You need multi-byte or multi-word =
arithmetic =3D
> to pull this off. You can do it! Sure you can in Forth! Really! But it =
=3D
> may take you a while. Then too, I didn't specify how this information =
=3D
> gets sent across the network. In Butterfly's case it is serialized =
(aka =3D
> Marshaled) and retains whatever data type it is. In your case you =
could =3D
> be as blunt as text transfer, or even fixed-length binary. I don't =
care.=3D20=3D
>=20
>=20
> But unless you happen to have all the parts already laying about, my =3D=
> hunch is that it is going to take you a little longer than an hour or =
=3D
> so... In Lisp, no problem. Numbers (integers) can be as many digits as =
=3D
> you like, and they expand on demand. Don't even think twice about it. =
=3D
> It's built-in.
>=20
> So that Bignum arithmetic, plus the need for platform independence, =
plus =3D
> the need for a "portable dialect" (heh!) of Forth, probably is gonna =3D=
> stop you in your track pretty quickly.
>=20
> Forth can't be standardized, because it is a friggin domain-specific =3D=
> language (DSL). That's what is so great about it!!!!
>=20
> - DM
>=20
>=20
> On Jan 31, 2010, at 04:19 AM, Marcel Hendrix wrote:
>=20
>> David McClain <dbm_at_refined-audiometrics.com> writes Re: generating =3D
> self-contained dlls: sf or swiftx?
>> =3D20
>>> You will need to be able to generate a 1024-bit prime number of the =
=3D
> form
>>> P =3D3D 2*N+1, ...
>> =3D20
>> Would you approve of:=3D20
>> =3D20
>> 1. generating a 511 bit random number N (bit 511 =3D3D 1)
>> 2. calculate 2*N+1
>> 3. test with Miller-Rabin for p times.
>> =3D20
>> How sure do you need to be that it is really a prime number?
>> How fast should it be?
>> =3D20
>> -marcel
>> =3D20
>> =3D20
>> =3D20
>> =3D20
>> =
----------------------------------------------------------------------
>> sftalk_at_forth.com The SwiftForth programming discussion email =
list
>> To unsubscribe, send subject "unsubscribe" to =
sftalk-request_at_forth.com
>> For list command help, send subject "help" to =
sftalk-request_at_forth.com
>> Message archives are located at http://www.forth.com/archive/sftalk
>> =
----------------------------------------------------------------------
>> This list is a forum for SwiftForth users. For product support and
>> bug reports, please send email to support_at_forth.com
>> =
----------------------------------------------------------------------
>> =3D20
>> =3D20
>=20
> Dr. David McClain
> dbm_at_refined-audiometrics.com
>=20
>=20
>=20
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
> bug reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>=20
>=20
Dr. David McClain
dbm_at_refined-audiometrics.com
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sun Jan 31 2010 - 03:37:05 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.