home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
247_02
/
readme.doc
< prev
next >
Wrap
Text File
|
1989-04-19
|
4KB
|
88 lines
MIRACL
Remember when as a naive young computer user, you received delivery of
your brand new state-of-the-art micro; remember your anticipation at the
prospect of the computer power now available at your fingertips; remember
recalling all those articles which promised that "todays microcomputers
are as powerful as yesterdays mainframes". Remember then slowly and
laboriously typing in your first program, to calculate, say, 100! (i.e.
100x99x98..x3x2x1) - a calculation unimaginable by hand.
10 LET X=1
20 FOR I=1 TO 100
30 X=X*I
40 NEXT I
50 PRINT X
60 END
RUN
After a few seconds the result appeared:-
Too big at line 30
Remember your disappointment.
Now try MIRACL. Run the program 'fact' on the distribution diskette, and
type in 100. Theres your answer.
Now run the program 'roots', and ask it to calculate the square root of
2, that is 2 to the power of 1/2. Virtually instantly your computer comes
back with the value correct to 100+ decimal places. Now thats what I call
computing!
Next run the Public Key Cryptography program 'enciph'. When it asks the
name of a file to be enciphered press return. When it asks for an output
filename, type 'FRED' followed by return. Now type in any message,
finishing with CTRL Z (control Z). Your message has been thoroughly
enciphered in the file FRED.OKA (type it out and see). Now run 'deciph',
and type in FRED. Press return for the requested output filename. Your
original message appears on the screen.
This type of encipherment, based as it is on the difficulty of factoring
large numbers, offers much greater security and flexibility than more
traditional methods.
A useful demonstration of the power of MIRACL is given by the program
RATCALC, a powerful scientific calculator - accurate to 36 decimal places
and with the unusual ability to handle fractions directly.
GETTING STARTED
The complete source code for each module in the MIRACL library, and for
each of the example programs is on this disk. Each (except bnmuldv.any)
is written in Standard C, and should compile using any decent C compiler.
The batch files xxDOIT.xxx contain the commands used for the creation of
a library file and the example programs for several popular computers and
compilers. Print out and examine the appropriate file for your
configuration.
Pre-compiled libraries for immediate use with certain popular compilers
may be found on the second diskette: ready-to-run versions of only some
of the example programs may be included, due to lack of space on the
distribution media.
IMPORTANT!
To create a library you will need access to a compiler, a linker, a
librarian utility, and an assembler (optional). Read your compiler
documentation for further details. The file bnmuldv.any, which contains
many versions of the time-critical routine 'muldiv', will need to be
tailored for your configuration. Copy it to a file named bnmuldv.c and
edit this file. Read the manual carefully and the comments in mirdef.h
and bnmuldv.any for details.
The main header file miracl.h may need to be edited if you use an older
type of C compiler, which does not support the new ANSI extensions. See
the comments at the beginning of miracl.h for details.
The file mirdef.h may also need to be edited, if you want to implement
the MIRACL library on a computer other than that originally specified.
The manual is on disk, in manual1.doc and manual2.doc, and should
be printed out on a dot-matrix printer which recognises the IBM PC
extended character set.