Você está na página 1de 10

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617

HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 65

Secure Heterogeneous Cluster-based


Newscast Protocol
I. Kazmi, S. Aslam, and M.Y. Javed

Abstract—Heterogeneous Cluster based Newscast Protocol is a gossip-based p2p overlay network protocol. It has inherent
capability of handling heterogeneous resources. It exploits the autonomy of nodes by sharing each node’s cache with other
nodes. This makes it prone to different types of cache attacks manipulatinging protocol-related information. The current
research is a first step towards implementation of public key encryption technique with gossip-based protocols particularly
HCNP, to make them secure from attacks by malicious nodes. It, not only, introduces the concept of p2p overlay architecture-
specific security but also defines a new version of RSA with dynamic key assignment capability which gives efficient results than
original RSA for HCNP. Moreover, it also provides a platform that can be used with other gossip-based protocols. This research
has proven that RSA can be modified to give better performance results with gossip-based protocols although it is
computationally quite complex.

Index Terms—Clusters, Gossip-based protocols, HCNP, Heterogeneity, KAHC-RSA, Newscast.

——————————  ——————————

1 INTRODUCTION

H CNP is a gossip-based protocol that is used to de-


sign an efficient peer-to-peer overlay network. The
specialty of HCNP is to design an architecture com-
tion related to HCNP architecture is preserved. Secure-
HCNP is, typically, based on KAHC-RSA which is a new
version of standard RSA encryption algorithm. It per-
prised of heterogeneous nodes uniformly distributed forms dynamic key assignment procedure on the basis of
across a cluster. The nodes are heterogeneous in their heterogeneous capabilities of nodes which not only re-
physical resources such as RAM, secondary storage, pro- tains basic HCNP properties but also decreases standard
cessor speed. The benefit of such architecture is to gener- RSA overheads. The research also suggests an optimal
ate an efficient, scalable and self-configuring overlay to- key size for encryption that can be used uniformly across
pology that has a built-in mechanism for clusters configu- a cluster. The optimal key size ensures confidentiality of
ration on the basis of nodes capabilities. This leads to ar- architecture-specific information exchanged between
chitecture-level resource sharing. Such topology is quite nodes. Moreover, it reflects cluster-wise need of hetero-
helpful for the applications involving file search. The re- genic security level. The heterogeneous security is to
sources e.g. disk space can easily be shared among the maintain HCNP basic property i.e. heterogeneity and to
nodes of a cluster. A node deficient in a resource can provide each node with the optimal security level based
make use of the other one, if required. The architecture on its physical capability. This mechanism also reduces
suggested and tested by HCNP acts as a backbone for standard RSA computational overheads. The network
peer-to-peer applications. Moreover, it provides robust size does not have any impact on the efficiency of proto-
resources access to nodes. HCNP is Newscast [20] based col. The two major aspects related to security are covered
and hence, preserves all the properties of Newscast Pro- by secure-HCNP. First is confidentiality and the second is
tocol. integrity. The third major characteristic i.e. authentication
Secure-HCNP is an extension of HCNP. HCNP does not is already implemented on the gossip based protocols.
have any built-in mechanism to provide security. The The issue of detection and removal of those nodes from
architecture specific information shared among nodes the network which do not behave according to the pre-
may be accessed and altered by any malicious node. scribed protocol requires a central database maintaining
HCNP is prone to attacks due to availability of its cache blacklisted nodes [14].
to the other nodes. Secure-HCNP is the first step towards This research paper is divided into six sections. The first
providing security to the architecture so that the informa- section gives a brief introduction of the current research.
 I.K, the first author of this research, is a student of College of Electrical and In the second section, some previous work in the same
Mechanical Engineering, National University of Sciences and Technolo- direction is discussed. The third section is discusses the
gy,Islamabad, Pakistan and working as a lecturer at International Islamic
University, Islamabad, Pakistan methodology to explains how Secure-HCNP exactly
 S.A. is a student of National University of Sciences and Technology, Isla- works. In fourth section, the experiments with simula-
mabad Pakistan and working with University of Azad Jammu & Kashmir, tions and results are given to show the effectiveness of the
as a visiting faculty member. suggested technique. The fifth section, finally concludes
 M.Y.J, the supervisor of this research, is working with College of Electrical
& Mechanical Engineering, National University of Sciences and Techno- the research. In sixth and the last section, some limitations
log, Islamabad as an Associate Dean of Department of Computer Engineer- for the current research and future work in the same di-
ing rection are suggested.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 66

2 RELATED WORK tion can be used efficiently on recent mobile phones [6].
This shows that RSA can be modified to produce more
2.1 Literature Review
efficient results, regardless of its computational complex-
A complete survey of peer-to-peer networks [28] tells that ity.
P2P network is, basically, an overlay graph that is de- The strongest known algebraic attacks e.g. factoring, and
signed for searching or sharing of information and to be partial key exposure attacks [7] are collected for a fast
used as a distributed objects store. Several peer-topeer variant of RSA.
overlay protocols are applied for music sharing, replica- The attack model for HCNP is the same as described by
tion of electronic address books, multi-player games, pro- [12]. According to [12], in very small number of ex-
visioning of mobile, location or ad-hoc services, and the changes, the whole network can become polluted if one of
distribution of workloads of mirrored websites [29]. Peer the cache possessed by a non-malicious node is poisoned
to peer systems have become very important part of the by the cache possessed by a malicious node. All of these
internet and have a variety of applications for content non-malicious nodes cache will contain fake Ids of non-
sharing, distribution (e.g. Iso-Hunt) and other types of existent peers. This issue is handled by [12] by using Se-
more advanced applications such as Internet telephony cure-Peer Sampling Service. It is implemented on News-
(i.e. Skype, VoIP, Usenet, and Instant messaging). cast. It drops malicious nodes and leaves the network
The basic characteristics of peer-to-peer networks are de- partitioned. Secure-PSS is also vulnerable to attacks [12].
centralization, autonomy and shared provision of re- In case of HCNP, capability level information can be ex-
sources and services [21]. As peer-to-peer overlays are changed wrongly. The technique given by [12] cannot be
highly decentralized, so it is a big deal to resolve the IP of implemented because it works on the basis of Trusted
the intended peer (i.e. the peer having the desired con- Prompt concept which is centralized to some extent rather
tents) so that the contents may be downloaded afterwards them being completely decentralized. Secondly, it works
[30]. on the basis of IPs. What if a peer is not accessible due to
HCNP works on the top of NEWSCAST protocol which is firewall? Moreover, the physical capability related infor-
one of the gossip-based protocols. Such protocols are mation is more critical and cannot be distinguished from
largely used in agent based systems for the purpose of peer to peer. So, encrypting the potential information us-
communication [20].However, these days this category of ing some public key cryptography is a better idea. The
protocols is used widely to design other peer-to-peer certification Authority is not the part of the protocol [14]
networks topology. and does not cost overheads so using public keys is not
HCNP is highly decentralized just other peer-to-peer the issue. It will be required before joining an overlay.
overlay network protocols, but it plays with the autono- The research by [13] on SPSS with mosquito attack
my of nodes participating in the network. avoided CA and cryptography without mentioning any
The current research is an initiative towards security of reason. Also, [13] handled particularly two groups with
such protocols i.e. HCNP [2] and [3]. In case of [2] and [3], different roles and sizes.
this property is exploited to design clusters. There, the Another research suggests some design directions to pre-
participant nodes need some architecture-specific security vent peer-to-peer networks from worm attacks or make
implementation to prevent them from malicious attacks. the network resilient to worm attacks [17].
HCNP works a level below application layer. So, some The solutions proposed by [23] and [24] can defend only
security is required at this level to make the protocol spe- if the cache is < 75 percent polluted. Whereas, in another
cific-information secure. research on Puppetcast (a gossip based protocol using
The current research uses a modified version of original peer sampling service), the proposed protocol is found
RSA. The modified version is designed in a way to work highly resistant to attacks by malicious nodes. Puppet-
well with the protocol basic properties and still remain Cast continues to work even when 50% (or more) of the
efficient. nodes in the system are malicious and attacking [22]. The
“RSA cryptography exploits properties and interrelations attack model supposed by [22] is almost the same as con-
of numbers, constructed as large powers of huge num- sidered in the current research i.e. protocol messages con-
bers” [5], RSA uses modular exponentiation technique for taining malicious contents or they are stopped to be ac-
key generation which is very popular and the most im- cessed in some way. PuppetCast in contrast, is not 100%
portant operation in public key cryptography [15, 16] but decentralized. It needs a central trusted authority. The
is both complicated and time-consuming. Many research- Brahms [25] protocol is found to resist even when 20% of
ers are devoted to finding ways to reduce the time such as the nodes in the system are malicious. The Brahms proto-
binary method, signed-digit recoding method, common- col is also fully decentralized [25].
multiplicand multiplication method, and high-radix None of the protocols with secure peer sampling service
method [5]. consider implementing any type of encryption technique.
The efficiency of RSA is also tested for use on modern Similarly, neither of them gave 100% decentralized secure
mobile phones. For the said purpose, some fast variants solution for securing gossip-based-protocols. If the pro-
of RSA are modified and tested using java based imple- posed solution is decentralised, as in case of Brahms [25],
mentation with a usual RSA setup and timing for encryp- it resists only 20% of malicious nodes. The current re-
tion and decryption. When those are compared for effi- search implements public key encryption technique
ciency, it is found that both RSA encryption and decryp- (RSA), with dynamic key assignment characteristic,
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 67

which provides security by incorporating heterogeneity a big room for researchers in different areas of significant
i.e. the basic property of this protocol. This concept of importance in p2p overlay networks e.g. cooperation,
heterogeneous security is not implemented in any of the security, and handling QoS issues regarding HCNP. For
gossip-based protocols. more details about HCNP, consult [2] and [3].
An extensive experimental evaluation by the authors in
[26] shows that their proposed solution is efficient in deal-
3 SECURE-HETEROGENEOUS CLUSTER-BASED
ing with a large proportion of malicious nodes. They,
specifically, experimented on Newscast and used public NEWSCAST PROTOCOL
key cryptography but did not mention any details of the 3.1 Architecture and Layers
type of the encryption technique they used and its im- Secure HCNP resides below the application layer and
plementation. Similarly, there was no information pro- above the transport layer of standard TCP/IP model.
vided about the overheads caused by the encryption Figure 1 depicts its position in the layered TCP/IP model:
technique they used.
RSA is not yet considered for encryption of protocol ar-
chitecture-related data. In most recent researches, RSA is
most widely used for encryption of application related
data e.g. text files, sequence of characters, integer strings
as in [32], [33], [34] and [35] respectively. File sizes used in
these researches are 394 to 4933 bytes [32], 128 bits to 10 k
[33], 1-10,000 characters [34], and 547 bytes to 2188 bytes
[35], which are larger in length as compared to protocol-
related data.
Hence, the current research is not only a new idea to im-
plement encryption techniques, KAHC-RSA in this case, Fig. 1 Secure HCNP Layers
at protocol architecture level. It not only prevents proto- Secure-HCNP resides on the top of standard HCNP pro-
col-specific information from being tempered, but also tocol and can be used by the applications running on the
introduces a new version of a public key cryptographic top of it. All applications using HCNP protocol for defin-
technique, RSA, to handle smaller pieces of heterogene- ing overlay architecture, can use Secure HCNP to make
ous information more securely and more efficiently than underlying architecture secure.
standard RSA. The new technique can be tested for archi- a) Standard HCNP Protocol Layer
tecture security of any gossip-based protocol. The re- It consists of standard HCNP Protocol that has inherent
search uses the fastest implementation of RSA using Java. capability of Cluster-based heterogeneous resource shar-
As Java is an object-oriented, cross-platform language ing. It is used to design a p2p overlay graph on the top of
and also provides lots of class libraries which are imple- which p2p application run. HCNP is discussed in detail
mented with native programming language, its execution above.
efficiency is very high [1]. b) Secure-HCNP Protocol Layer:
This layer ensures secure transmission of HCNP architec-
2.2 Heterogeneous Cluster-based Newscast
ture-specific information. This leads to the correct confi-
Protocol
guration of HCNP clusters. The applications do not need
HCNP uses a clustered approach to design the topology to embed so much security in it. This partial implementa-
of a P2P overlay network. These clusters are implemented tion of security also increases the efficiency of the applica-
using Newscast protocol which adopts a random ap- tion as compared to the applications having complete
proach to generate nodes to form an overlay P2P net- security implementations in it.
work. HCNP is comprised of the following two compo-
nents: 3.2 Secure-HCNP Characteristics
1. Peers Capability exchange and for Capability Secure-HCNP has the following basic characteristics:
level assignment a) To ensure confidentiality, KAHC-RSA is used which is
2. Clusters based peers configuration a modified version of standard RSA, a public key crypto-
These two components of HCNP deal with measuring or graphic technique.
calculating node’s capability level values and assigning b) To maintain system integrity, MD-5 hashing algorithm
cluster-ID according to that capability level. Therefore, is used to prevent the architecture from attacks in the
each node will have to maintain the data structure com- presence of malicious peers in the network. The purpose
prising of level information. HCNP has two versions. One is also to reduce the size of the message for fast transpor-
handles single resource information [2] and the other, tation. Each node maintains a security identifier depicting
handles multiple resources [3] at a time, to configure he- its participation level (true/false)
terogeneous clusters. HCNP is beneficial for the applica- c)How to ensure the identity of the node. Authentication
tions needing high resources e.g. audio, video or data can be performed through public key cryptography and a
sharing applications. HCNP is proven to be scalable and
trusted certificate authority (CA) [14].CA is not a perfor-
efficient protocol with inherent capability of handling
mance bottleneck because it does not participate in the
heterogeneous resources but it is a new protocol and has
protocol and it can even be offline.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 68

3.3 Original RSA Implementation 1. Determine key size combinations


Standard RSA algorithm is a public key encryption algo- The Standard RSA uses a fixed size key i.e. 512, 1024 or
rithm which is used for encrypting a piece of information 2048 bits depending on the criticality of the problem area
that needs security. It is, computationally, quite slow as and the level of security required. In HCNP, very high
compared to symmetric key cryptographic techniques security is not required; so this is not practical to use high
and other public key encryption techniques. 1024 bit RSA bit values for keys that cost high in terms of computation.
gives security equivalent to 128 bit AES (a symmetric key It’s a good idea to change the bit length according to
encryption technique) but the reason to choose RSA is physical capabilities of nodes. The node that is low in its
that it does not require any key exchange procedure as capability does not need to be so much secured. Its risk of
AES, DES etc. require. HCNP is completely decentralized being misused is not as much critical as the other with
architecture and hence, does not require a central authori- very high capability. The approach is to use combination
ty to ensure secure key exchange procedure. It is compu- of key sizes. Key size should change according to physical
tationally slow but not bad for exchanging smaller piece capability of node. This seems quite compatible with the
of information as in the case of HCNP where only physi- major property of HCNP i.e. heterogeneity. Heterogene-
cal capability-related information is required to be ex- ous key sizes are used according to heterogeneous capa-
changed between nodes. bilities. Now the question is, what key sizes should be
used for what values of physical capabilities. So, the very
3.4 KAHC-RSA Implementation first step is, to find the best key size combination that
KAHC-RSA provides security to the architecture confi- matches with nodes capabilities. If estimated capabilities
gured by HCNP. HCNP is used to design an overlay effi- of nodes participating in the overlay are ranging between
ciently just like many other p2p topology generation pro- x to y, where x and y are integers, then the key sizes allo-
tocols. It lacks in security in the sense that the architecture cation may be from x + n to y + n. Here, n can be any con-
specific information, that is exchanged by nodes mutual- stant.
ly, is available to each and every node and can be ac- 2. Dynamic allocation of keys
cessed and tempered by any malicious node at any time. Heterogeneous key sizes are allocated dynamically be-
This may cause the protocol properties to be destroyed at cause nodes are rapidly changing their capabilities. This
maximum. So, a malfunctioning HCNP protocol may is quite possible that a node has 20 GB storage space
cause wrong cluster configuration. Another major prob- available at one time instant and just after a newscast up-
lem that a malicious node may create is that, the nodes date, the node is found very low in its capability, say, 10
are sharing their resources related information with each GB or the node has left the network. So, instead of static
other. If a malicious node gets that information in some allocation of key for all nodes, it is a good idea to use dy-
way or the other, it can cause critical problems to the re- namic allocation criteria. What dynamic allocation
sources of other nodes. Hence, Secure-HCNP comes into means? After a short interval of time, when each node
play. It not only, makes the architecture-specific informa- exchanges and updates its cache view with the other
tion secure by using KAHC-RSA encryption, but also nodes in its cache, to get freshest list of nodes, some in-
prevents nodes from misuse of their resources by any formation is exchanged between nodes. This information
malicious node. is stored in encrypted form in the cache. Dynamic alloca-
As symmetric key encryption techniques are not suitable tion means that this encryption will be done using dy-
for HCNP due to key sharing problem, the public key namic key sizes. If a node found in the network is low in
encryption technique is used to work with HCNP. As its capability, it will be encrypted with smaller key size. If
RSA is used widely and commonly in internet related a node is high in capability, it is encrypted with higher
protocols, it is considered as suitable for HCNP. As RSA key size to provide the node with higher security. Node
is very high in its computational complexity, it is mod- ids are not important. The node encrypted with higher
ified according to the HCNP protocol to match best with key sizes values may be encrypted with lower key size
the situation. KAHC-RSA uses key assignment on the values just after a short span of time if it becomes low in
basis of heterogeneous capabilities of resources a node its capability. As the key size changes dynamically with
shares. Heterogeneity is the key attribute of HCNP and is each Newscast update view method, it makes it very hard
required to be maintained in Secure-HCNP. To preserve to determine the key value in such a short instance of
this major property of the protocol along with the other, time. This dynamicity makes KAHC-RSA secure enough
KAHC-RSA uses dynamic key assignment technique. The to prevent malicious node attacks.
protocol major functions are described in steps as under: The detail of encryption and decryption procedure is
i. Determining key size combinations given under the heading cache encryption.
ii. Dynamic allocation of keys 3. Optimal Key Sizes
iii. Optimal Key Sizes While using heterogeneous key size values, it is very im-
iv. Newscast exchanges and updates between nodes portant to decide what minimum and maximum key sizes
v. Level Assignment are affordable for the network. Affordability or suitability
vi. Self Cache Encryption depends on some factors given under the heading factors
vii. Cache decryption involved in determining key combinations. The minimum
viii. Cluster Configuration value is taken as ‘x’ and the maximum value is taken as
‘x+(CL-1)’ then the average key value can be calculated
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 69

using Eq.1, using MD-5 hashing. This makes the length of the mes-
sage short for transportation. After encryption, the node
Range = 2x when x1 x1 + (CL-1) Eq. 1 will save encrypted hashed information in its cache. This
(deduced for base 2 key sizes e.g. 2, 4, 8,….1024 etc only) information is accessible for other peers/ nodes when
Where, required.
x1= An integer showing minimum key size in bits. 7. Cache decryption:
CL= Total number of capability levels When a node refreshes its cache using simple newscast
For example, for CL=5 (All nodes in the network com- protocol, it also extracts the other node’s physical capabil-
prise of maximum 5 different levels depicting their capa- ity related information in encrypted format. It then de-
bilities), there should be 5 different key sizes to encrypt crypts it using its own private key. This is the key that is
each capability level. If x1=4, then 2x means 24 =16 bits, calculated using dynamic key size allocation procedure.
and x1+ (CL-1) = 4+ (5-1)=8, and 28=256 bits . So, X ranges The encrypted message is first hashed and checked for
from 16 bits to 256 bits to accommodate 5 CL values. In- integrity and then decrypted.
crease x1 by 1, because it is an integer, and get next key 8. Cluster Configuration:
size used for next level. After extracting original capability level of nodes, clusters
The optimal key size value can be obtained by simply will be configured. Each node will be assigned a cluster
finding average of the key size values used as shown in identifier through standard cluster configuration proce-
Eq. 2. dure of HCNP.

K≈ /CL Eq. 2 3.5 Factors involved in determining key combina-


tions
Where, K= Optimal Key Size, x1= integer This is very important to find the best key combination
CL= total number of capability levels. for KAHC-RSA. There are many factors that are impor-
If x1=8 then x1+1=9, x1+2=10, x1+3=11, x1+4=12 for tant in determining key combination suitable for that par-
CL=5. K= 8+9+10+11+12/5=50/5=10 bits. So approx- ticular situation. Those factors are:
imately, 10 can be used as optimal key size for uniform  Network bandwidth
security provision.  Level of security required
Optimal key value can be used for uniform level of secu-  Physical capabilities of nodes i.e. overall trend of
rity regardless of the capability of the node. This can cost nodes physical resources.
much if network bandwidth is the issue. All nodes will If available network bandwidth is sufficient enough to
have equal level of security even if they are heterogene- handle higher key size values without compromising
ous in their capabilities. E.g. if a node has a physical re- much on efficiency, KAHC-RSA key sizes can be adjusted
source (e.g. 5 GB hard disk space) that can be shared and to higher bits key sizes combinations. This will provide
another node also has a physical resource that is lesser higher security to the nodes and the architecture as well.
than the previous one (e.g. 0.5 GB) then both will be han- More secure clusters will be configured and applications
dled in the same manner. It could be a better approach if specifically designed for such architecture, will have to
higher resource level node is given higher security be- accommodate a bit less security measures in it.
cause it is on higher risk as compared to the node that has If available network bandwidth is the main issue and
almost nothing to share. fluctuates abruptly at different timings, the smaller key
Optimal key size is good in the sense that it give an aver- sizes combination can give more suitable results. But, less
age view if the nodes capabilities in the network. The security will be provided to the architecture and hence to
tendency of nodes about resources is well handled using the node. So, key combination is basically a tradeoff be-
Optimal Key Value. tween the level of security required and the availability of
4. Newscast exchanges and updates between bandwidth. Higher security will definitely cost more than
nodes: lower security in terms of time especially.
The first step is simple conventional newscast exchange Another important thing is, the physical capabilities of
and update procedure between nodes. Nodes get re- nodes play very important role in determining the best
freshed list of peers through this. suitable key combinations. If overall trend of nodes is
5. Level Assignment: such that many nodes have very low in sharing their
Nodes extract its physical capability and on the basis of physical resources than no need to implement higher se-
that capability, each node is assigned a level, just as in curity key combinations and vice versa.
standard HCNP. This level information is stored in the Some key combinations are used for experimentation.
cache. These dynamically assigned key size combinations ac-
6. Self Cache Encryption: cording to heterogeneous physical resources of nodes are
Each node picks its capability level. The protocol assigns given below:
number of bits to calculate keys and sets the security Id Keys between 4 and 64:
value to 1, showing that the node is now using KAHC- Number of capability levels is 5, so 5 key sizes are used in
RSA encryption. For example, its capability level is 5 this key combination i.e. 4, 8, 16, 32, 64.The higher the
(very low in capability let’s say), it will be encrypted us- node in its capability (1 is the highest and 5 is the lowest
ing any public key. After encryption, it will be hashed level), the higher bits are used to calculate key and vice
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 70

versa. Table 1 shows five different key combinations as- Whereas, in 512 bits Standard RSA:
signed to five different capability levels. Original Message: 5
Encrypted Message:
Table 1 369501769380048266090850126616078393134124592216601
Keys Between 4 and 64 (combination 1) 624167915327193630744207302818154470141333872762560
Node Id Cap Level RSA bits 672280493858906692305061129212419217382079103721703
1 5 4 100888142076363708408812719178448089221669244069797
2 2 32 860157658098529905003412075163861390591606153887652
3 3 16 356422252005605593740345358813873929932578341846492
4 4 8 96
5 1 64 After MD-5 Hashing (The format in which it is stored in
6 4 8
the cache): YXVlNbzkWC0iob2EJfQ4+w
7 3 16
Result: in both above regardless of the encrypted message
8 5 4
length, the generated hash function is of equal length for
every message. This includes more security to the node
9 1 64
because this is not known to any of the node’s that which
10 2 32
RSA is used. Figure 7 and Figure 8 shows the overall view
of the secure HCNP cache.
3.6 Secure HCNP Data Structure
3.7 Secure HCNP Algorithm
Each HCNP node maintains node Id, time stamp, cluster
The algorithm showing HCNP procedure is given under:
Id and capability level in its cache. The first entry in the
Set TCL value
cache i.e. ‘1/0/3/4’ contains a node’s information in the
for i=1 to cache length
following format: Node Id=1, Time Stamp=0 (depicting
{
freshest node, it increases when node remains for the
Self:
longer time period), Capability Level=3 (can be Integral
Exchange view with neighbors
Capability Level if multiple physical parameters are
Update neighbors list in the cache
used), Cluster Id=4.
Allocate key size
Whereas, Secure-HCNP maintains some extra informa-
Encrypt level with the allocated key size (use any public key)
tion in its cache, as shown in Fig 2.
Calculate hash using MD-5
1- Node Id, 2- Time Stamp, 3- Encrypted Capability Level,
Replace level info in the cache with hashed and encrypted level
4- Cluster Id, 5- Security Identifier (1/0).
Publish cache (only cap level info)
Other:
1/0/505DGluQ3mZHO0lo/+eoLA /4/1 Extract neighbor node hashed encrypted level
Calculate hash of the encrypted level
If (received level value==calculated level value)
1/0/3/4/1 6/1/2/5/1 8/1/3/2/1 {
Level info is correct
Fig. 2 Secure HCNP Cache
Decrypt level info
Secure-HCNP stores the architecture specific information
Use this info for cluster configuration
in hashed encrypted format. The other protocol related
Assign cluster Id to the node
information is stored in the normal format just as in case
}
of HCNP. The figure above shows one entry ‘1/0/3/4/1’
else
of the cache. Here, ‘3’ shows capability level of a node
{
which is finally stored in the cache in encrypted format.
Set Security Id of neighboring node=0 (depicts the node as
The public key encryption technique KAHC-RSA is used
malicious)
for the purpose. Each and every node maintains capabili-
Remove the node from the cache
ty related information in encrypted format. For smaller
}
RSA bits, the hashing may not look as beneficial as in case
}
of larger bits. For example, when 8 bit standard RSA is
used, the length of hashed entry in the cache may seem 3.8 Secure HCNP Procedure
longer as compared to 512 bit standard RSA, which seems The schematic diagram of Secure-HCNP is drawn for bet-
quite compressed from original. For Example, in 8 bits ter understanding. Sender and receiver nodes with flow
standard RSA: of information, is shown in Fig. 3.
Original Message: 2
Encrypted Message: 22985
After MD-5 Hashing (The format in which it is stored in
the cache): lK3AwFv34fgldEJRh45GtQ
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 71
Secure HCNP Procedure Table 2
Comparison of KAHC-RSA with original RSA
Start Start
Optimal Range = minimum to Stan- KAH Bit size
Key Size maximum bits used for dard C- Reduc-
(bits) KAHC-RSA RSA RSA tion
Get updated cache of Perform the same procedure
fixed size view until it publishes its cap level Ratio
containing neighbour list
Average 4 4 to 64 248 -
Total 8 4 to 64, 8 to 128 450 -
Time(µ 16 4 to 64, 8 to 128, 16 to 256 765 -
Determine self Select a node from its cache
Capability level to communicate with sec) 32 4 to 64, 8 to 128,16 to 256,32 1345 -
to 512
64 4 to 64, 8 to 128,16 to 256, 32 3085 -
Encrypt Cap-level Perform KAHC-RSA Decrypt to 512, 64 to 1024
using KAHC-RSA procedure
128 8 to 128,16 to 256, 32 to 512, 9736 -
64 to 1024
Calculate hash of 256 16 to 256, 32 to 512, 64 to 37100 -
encrypted cap level
Become a part of the cluster 1024
by cluster joining procedure
512 32 to 512, 64 to 1024 237025 -
1024 64 to 1024 2309810 -
Publish cap level
End
2.5

sec
Follow join a cluster (b) Node 2 Willing to Join an HCNP Cluster Running 24 4 to 64 (Comb 1) - 977 2.6
procedure as node 2 Secure HCNP at Application Level

8 to 128 (Comb 2) - 3009 2.6


End 48 50

16 to 256 (Comb 3) - 10269 2.6


(a) Node 1 Willing to Join a Secure HCNP
Cluster
98 100

32 to 512 (Comb 4) - 55595 2.6


194 20
Fig. 3 Secure HCNP Procedure
0
64 to 1024 (Comb 5) - 49802 2.6
3.9 Secure HCNP Efficiency 390 40

0 9
Standard RSA with 1024 bits encryption cannot be used
0.5 sec
in case of HCNP. The major reason is that HCNP is a pro-
tocol for designing highly scalable and robust peer-to-
peer overlay network with support of heterogeneity. If
standard RSA is used with it, the network will become Bit size for each key combination is reduced to 2.6th of the
extremely slow due to computational complexity of 1024 maximum key size used. So, KAHC-RSA is faster compu-
bit RSA. Also all nodes do not require very high levels of tationally from original RSA in ratio of 2.6.
security. To overcome this problem, KAHC-RSA is de-
signed and tested. The Table 2 represents some factual 4 EXPERIMENTS
results by comparing KAHC-RSA with Standard RSA. It
Different experiments are done to study Secure HCNP
is very clear in the Table 4.6 that at 1024 bits key size
characteristics. All the experiments used 3 cycles and in-
Standard RSA needs almost 2.5 sec for encryption and
itially 500 nodes overlay. The cache and the degree size
decryption of capability level, whereas, KAHC-RSA re-
used= 40. Fig. 4 demonstrates the efficiency of Standard
quires only 0.5 sec for that. This is at least 5 times faster
RSA in terms of total time required to encrypt and de-
than standard RSA. The range column of Table 2 shows
crypt the capability levels.When average efficiency of
the minimum and maximum key sizes and the key sizes
original RSA is compared with KAHC-RSA, it is found
in between those minimum and maximum. This depicts
that there is an exponential rise in time with increase in
heterogeneous key assignment in KHAC-RSA. The last
key sizes. The key sizes taken for experimentation are 4, 8,
column of Table 2 shows bit size reduction ratio in case of
16, 32, 64, 128, 256, 52 and 1024 bits. The maximum time
KAHC-RSA. Bit size reduction ratio is the ratio between
for 1024 bit (as in case of standard RSA), is 2500 ms, Whe-
the maximum key size used in a combination and the
reas, the maximum time for 64 to 1024 bit KAHC-RSA is,
optimal key size achieved.
500 ms as shown in Figure 9. So, KAHC-RSA is proven to
be five times faster than standard RSA, And more suitable
for HCNP because of its compatibility with HCNP prop-
erty i.e. heterogeneity.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 72

2500
Average Efficiency of Original RSA vs KAHC-RSA mentation.
Average Efficiency/Total time of Standard RSA Average Key Sizes in KAHC-RSA
Average Efficiency/Total time of KAHC-RSA 400

2000
350
Average Total Time(ms)

300
1500

Average Key Size


250

1000 200

150
500
100

50
0
0 200 400 600 800 1000 1200
Key Sizes(4-1024) 0
64 128 256 512 1024
Key Ranges(4-64,8-!28,16-256,32-512,64-1024)
Fig. 4 Comparison of Average Efficiency of Original RSA with
Fig. 7 Optimal Key Size in KAHC- RSA
KAHC-RSA
Cluster Wise Average Total Time in KAHC-RSA
Fig. 7 shows the average key sizes i.e. optimal key size
values for five different key size ranges. The CL=5, 20,000
500
nodes, more than 500 clusters, overlay with degree=40
and cluster size=40. This optimal key size can be used for
uniform key size implementations. Optimal key size will
A verage T otal T im e (m s)

400

provide security somewhat between maximum and min-


300
imum key sizes. For example, instead of using 64 to 1024
Avg Time with keys between 4 and 64
200
Avg Time with keys between 8 and 128 key size ranges, the optimal key size i.e. 390 bit value can
Avg Time with keys between 16 and 256
Avg Time with keys between 32 and 512 be used.
100
Avg Time with keys between 64 and 1024
The effect of network size on the performance of KAHC-
RSA is shown in the Fig. 8. The experiment takes 1000,
0
2 4 6 8 10 12 14 16 18 20 2000, 3000, 4000, 5000 and up to 10,000 nodes with five
different key ranges. One of the key size ranges i.e. 32 to
Cluster No.

Fig. 5 Cluster Wise Average Total Time in KAHC- RSA 512 is shown in the Fig. 8. The average time remains the
same for all
Fig. 5 demnstrates cluster-wise performance of KAHC- Performance of KAHC-RSA with different network sizes
2000
RSA is shown. There are total of 20 clusters each com-
1800
posed of nearly 40 nodes. The average total time for 64 to 1600
1024 bits KAHC-RSA is fluctuating around 500 ms. For all 1400
other categories, KAHC-RSA performance is below 100 1200
ms. This means regardless of nodes capabilities, the aver-
Time(m s)

1000
age total time is almost the same in all the 20 clusters for 800
one range of key values. The clusters are picked random- 600

ly from the overlay. 400

200
Cluster Wise Average Key Sizes in KAHC-RSA
500 0
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
450 Network Size

400

350 Keys between 4 and 64


Fig. 8 Effect of Network Size on Efficiency of KAHC- RSA
Average Key Size

Keys between 8 and 128


300 Keys between
Keys between
16 and 256
32 and 512
network sizes. That means, increase in network size does
250

200
Keys between 64 and 1024
not have any impact on the performance of KAHC-RSA.
150
Time is same for 1000 as well as for 10,000 nodes overlay.
100
When KAHC‐RSA is compared with a high speed imple‐
50 mentation  of  RSA,  it  is  found  that  KAHC‐RSA  is  much 
0
0 2 4 6 8 10 12 14 16 18 20
faster  than  the  high  speed  RSA  in  terms  of  total  time  re‐
Cluster No.
quired  for  encryption  and  decryption.  Fig.  9  shows  that 
with  increase  in  key  size  from  128  bits  to  1024  bits,  total 
Fig. 6 Cluster Wise Average Key Sizes in KAHC- RSA
time also increases. But this increasing trend is more sig‐
Similarly, the average key sizes are shown in Fig. 6 nificant  in  case  of  higher  key  size  values.  Secondly, 
among 20 clusters. Main axis shows clusters and y axis KAHC‐RSA  is  proven  to  be  much  more  efficient  than  a 
shows average key sizes for five different ranges of key high  speed  RSA  implementation  in  terms  of  computa‐
sizes in KAHC-RSA. These real values are found much tional time required to encrypt and decrypt a fixed length 
closer to the values gotten through the formula given message.  
above. The values for individual clusters match the aver-  
age of total, say 500 clusters. This shows optimal key val-  
ue for a cluster can be taken for uniform security imple-  
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 73

  Newscast used with HCNP and HCNP with multiple


3000
Comparison of KAHC-RSA and High Speed-RSA physical parameters. Whereas, the attack model described
High Speed RSA
KAHC-RSA in previous relevant researches on gossip-based protocols
2500 security, can completely destroy the basic properties of
T o ta l T im e (m s )(E n c ry p tio n + D e c ry p tio n )

any gossip-based protocol. To stop the spread of a poi-


2000
sonous cache and to prevent HCNP from other types of
1500
worms and threats, encryption is a good idea. It is con-
cluded that Secure-HCNP can be used to prevent from
1000 the attacks described. It uses KAHC-RSA which is a mod-
ified version of Original RSA and specifically designed
500
for HCNP. It not only preserves the basic property of
0
HCNP (i.e. heterogeneity) and the concept of heterogene-
128 256 512
Key Sizes 128 to 1024 bits
1024
ous security levels and dynamic key assignment, makes it
more appropriate in the situations where smaller pieces
Fig. 9 Comparisons of KAHC‐RSA and High Speed RSA 
of information are required to be encrypted. KAHC-RSA
can also be used with other gossip based protocols using
This also shows that the selection of encryption or de-
Peer Sampling Services. The same is experimented with
cryption algorithm depends on the usage scenario and
the Newscast protocol in the current research without
level of security required because 1024 bit RSA or KAHC-
compromising on efficiency. KAHC-RSA uses java which
RSA gives higher security than 128 bit but efficiency will
is proven to be the fastest language for implementation of
be compromised in the former case.
RSA. KAHC-RSA is proven to be five times faster than
4.1Comparing Computational Complexity of KAHC- original RSA and a bit more efficient than CRT which is a
RSA with original RSA and CRT RSA faster variant of RSA. Hence, KAHC-RSA joined the
When 1024 bit original RSA is compared with one of its group of faster variants of RSA just as it is modified to
fast variants CRT RSA [6] designed for mobile phones use on mobile phones. KAHC-RSA can also be used with
(based on Chinese Remainder Theorem) and KAHC RSA, Cooperative Heterogeneous Clusters without compromis-
it is found that KAHC-RSA is found much faster than ing on efficiency. The experiments done for testing
original RSA. The column showing decryption time in KAHC-RSA for efficiency have shown that KAHC-RSA
Table 3, demonstrates average decryption time in ms for can equally be used for encrypting any smaller piece of
all the three variants of RSA. The decryption time for information which is not specific to peer to peer network
KAHC-RSA is 498 ms which is less than the decryption protocol.
time of CRT RSA (especially design to work on mobile
phones) i.e. 558 ms. 6 FUTURE WORK AND LIMITATIONS
Similarly, the results presented under the column head-
6.1 Limitations
ing ‘Computational Complexity’ in Table 3, show that
KAHC-RSA is reduced in its complexity by the factor of The current research only deals in architecture-related
2.5 when compared with original RSA. KAHC-RSA re- security, not the application-level security. It makes the
quires lesser computation than CRT RSA and so emerged overlay architecture secure, not the application related
as a faster variant of RSA than CRT RSA. data exchanged between them. It is assumed that the ap-
Table 3 plication using this protocol will have embedded security
Comparison of average decryption time specific to the application. Moreover, only smaller pieces
of information (e.g. physical capability level or id type
Encryption Decryption Computational information) can be encrypted using KAHC-RSA. Other-
Time (ms) Time (ms) Complexity wise, the key size may become a bottleneck. Similarly, in
Secure-HCNP only architecture-related information is
Original 29 2098 O(K3)
encrypted using KAHC-RSA. The whole cache possessed
RSA by each node is not encrypted. The current research does
CRT RSA - 558 2.O((K/2)3) not handle cache attacks. HCNP cache attacks can also
KAHC- - 498 (K/2.5)3
cause inaccessibility to the correct information e.g. if the
node id is changed by malicious node or time stamp is
RSA
modified to some incorrect value. These are basically
Newscast related security issues. This problem may dis-
Here, K is the number of bits used for key calculation. appear if a secure Newscast protocol is used for HCNP.
6.2 Future Work
In this paper, only Standard/ original RSA is imple-
5 CONCLUSION mented and tested with modification. Other faster va-
The concept of heterogeneous clusters given by HCNP riants of RSA should be implemented and tested with
and HCNP with multiple physical parameters can be java to give better and more efficient results on HCNP.
used and implemented with any gossip-based protocols Similarly, other public key cryptographic techniques can
working on the basis of Peer Sampling Services e.g. be used with HCNP and the efficiency may be calculated.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 4, APRIL 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 74

Node authentication can be done in more sophisticated [17] L. Zhou, L. Zhang, F. McSherry, N. Immorlica, M. Costa, and S.
methods as compared to the general centralized method Chien, “A First Look at Peer-to-Peer Worms: Threats and De-
used for gossip based protocols. Similarly, the whole fenses”, International Symposium on Peer to Peer Systems,
cache encryption techniques may be introduced with MIT, University of Cambridge, 2005.
faster and more secure implementations. [18] M. Jelasity, W. Kowalczyk and M. V. Steen, “Newscast Com-
puting”, Technical Report, University of Amsterdam, 2003.
REFERENCES [19] PeerSim, A peer-to-peer simulator by sourceforge.net accessed
on 23-06-2010.
[1] Shen Guicheng, Liu Bingwu and Zheng Xuefeng, U. (1971).
[20] Spyros Voulgaris, Mark Jelasity, M. V. Steen, “A Robust and
“Research on Fast Implementation of RSA with Java”, Interna-
Scalable Peer-to-Peer Gossiping Protocol”, International work-
tional Symposium on Web Information Systems and Applica-
shop on agents and peer-to-peer computing, vol. 2872, pp. 47-
tions, pp. 186 – 189, WISA 2009.
58, 2004.
[2] Irum Kazmi, Saira Aslam, M. Y. Javed, “Cluster-based Peers
[21] R. Subramanin, B. D. Goodman, “Peer to Peer computing: The
Configuration Using HCNP in Peer-to-Peer Overlay Net-
evolution of a Disruptive Technology”, Idea Group Publishing,
works”, CICSyn 2010.
2005.
[3] Irum Kazmi, Saira Aslam, M. Y. Javed, “Cluster-based Peers
[22] A. Bakker and M. V. Steen, “Puppet Cast: A Secure Peer Sam-
Configuration with Multiple Physical Parameters using HCNP
pling Protocol”, European Conference on Computer Network
in Peer-to-Peer Overlay Networks”, ICCAIE 2010.
Defense, 2008
[4] A. Montresor, M. Jelasity, “Peersim: Scalable P2P Simulator”,
[23] G. P. Jesi, D. Gavida, C. Gamage, and M. van Steen. “A Secure
NAPA-WINE Project, 2009.
Peer Sampling Service as “Hub Attack” countermeasure”.
[5] C. L. Wu, D. C. Lou, and T. Chang, “Computational Complex-
Technical Report UBLCS-2006-17, Dept. of Computer Science,
ity Analyses of Modular Arithmetic for RSA Cryptosystem”,
University of Bologna, Italy, May 2006.
The 23rd workshop on Combinatorial Mathematics and compu-
[24] G. P. Jesi, D. Hales, and M. van Steen. “Identifying Malicious
tation theory, 2006.
Peers Before It’s Too Late: A Decentralized Secure Peer Sam-
[6] K. Hansen, T. Larsen and K. Olsen, “On the Efficiency of Fast
pling Service”. International Conference on Self- Adaptive and
RSA Variants in Modern Mobile Phones”, International Journal
Self-Organizing Systems IEEE, June 2007.
of Computer Science and Information Security, Vol. 6, Iss. 3,
[25] E. Bortnikov, M. Gurevich, I. Keidar, G. Kliot, and A. Shraer.
2009
Brahms: “Byzantine Resilient Random Membership Sampling”,
[7] Jason  Hinek  and  David  R.Cheriton,  “On  the  security  of  multi‐
ACM Symposium on Principles of Distributed Computing, July
prime RSA”, Journal of Mathematical Cryptography, Vol. 2, Iss. 
2008.
2, pp 117‐147, 6‐7‐2008 
[26] G. P. Jesi, A. Montresor and M. V. Steen, “Secure Peer Sam-
[8] V. Vishnumurthy and  P. Francis,” A Comparison of Structured 
pling”, Journal of Computer Networks, Vol. 54, pp. 2086-2098,
and  Unstructured  P2P Approaches  to  Heterogeneous  Random 
2010 .
Peer Selection”, USENIX Annual Technical Conference, 2007.
[27] Saira Aslam, “Cooperative Heterogeneous Clusters”, MS Final
[9] C. Reddy, D. Leonard, and D. Loguinov, “Optimizing Capacity-
Thesis, Department of Computer Engineering, NUST,2010
Heterogeneous Unstructured P2P Networks for Random-Walk
[28] C. Wang and Bo Li, “Peer to Peer Overlay Networks: A Sur-
Traffic”, International Conference on Peer to Peer Computing,
vey”, April 20, 2003.
IEEE ,2009.
[29] E. K. Lua, J. Crowcroft, M. Pias, R. Sharma and Steven Lim, “A
[10] X. Xiao, Y. Shi, Z. Chen and B. Zhang, "On Constructing High
Survey and Comparison of Peer to Peer Overlay Network
Performance Overlay for Layered Streaming in Heterogeneous
Schemes”, IEEE Communications Survey and Tutorials, March
Networks," Advanced Information Networking and Applica-
2004.
tions Workshops, pp. 578-584, 2008.
[30] Jorge Ardenghi and Javier Echaiz, “Peer-to-Peer Systems: The
[11] Vishnumurthy and Francis, “On  Heterogeneous  Overlay  Con‐
Present and the Future”, Journal of Computer Science & Tech-
struction  and  Random  Node  Selection  in  Unstructured  P2P 
nology, Vol. 7, Iss. 3, October 2007.
Overlay  Networks”,  International  Conference  on  Computer 
[31] C. Kaya Koc, “High Speed RSA Implementation”, Technical
Communications, IEEE, pp. 1‐12, 2006. 
Report by RSA Laboratories, RSA Data Security Inc, CA, 2005.
[12] G.  P.  Jesi,  A.  Montresor  and  M.  V.  Steen,  “  Secure  Peer  Sam‐
[32] J.Saigeetha and V.Selvi, “Speed and Security Enhancement
pling”, Journal of Computer Networks, Vol. 54,Iss. 12, pp. 2086‐
through Public Key Cryptography”, Journal of Engineering Sci-
2098,  2010. 
ence and Technology, Vol. 2, Iss. 8, pp. 3551-3556, 2010.
[13] G. P. Jesi and A. Montresor, ʺSecure Peer Sampling Service: The 
[33] Challa Narasimham and Jayaram Pradhan ,“Evaluation of Per-
Mosquito  Attackʺ,  IEEE  International  Workshops  on  Enabling 
formance Characteristics of Cryptosystem using Text Files”,
Technologies, pp. 134‐139, 2009. 
Journal of Theoretical and Applied Information Technology,
[14] M. Jelasity, A. Montresor, O. Babaoglu, “Detection and Removal 
Vol. 4, Iss. 1, pp. 56-60, JATIT 2008 .
of Malicious Peers in Gossip‐Based Protocols”, FuDiCo, 2004. 
[34] R.  Biswas,  S.  Bandyopadhyay  and  A.  Banerjee  “A  Fast  Imple‐
[15] D. C. Lou and C. L. Wu, “Parallel Exponentiation Using Com-
mentation  of  The  RSA  Algorithm  Using  GNU  MP  Liberary”, 
mon- Multiplicand-Multiplication and Signed- Digit-Folding
Naional Workshop on Cryptography, 2003. 
Techniques”, International Journal of Computer Mathematics,
vol. 81, Iss. 10, 1187-1202, 2004. [35] S. Subasree and N. K. Sakthivel,  “Design of a New Secu‐
[16] J.C. Ha and S. J. Moon, “A Common-Multiplicand Method to rity  Protocol  using  Hybrid  Cryptography  Algorithms.”,  Inter‐
the Montgomery Algorithm for Speeding up Exponentiation”, national Journal of Research and Reviews in Applied Sciences,  
Vol. 2, Iss. 2, IJRRAS 2010. 
Information Proceeding Letters, Vol. 66, 105-107, 1998.

Você também pode gostar