File: README

package info (click to toggle)
systemc 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,768 kB
  • sloc: cpp: 181,958; sh: 4,925; asm: 2,700; perl: 1,980; ansic: 1,931; makefile: 1,761; fortran: 492; python: 482; awk: 157; csh: 50
file content (38 lines) | stat: -rw-r--r-- 2,072 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

 README for the RSA example:
===================================================================

 rsa.cpp is an implementation of the RSA public-key cipher. The
 implementation is based on the one given in the book Cormen et al.,
 Inroduction to Algorithms, McGRAW Hill, 1991. I'll refer to this book
 as CLR because of its authors. The purpose of this implementation is
 to show the usage of arbitrary precision types of SystemC. That is,
 these types in SystemC can be used to implement algorithmic examples
 regarding arbitrary precision integers. The algorithms used are not
 the most efficient ones; however, they are intended for explanatory
 purposes, so they are simple to understand and perform their job
 correctly.

 Some background knowledge: A prime number p > 1 is an integer that
 has only two divisiors, 1 and p itself. For example, 2, 3, 5, 7, and
 11 are all primes. If p is not a prime number, it is called a
 composite number. If we are given two primes p and q, it is easy to
 find their product p * q; however, if we are given a number m which
 happens to be the product of two primes p and q that we do not know,
 it is very difficult to find p and q if m is very large, i.e., it is
 very difficult to factor m. The RSA public-key cryptosystem is based
 on this fact. Internally, we use the Miller-Rabin randomized
 primality test to deal with primes. More information can be obtained
 from pp. 831-836 in CLR, the first edition.

 Running the appropriate makefile in the rsa directory will create an
 executable called run.x, which can be executed by typing 'run.x'. The
 RSA example uses a pseudo-random number generator internally. Such
 generators need a seed, an integer number, to initialize. A seed can
 be provided by the user by typing 'run.x <seed>' where <seed> is the
 integer seed. If no seed is given to run.x, the generator will be
 initialized with a seed obtained from the system using the time()
 system call. The seed input can be used to repeat an experiment on
 the RSA example.
 
 Original Author: Ali Dasdan, Synopsys, Inc.