Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
PrimeGeneration.PAS
Package: rsa.zip [view]
Upload User: master
Upload Date: 2007-01-06
Package Size: 17k
Code Size: 2k
Category:
Crypt_Decrypt algrithms
Development Platform:
Pascal
- {License, info, etc
- ------------------
- This implementation is made by Walied Othman, to contact me
- mail to Walied.Othman@Student.KULeuven.ac.be or
- Triade@ace.Ulyssis.Student.KULeuven.ac.be, or ICQ me on 20388046.
- If you 're going to use these implementations, at least mention my
- name or something and notify me so I may even put a link on my page.
- This implementation is freeware and according to the coderpunks'
- manifesto it should remain so, so don 't use these implementations
- in commercial applications. Encryption, as a tool to ensure privacy
- should be free and accessible for anyone. If you plan to use these
- implementations in a commercial application, contact me before
- doing so. If any algorithm is patented in your country, you should
- acquire a license before using this software. Modified versions of this
- software must remain in the public domain and must contain an
- acknowledgement of the original author (=me).
- This implementaion is available at
- http://ace.ulyssis.student.kuleuven.ac.be/~triade/GInt/index.htm
- copyright 1999, Walied Othman
- This header may not be removed.}
- Unit PrimeGeneration;
- Interface
- Uses Windows, SysUtils, Controls, GInt;
- Procedure PrimeSearch(Var GInt : TGInt);
- Implementation
- {$H+}
- // Does an incremental search for primes starting from GInt,
- // when one is found, it is stored in GInt
- Procedure PrimeSearch(Var GInt : TGInt);
- Var
- temp, two : TGInt;
- ok : Boolean;
- Begin
- If (GInt^.value Mod 2) = 0 Then GInt^.value := GInt^.value + 1;
- DecStrToGInt('2', two);
- ok := false;
- While Not ok Do
- Begin
- GIntAdd(GInt, two, temp);
- GIntdestroy(GInt);
- GInt := temp;
- GIntPrimeTest(GInt, 5, ok);
- End;
- GIntDestroy(two);
- End;
- End.