<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wahmed2</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wahmed2"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Wahmed2"/>
	<updated>2026-06-02T20:30:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9143</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9143"/>
		<updated>2011-04-09T16:54:30Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Issues &amp;amp; Solutions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problem Domain===&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation information being exchanged is guaranteed to be authentic.&lt;br /&gt;
&lt;br /&gt;
*How do we ensure the information exchanged between peers authentic, and not tampered with?&lt;br /&gt;
&lt;br /&gt;
*How to we attribute information exchanged?&lt;br /&gt;
&lt;br /&gt;
*How do we do this in a highly decentralized, distributed system?&lt;br /&gt;
&lt;br /&gt;
*How can we make sure the information is timely?&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===PKI===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
PKI provides mean of guaranteeing the authenticity by issuing digital signature. In order to ensure that electronic document is authentic , which means knowing the person who created the document and it hasn&#039;t been modified. They are commonly used for software distribution, financial transaction or to detect forgery or tampering.  Further to ensure the authentication digital signature relies on certain type encryption. Digital certificate is mode of encryption  on large scale  for example secure web server. Digital certificate are validated by PKI by verifying the authenticity of certificate , the validity of certificate and that the certificate is trustworthy. They are issued by an authority referred as Certification Authority. The certificate authority act as the middleman that both computer trust. This helps in avoiding man in the middle attack , certificate authority confirms that computer is in fact who they say they are and the provides the public key of each computer to the other. The digital certificate contains the public key of the entity identified in certificate , it matches a public to a particular individual, and that certificate&#039;s authenticity is guaranteed by the issuer, thus digital certificate provides solution to the problem of how to find user&#039;s public key and know that its valid.These problems are solved by a user obtaining another user&#039;s public key from the digital certificate. The user knows it is valid because a trusted certification authority has issued the certificate. For their own authentication digital certificate rely on public key cryptography. The certification authority signs the certificate with its own private as digital certificate is issued. To validate the authenticity of a digital certificate, a user can obtain that certification authority&#039;s public key and use it against the certificate to determine if it was signed by the certification authority.&lt;br /&gt;
&lt;br /&gt;
===Issues Faced by DoD using PKI===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Understanding Digital Certificate&amp;quot; by Microsoft : http://technet.microsoft.com/en-us/library/bb123848%28EXCHG.65%29.aspx date accessed 3rd April 2011&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;How digital certificate works&amp;quot; by IBM: http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzas.doc/sy10580_.htm date accessed 3rd April 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9142</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9142"/>
		<updated>2011-04-09T16:53:56Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problem Domain===&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation information being exchanged is guaranteed to be authentic.&lt;br /&gt;
&lt;br /&gt;
*How do we ensure the information exchanged between peers authentic, and not tampered with?&lt;br /&gt;
&lt;br /&gt;
*How to we attribute information exchanged?&lt;br /&gt;
&lt;br /&gt;
*How do we do this in a highly decentralized, distributed system?&lt;br /&gt;
&lt;br /&gt;
*How can we make sure the information is timely?&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===PKI===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
PKI provides mean of guaranteeing the authenticity by issuing digital signature. In order to ensure that electronic document is authentic , which means knowing the person who created the document and it hasn&#039;t been modified. They are commonly used for software distribution, financial transaction or to detect forgery or tampering.  Further to ensure the authentication digital signature relies on certain type encryption. Digital certificate is mode of encryption  on large scale  for example secure web server. Digital certificate are validated by PKI by verifying the authenticity of certificate , the validity of certificate and that the certificate is trustworthy. They are issued by an authority referred as Certification Authority. The certificate authority act as the middleman that both computer trust. This helps in avoiding man in the middle attack , certificate authority confirms that computer is in fact who they say they are and the provides the public key of each computer to the other. The digital certificate contains the public key of the entity identified in certificate , it matches a public to a particular individual, and that certificate&#039;s authenticity is guaranteed by the issuer, thus digital certificate provides solution to the problem of how to find user&#039;s public key and know that its valid.These problems are solved by a user obtaining another user&#039;s public key from the digital certificate. The user knows it is valid because a trusted certification authority has issued the certificate. For their own authentication digital certificate rely on public key cryptography. The certification authority signs the certificate with its own private as digital certificate is issued. To validate the authenticity of a digital certificate, a user can obtain that certification authority&#039;s public key and use it against the certificate to determine if it was signed by the certification authority.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Understanding Digital Certificate&amp;quot; by Microsoft : http://technet.microsoft.com/en-us/library/bb123848%28EXCHG.65%29.aspx date accessed 3rd April 2011&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;How digital certificate works&amp;quot; by IBM: http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzas.doc/sy10580_.htm date accessed 3rd April 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9141</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9141"/>
		<updated>2011-04-09T16:50:58Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Uses and Need of PKI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problem Domain===&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation information being exchanged is guaranteed to be authentic.&lt;br /&gt;
&lt;br /&gt;
*How do we ensure the information exchanged between peers authentic, and not tampered with?&lt;br /&gt;
&lt;br /&gt;
*How to we attribute information exchanged?&lt;br /&gt;
&lt;br /&gt;
*How do we do this in a highly decentralized, distributed system?&lt;br /&gt;
&lt;br /&gt;
*How can we make sure the information is timely?&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===PKI===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
PKI provides mean of guaranteeing the authenticity by issuing digital signature. In order to ensure that electronic document is authentic , which means knowing the person who created the document and it hasn&#039;t been modified. They are commonly used for software distribution, financial transaction or to detect forgery or tampering.  Further to ensure the authentication digital signature relies on certain type encryption. Digital certificate is mode of encryption  on large scale  for example secure web server. Digital certificate are validated by PKI by verifying the authenticity of certificate , the validity of certificate and that the certificate is trustworthy. They are issued by an authority referred as Certification Authority. The certificate authority act as the middleman that both computer trust. This helps in avoiding man in the middle attack , certificate authority confirms that computer is in fact who they say they are and the provides the public key of each computer to the other. The digital certificate contains the public key of the entity identified in certificate , it matches a public to a particular individual, and that certificate&#039;s authenticity is guaranteed by the issuer, thus digital certificate provides solution to the problem of how to find user&#039;s public key and know that its valid.These problems are solved by a user obtaining another user&#039;s public key from the digital certificate. The user knows it is valid because a trusted certification authority has issued the certificate. For their own authentication digital certificate rely on public key cryptography. The certification authority signs the certificate with its own private as digital certificate is issued. To validate the authenticity of a digital certificate, a user can obtain that certification authority&#039;s public key and use it against the certificate to determine if it was signed by the certification authority.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9140</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9140"/>
		<updated>2011-04-09T16:18:25Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Uses and Need of PKI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problem Domain===&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation information being exchanged is guaranteed to be authentic.&lt;br /&gt;
&lt;br /&gt;
*How do we ensure the information exchanged between peers authentic, and not tampered with?&lt;br /&gt;
&lt;br /&gt;
*How to we attribute information exchanged?&lt;br /&gt;
&lt;br /&gt;
*How do we do this in a highly decentralized, distributed system?&lt;br /&gt;
&lt;br /&gt;
*How can we make sure the information is timely?&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===Uses and Need of PKI===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
PKI provides mean of guaranteeing the authenticity by issuing digital signature.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9130</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9130"/>
		<updated>2011-04-08T23:32:03Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Uses and Need */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problem Domain===&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation information being exchanged is guaranteed to be authentic.&lt;br /&gt;
&lt;br /&gt;
*How do we ensure the information exchanged between peers authentic, and not tampered with?&lt;br /&gt;
&lt;br /&gt;
*How to we attribute information exchanged?&lt;br /&gt;
&lt;br /&gt;
*How do we do this in a highly decentralized, distributed system?&lt;br /&gt;
&lt;br /&gt;
*How can we make sure the information is timely?&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===Uses and Need of PKI===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9129</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9129"/>
		<updated>2011-04-08T23:15:29Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problem Domain===&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation information being exchanged is guaranteed to be authentic.&lt;br /&gt;
&lt;br /&gt;
*How do we ensure the information exchanged between peers authentic, and not tampered with?&lt;br /&gt;
&lt;br /&gt;
*How to we attribute information exchanged?&lt;br /&gt;
&lt;br /&gt;
*How do we do this in a highly decentralized, distributed system?&lt;br /&gt;
&lt;br /&gt;
*How can we make sure the information is timely?&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9128</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9128"/>
		<updated>2011-04-08T23:13:18Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  &lt;br /&gt;
&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9125</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9125"/>
		<updated>2011-04-08T19:52:27Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. Today over the internet different kind of activities take place ranging from access to information to entertainment, financial services, product services and even socializing. The frequent usage of internet as an important business tool led to a major increase in deliberate abuse and criminal activities. All the organization operating electronically and trading expose their own information and IT systems to a wide range of security threats. The most common protocols like IP/TCP/UDP are the main targets of potential hackers. Its all because of IPs on which attacks are possible and don&#039;t have proper authentication mechanism for any incoming data over internet.  In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9124</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9124"/>
		<updated>2011-04-08T19:26:53Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0ASS7kj9hfc1aZGRiMjMzOHJfNGhnNzhuamRr&amp;amp;hl=en&amp;amp;authkey=CMHi3KAD&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In past few years, Internet has provided platform for a global market place and both business and private users realizes that the revolutionary communications opportunities provided by it will give way to large spectrum of business and private applications.Today online users face multitude of problems and issues like vulnerability to viruses , worms , exposure to sniffers, spoofing their private sessions not only this but also they are also subjected to invasion of privacy with multitude of spy ware available for monitoring how they behave. In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications.&lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
==Problem domain:==&lt;br /&gt;
&lt;br /&gt;
This portion of a reputation system answers the core question of how reputation is generated from the information exchanged between systems and how/where it is stored.&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
&lt;br /&gt;
•	Emerge vs. Impose reputation on the system?&lt;br /&gt;
•	Probably both, how do we account for both systems?&lt;br /&gt;
•	Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
•	Where do you store the data?&lt;br /&gt;
•	Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
•	Who do we trust for this information?&lt;br /&gt;
•	Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
•	Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
•	Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Existing systems&lt;br /&gt;
•	Peer-based systems (emerge)&lt;br /&gt;
•	eBay - positive/negative rating system&lt;br /&gt;
•	Youtube - like/dislike/spam comment system&lt;br /&gt;
•	Policy-based systems (impose)&lt;br /&gt;
•	Java - policy based security&lt;br /&gt;
•	Android - policy based security&lt;br /&gt;
These two systems are on opposite ends of the Emerge-Impose spectrum.&lt;br /&gt;
EigenTrust system&lt;br /&gt;
The EigenTrust system utilizes a numerical scale for reputation storage.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Numerical values are easy to compare.&lt;br /&gt;
•	Little required storage space.&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	Information is lost in the abstraction process.&lt;br /&gt;
o	No concrete data&lt;br /&gt;
•	Ambiguity&lt;br /&gt;
Storing concrete data&lt;br /&gt;
Hence, with the given information from the reputation system, we cannot generate an accurate profile of the entity.&lt;br /&gt;
We need a system that represents reputation in a concrete form&lt;br /&gt;
“If principal p gains access to resource r at time t, then the past behavior of p up until time t satisfies requirement ψr.”&lt;br /&gt;
Advantages&lt;br /&gt;
•	A sufficient amount of information is available to come up with a profile of an entity&lt;br /&gt;
Disadvantages&lt;br /&gt;
•	Storage space&lt;br /&gt;
Shmatikov and Talcott&lt;br /&gt;
Histories are sets of time-stamped events. Reputation is based on ability to adhere to licenses.&lt;br /&gt;
Licenses might permit certain actions OR require certain actions from being performed.&lt;br /&gt;
Advantages:&lt;br /&gt;
•	Store data in concrete form&lt;br /&gt;
Disadvantages:&lt;br /&gt;
•	No notion of sessions (logically connected set of events)&lt;br /&gt;
Representation of reputation&lt;br /&gt;
If we consider reputation information to encompass the events and actions of an entity, then we can model reputation as a set of events.&lt;br /&gt;
An interesting new problem is how to re-evaluate policies efficiently when new information becomes available.&lt;br /&gt;
This problem is known as “dynamic model-checking”. &lt;br /&gt;
Dynamic model-checking&lt;br /&gt;
We want a way of summarizing past reputations.&lt;br /&gt;
A solution here is to use: Havelund and Rosu, based on the technique of dynamic programming, used for runtime verification&lt;br /&gt;
•	Given some information on an entity, how do we convert/abstract this to reputation? &lt;br /&gt;
•	Is all the information necessary to maintain? &lt;br /&gt;
•	Now that we have the reputation information, what can we do with it?&lt;br /&gt;
o	What can we compare it with?&lt;br /&gt;
Implementation&lt;br /&gt;
Desired functionality of the system:&lt;br /&gt;
new()&lt;br /&gt;
- Append new reputation information&lt;br /&gt;
update()&lt;br /&gt;
-	Update and summarize past behavior&lt;br /&gt;
-	This is a reduce function&lt;br /&gt;
check()&lt;br /&gt;
- Analyze whether the given reputation satisfies the criteria of the policy&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9013</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=9013"/>
		<updated>2011-03-31T16:36:08Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Guaranteeing Authenticity/Public Key Infrastructure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0AbY-UrFwVEEVZHgyZmJoel8yMmhkZzI3aGM1&amp;amp;hl=en&amp;amp;authkey=CIDatKoH&lt;br /&gt;
&lt;br /&gt;
==Our Paper==&lt;br /&gt;
&lt;br /&gt;
Our final paper can be found here:  [[Distributed OS: Winter 2011 Reputation Systems Paper]]&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
===What are the solution to these problems?===&lt;br /&gt;
&lt;br /&gt;
*Identity Based Encryption:enables senders to encrypt messages for recipients w/o requiring that a recipients key first be established, certified, and published.&lt;br /&gt;
&lt;br /&gt;
*Certificate-based encryption:it incorporates IBE methods, but uses double encryption so that its CA cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Certificateless Public Key Cryptography:it incorporates IBE methods, using partial private keys so PKG cant decrypt on behalf of the user.&lt;br /&gt;
&lt;br /&gt;
*Distributed Computation:There exists methods that distribute cryptographic operations so that the cooperative contribution of a number of entities is required in order to perform an operation such as a signature or decryption. It helps in tighter protection at servers vs clients, but implies that the users mist fully trust servers to apply keys appropriately.&lt;br /&gt;
&lt;br /&gt;
*Alternative Validation Strategies:Hash tree:it offers compact protected representations of the status of large number of certiticates.Highly valued if PKI is operated large scale more benifical than Certificate Revovation List. CRL reflect ststus information at fixed intervals.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
* What assumptions will we make?&lt;br /&gt;
* Privacy issues? What will we reveal? Will centralized systems have a know-all mentality?&lt;br /&gt;
** Fine grained information will never be revealed (privacy concerns and user rights)&lt;br /&gt;
* Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
* Immutable data structure. Who could add data? Who could remove data? Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8947</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8947"/>
		<updated>2011-03-27T19:59:12Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Common Issues With PKI Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==Our presentation==&lt;br /&gt;
Our current presentation can be viewed at the following link: https://docs.google.com/present/edit?id=0AbY-UrFwVEEVZHgyZmJoel8yMmhkZzI3aGM1&amp;amp;hl=en&amp;amp;authkey=CIDatKoH&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
In our paper we must explain why PKI/Authentication fits into reputation. Why must it be handled by both Attribution and Reputation systems?&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs) and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
*Availability and storage of reliable user information : For an identity certificate scheme, names in certificates need to be unique, meaningful - and correct. Few large user communities have all their member details in a central and accurate database or directory, and the exercise of consolidating, checking and updating all user data can turn into a massive and expensive exercise.&lt;br /&gt;
&lt;br /&gt;
*Archiving/historic verification : Digital signatures need to be verifiable even after the keys used to sign have expired. Likewise, we need to be able to verify that the certificate was valid at the time the datawas signed. This means we would need to archive: the signed file,the public key certificate of the signer, the CRL that was valid at the time of signing, a reliable timestamp to prove the accuracy of the time of signing and, the hardware environment that can run the software that was used at the time&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
===Problem domain===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
*** Do we maintain records based on a fixed set of imposed rules? Or do we build rules as the system emerges and reputations are formed?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
** Distributed storage systems. Reputation in real-life is stored in interactions that an entity has with others. Reputation is not stored centrally. Reputation is most often a shared view of an entity by the masses, but sometimes an entities reputation can be disjoint among the masses: many different entities having differing views of reputation for the same entity.&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
** (should I mention this?)&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
** Impose/Emerge problem: reputation for an interaction can be calculated immediately or can be a function of time.&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
** Trusting the masses is generally a good way of ensuring trustworthiness. Imposed rules will not always fit every situation well - could potentially set bad reputation to a &amp;quot;good&amp;quot; entity.&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
** Do we maintain an ever-growing set of history items for interactions between entities? Do we look focus on the bad reputations?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
&lt;br /&gt;
Immutable data structure&lt;br /&gt;
Who could add data?&lt;br /&gt;
Who could remove data?&lt;br /&gt;
Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Implementation Requirements==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8631</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8631"/>
		<updated>2011-03-17T15:37:54Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs)&lt;br /&gt;
and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly&lt;br /&gt;
after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in&lt;br /&gt;
most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs&lt;br /&gt;
and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
&lt;br /&gt;
Immutable data structure&lt;br /&gt;
Who could add data?&lt;br /&gt;
Who could remove data?&lt;br /&gt;
Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;br /&gt;
&lt;br /&gt;
*SANS Institute InfoSec Reading Room, Common issues in PKI implementations - climbing the Slope of Enlightenment : http://www.sans.org/reading_room/whitepapers/authentication/common-issues-pki-implementations-climbing-slope-enlightenment_1198 date accessed 15th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8630</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8630"/>
		<updated>2011-03-17T15:36:03Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Common Issues With PKI Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard (nick.lessard @t gmail.com / nlessard @t carleton.connect.ca)&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Guaranteeing Authenticity/Public Key Infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs)&lt;br /&gt;
and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :In order to use certificates for S/MIME signed/encrypted email, the users’ email address must be in the certificate. Most people change their email addresses more frequently than the certificate. Unless a solution is built which allows users to keep the same email address over a long period, certificates would have to be re-issued every time a user changes email address. S/MIME v.3 stipulates that the receiving application must check the From: or Sender: field in the mail header and compare it to an email address in the sender’s certificate. If the check does not match, the mail application should perform another explicit check to ensure that the person who signed the message is indeed the person who sent it. As usual, the ‘devil is in the detail’ when it comes to implementation.&lt;br /&gt;
&lt;br /&gt;
*Certificate Validity Checking:CRLs have been the conventional method of providing certificate validity checking. CRLs do not scale very well as discussed earlier, but are usually kept for backward compatibility, archiving/historical verification and for use in off-line mode. The other issue with CRLs is that they are generally issued at certain intervals of 6, 12 or 24 hours, causing a time lag from the time a certificate is revoked until it appears on the published CRL. This may present a security risk, as a certificate may verify correctly&lt;br /&gt;
after it has been reported as compromised and revoked; (however some would argue that the time from actual compromise until the discovery and reporting of it would in&lt;br /&gt;
most cases be a more significant lag). The Online Certificate Status Protocol (OCSP) (RFC2560) allows a client to query an OCSP responder for the current status of a certificate. This saves searching through a large CRL and can save bandwidth if the CRL would normally be downloaded - although it may increase network traffic. Most OCSP responders are based on CRLs&lt;br /&gt;
and thus do not solve the problem of time lag as outlined above.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===The Problem Domain===&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
Publish/Subscribe?&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
Problem domain:&lt;br /&gt;
Which history should I maintain? What to take as important, what to disregard?&lt;br /&gt;
&lt;br /&gt;
Immutable data structure&lt;br /&gt;
Who could add data?&lt;br /&gt;
Who could remove data?&lt;br /&gt;
Authority&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
&lt;br /&gt;
* Emerge vs. Impose reputation on the system?&lt;br /&gt;
** Probably both, how do we account for both systems?&lt;br /&gt;
***If you want to know someone&#039;s reputation, you either need to start asking around for it, imposing yourself. Or you need the data to be sent around, so you already have access to it; emergent. &lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
***You need to know who has the data to ask them for it, or to go get it yourself. &lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
***First you need to know who&#039;s storing it. then you need to know if you&#039;re allowed to ask that node directly, do you ask a intermediary keeper of data. Will you even need to Query-- that is, do you already have all you need to know on hand? you need not get the latest updates on a node if every other node who&#039;s ever talked to it got DDOSed. (or do you?)&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
***Should I make my own definition for bad reputation, and query if someone engaged in activities I consider bad, or should their be a global agreed upon reputation?&lt;br /&gt;
* Who provides the good/bad reputation?&lt;br /&gt;
***Who should I ask for information from? &lt;br /&gt;
* Who do we trust for this information?&lt;br /&gt;
***Whoever you trust, presumably their opinion on a given node is more important then a node you trust less. &lt;br /&gt;
* Should reputation be mutable? Can we be pardoned, or can reputations be reversed?&lt;br /&gt;
***topically, would you bother asking for 10 year old reputation data on a node, if it&#039;s been a model citizen for the last 9?&lt;br /&gt;
* What entities are able to contribute to reputations?&lt;br /&gt;
***Should I ask everyone I trust for an opinion on a given node, or just certain keepers of trust data?  &lt;br /&gt;
* How do we access reputation about entities?&lt;br /&gt;
***You query someone in the know who you trust and are allowed to query. &lt;br /&gt;
***you could say, ask everyone you know and trust, and ask them to ask people they know and trust, (and so on...if they&#039;re willing) until you find a node with the information you need.&lt;br /&gt;
***in a more centralized system you need to ask some kind of keeper of information for the information you want, and that keeper may or may not provide you with the reputation info you want. &lt;br /&gt;
* Who is authorized to access particular reputations? How much to reveal? (Information flow)&lt;br /&gt;
***The ability to control this would depend on how centralized a system you have. In a truly distributed system where every node has an opinion on any other node they&#039;ve talked to you&#039;ll be able to find somebody who can tell you about the CIA node, but in a more centralized system the keepers of information might be less...willing to give Joe 6 cores information on who Iran is DDOSing. &lt;br /&gt;
&lt;br /&gt;
===Maybe References===&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8521</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8521"/>
		<updated>2011-03-15T14:36:50Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Public-key infrastructure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
* Emerge vs. Impose reputation on the system&lt;br /&gt;
* Where do you store the data?&lt;br /&gt;
* Where is the data queried from?&lt;br /&gt;
* What defines good/bad reputation?&lt;br /&gt;
&lt;br /&gt;
==What technologies currently exist?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
&lt;br /&gt;
* Black hole- email, spam,&lt;br /&gt;
* Google - search reputation&lt;br /&gt;
* Credit bureaus&lt;br /&gt;
* Yellow pages&lt;br /&gt;
* Better business bureau&lt;br /&gt;
* CRC - criminal records&lt;br /&gt;
&lt;br /&gt;
== What technologies don&#039;t currently exist?==&lt;br /&gt;
&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Common Issues With PKI Implementation===&lt;br /&gt;
&lt;br /&gt;
*Commercial Off-The-Shelf (COTS) versus Customised applications : The choice between COTS or customised products is usually one of cost versus usability. In case of usability the thing to be focused should be error messages. If PKI is built int o applications (transparent to users) than its fine if not than user will require to have some understanding of the use of keys, certificates, Certificate Revocation Lists (CRLs)&lt;br /&gt;
and directories/certificate repositories so that they can make informed decisions.&lt;br /&gt;
&lt;br /&gt;
*Token Logistics (smart card): The point where keys and certificates are linked to their owner is a very critical point in a PKI. If a fraudulent certificate is issued by a registration officer and the certificate holder uses the certificate to commit a crime or prank, trust in the whole PKI hierarchy may be lost. The physical security requirements are high, and the registration officer, whether a person or a smartcard bureau, must be subject to strict security polices and practices. As it was problem with DoD mentioned in section above.&lt;br /&gt;
&lt;br /&gt;
*Network issues - Traffic : There is no doubt that the implementation of PKI will add to the network load, although just how much depends on the system architecture. Potential additional traffic that should be considered includes: Certificate issuance, Email usage, CRLs , and Directory Replication&lt;br /&gt;
&lt;br /&gt;
*Network issues - Encryption : Many organisations implement anti-virus software and content inspection on servers at the perimeter of their networks. Some have security policies that rejects or quarantines encrypted traffic. To provide user-to-user confidentiality, messages will traverse networks with their payload hidden from inspection by virus and content checking.&lt;br /&gt;
&lt;br /&gt;
*Email address in certificate :&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
Reputation systems are meta systems that record, aggregate and distribute information about principals’ behaviour in distributed applications. Similarly, history-based access control systems make decisions based&lt;br /&gt;
on programs’ past security-sensitive actions. While the applications are&lt;br /&gt;
distinct, the two types of systems are fundamentally making decisions&lt;br /&gt;
based on information about the past behaviour of an entity.&lt;br /&gt;
A logical policy-centric framework for such behaviour-based decisionmaking is presented. In the framework, principals specify policies which&lt;br /&gt;
state precise requirements on the past behaviour of other principals that&lt;br /&gt;
must be fulﬁlled in order for interaction to take place. The framework consists of a formal model of behaviour, based on event structures; a declarative logical language for specifying properties of past behaviour; and&lt;br /&gt;
eﬃcient dynamic algorithms for checking whether a particular behaviour&lt;br /&gt;
satisﬁes a property from the language. It is shown how the framework can&lt;br /&gt;
be extended in several ways, most notably to encompass parameterized&lt;br /&gt;
events and quantiﬁcation over parameters. In an extended application, it&lt;br /&gt;
is illustrated how the framework can be applied for dynamic history-based&lt;br /&gt;
access control for safe execution of unknown and untrusted programs.&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
* Bolton, G. et al. How Effective are Electronic Reputation Mechanisms?  (March 10, 2011) [http://ccs.mit.edu/dell/reputation/BKOMSsub.pdf]&lt;br /&gt;
&lt;br /&gt;
====Abstract====&lt;br /&gt;
&lt;br /&gt;
Electronic reputation or “feedback” mechanisms aim to mitigate the moral hazard problems &lt;br /&gt;
associated with exchange among strangers by providing the type of information available in &lt;br /&gt;
more traditional close-knit groups, where members are frequently involved in one another’s &lt;br /&gt;
dealings.  In this paper, we compare trading in a market with electronic feedback (as &lt;br /&gt;
implemented by many Internet markets) to a market without, as well as to a market in which the &lt;br /&gt;
same people interact with one another repeatedly (partners market).   We find that, while the &lt;br /&gt;
feedback mechanism induces quite a substantial improvement in transaction efficiency, it also &lt;br /&gt;
exhibits a kind of public goods problem in that, unlike the partners market, the benefits of trust &lt;br /&gt;
and trustworthy behavior go to the whole community and are not completely internalized.  We &lt;br /&gt;
discuss the implications of this perspective for improving these systems.&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
Since this won&#039;t be the actual page the paper is written on, I&#039;m going to dump possibly relevant links here. If they actually get used I&#039;ll make them into proper references. &lt;br /&gt;
&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8380</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8380"/>
		<updated>2011-03-10T17:17:17Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
** Current Status:  Snowed-in somewhere in the outskirts of Orleans...&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
Emerge vs. Impose reputation on the system&lt;br /&gt;
==What currently exists?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
Since this won&#039;t be the actual page the paper is written on, I&#039;m going to dump possibly relevant links here. If they actually get used I&#039;ll make them into proper references. &lt;br /&gt;
&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
*Electronic Commerece Conference , PKI Sub-Group ,  Issue Paper : http://www.defense.gov/dodreform/ecwg/pki.pdf date accessed 5th March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8379</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=8379"/>
		<updated>2011-03-10T17:15:49Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Public-key infrastructure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
** MSN: Gelowt@gmail.com&lt;br /&gt;
** E-Mail:  tgelowsk@sce.carleton.ca&lt;br /&gt;
** Current Status:  Snowed-in somewhere in the outskirts of Orleans...&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
Emerge vs. Impose reputation on the system&lt;br /&gt;
==What currently exists?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
===Issues &amp;amp; Solutions===&lt;br /&gt;
I found out there are many different implementations of PKI , and they all focuses on their own issues and solutions. For example PKI used in DoD have following issues&lt;br /&gt;
&lt;br /&gt;
*Lack of PKI-enabled eCommerce applications and lack of interoperability among PKI applications&lt;br /&gt;
&lt;br /&gt;
*DoD is developing a single high assurance PKI&lt;br /&gt;
&lt;br /&gt;
*Very High Cost Impact to the EC/EB community.&lt;br /&gt;
&lt;br /&gt;
*The PKI community lacks metrics for mapping of trust models between the DoD :”high assurance” C2 and EC/EB domains&lt;br /&gt;
&lt;br /&gt;
*Education of everyone (policy maker through user) to a common level of understanding is a huge challenge.&lt;br /&gt;
&lt;br /&gt;
*While the purpose of using PKI in EC/EB is to provide additional trust to allow the Internet to serve as a vehicle for legally binding transactions , problems still exist with the methodologies associated with establishing a long-term burden of proof. Specifically, there are no widely adopted industry standards for maintenance of electronic signatures or for authenticated timestamps for record maintenance that have stood the test of time. These processes are untried and the case law has not yet been established to convince users that there are no issues with enforcement of these new processes. An additional barrier to EC/EB within this space is the current DoD Certificate policy in which DoD accepts&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
&lt;br /&gt;
===Random Ramblings on Reputation Management and Distribution===&lt;br /&gt;
&lt;br /&gt;
This system has unique distribution requirements as compared to most distributed systems in general.  In this system, we cannot assume that there will be a universally agreed-upon definition of good, or bad.  Similarly, the system must be self-policing.  It would be up to each and every group of autonomous systems to decide which updates to accept and reject.  Updates themselves also should not cause the network to DDoS itself.  Lastly, it would be impossible for every system to know what the reputation for a given system is.  Therefore the system must disseminate information in some way that is query-able and localizes reputation information where required.&lt;br /&gt;
&lt;br /&gt;
To this end, we need a way of spreading information that while reliable, does not depend on one universally agreed-upon set of reputations.&lt;br /&gt;
&lt;br /&gt;
For example, on an internet-scale operating system it would be entirely reasonable for one group of systems to not want to accept updates, or want to avoid communication with a given series of systems.&lt;br /&gt;
&lt;br /&gt;
Any solution would assume that the problems of attribution are solved.&lt;br /&gt;
&lt;br /&gt;
===Current Examples of Reputation Dissemination===&lt;br /&gt;
&lt;br /&gt;
The first protocol that immediately comes to mind in this situation is a gossip-based protocol.  These protocols are designed to operate in highly decentralized, large-scale systems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a nice overview:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4537308 &amp;quot;Reputation management in distributed systems&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Examples are as follows:&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4228013 &amp;quot;Gossip-based Reputation Aggregation for Unstructured Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=5569965 &amp;quot;Improving Accuracy and Coverage in an Internet-Deployed Reputation Mechanism&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4459326 &amp;quot;GossipTrust for Fast Reputation Aggregation in Peer-to-Peer Networks&amp;quot;&lt;br /&gt;
* http://ieeexplore.ieee.org.proxy.library.carleton.ca/xpls/abs_all.jsp?arnumber=4777496 &amp;quot;Adaptive trust management in P2P networks using gossip protocol&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Another possibility is using &amp;quot;Reputation chains&amp;quot;&lt;br /&gt;
* http://dx.doi.org.proxy.library.carleton.ca/10.1109/TKDE.2009.45 &amp;quot;P2P Reputation Management Using Distributed Identities and Decentralized Recommendation Chains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
&lt;br /&gt;
===Reputation systems===&lt;br /&gt;
* record, aggregate, distribute information about an entity&#039;s behaviour in distributed applications&lt;br /&gt;
&lt;br /&gt;
* reputation might be based on the entity&#039;s past ability to adhere to a license agreement (mutual contract between issuer and licensee)&lt;br /&gt;
&lt;br /&gt;
===History-based access control systems===&lt;br /&gt;
* make decision based on an entity&#039;s past security-sensitive actions&lt;br /&gt;
&lt;br /&gt;
===Examples of reputation systems (trust-informing technologies)===&lt;br /&gt;
* eBay - Feedback forum (positive, neutral, negative)&lt;br /&gt;
&lt;br /&gt;
===Do reputation systems have some validity?===&lt;br /&gt;
&lt;br /&gt;
Resnick et al. argue that reputation systems&lt;br /&gt;
foster an incentive for principals to well-behave because of “the expectation of&lt;br /&gt;
reciprocity or retaliation in future interactions&lt;br /&gt;
&lt;br /&gt;
Abstractions are used to model the aggregated information of each entity. These abstractions may not encompass the full details of transactions and provide context to specific issues relating to feedback. In turn we can end up with ambiguous values.&lt;br /&gt;
&lt;br /&gt;
So we need a system that provides sufficient information in order to verify the precise properties of a past behaviour.&lt;br /&gt;
&lt;br /&gt;
* Krukow, K. A Logical Framework for Reputation Systems and History-based Access Control. School of Electronics and Computer Science University of Southampton, UK. (March 3, 2011) [http://www.brics.dk/~krukow/research/publications/online_papers/concrete-jcs.pdf]&lt;br /&gt;
&lt;br /&gt;
* Khosrow-Pour, M. Emerging trends and challenges in information technology management (March 7, 2011) [http://books.google.ca/books?id=ybzS-yylJfAC&amp;amp;lpg=PA822&amp;amp;ots=V7hn_RzqXA&amp;amp;dq=maintaining%20history%20in%20reputation%20systems&amp;amp;pg=PA822#v=onepage&amp;amp;q=maintaining%20history%20in%20reputation%20systems&amp;amp;f=false]&lt;br /&gt;
&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
&lt;br /&gt;
Since this won&#039;t be the actual page the paper is written on, I&#039;m going to dump possibly relevant links here. If they actually get used I&#039;ll make them into proper references. &lt;br /&gt;
&lt;br /&gt;
http://www.kirkarts.com/wiki/images/1/13/Resnick_eBay.pdf - &#039;&#039;Trust Among Strangers in Internet Transactions:&lt;br /&gt;
Empirical Analysis of eBay’s Reputation System&#039;&#039; (maybe not too relevant)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=544741.544809 - &#039;&#039;An Evidential Model of Distributed Reputation Management&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=775152.775242&amp;amp;type=series%EF%BF%BD%C3%9C -- &#039;&#039;The EigenTrust Algorithm for Reputation Management in&lt;br /&gt;
P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.4.2297&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;A Robust Reputation System for Mobile Ad-hoc&lt;br /&gt;
Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.125.8729&amp;amp;rep=rep1&amp;amp;type=pdf -- &#039;&#039;EigenRep: Reputation Management in P2P Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www.chennaisunday.com/ieee%202010/Reputation%20Estimation%20and%20Query%20in%20Peer-to-Peer%20Networks.pdf -- &#039;&#039;Reputation Estimation and Query in Peer-to-Peer Networks&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is another paper that might be interesting for you. -- Lester&lt;br /&gt;
http://dcg.ethz.ch/publications/netecon06.pdf&lt;br /&gt;
&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7884</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7884"/>
		<updated>2011-03-03T16:22:21Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Uses and Need */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
Emerge vs. Impose reputation on the system&lt;br /&gt;
==What currently exists?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
===Uses and Need===&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7883</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7883"/>
		<updated>2011-03-03T16:21:50Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
Emerge vs. Impose reputation on the system&lt;br /&gt;
==What currently exists?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
====Uses and Need====&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Mattila, Anssi; and Mattila, Minna &amp;quot;What is the Effect of Product Attributes on Public-Key Infrastructure adoption? &amp;quot; http://internetjournals.net/journals/tir/2006/January/Paper%2003.pdf Accessed on 2nd March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7882</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7882"/>
		<updated>2011-03-03T16:13:55Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
Emerge vs. Impose reputation on the system&lt;br /&gt;
==What currently exists?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
====Uses and Need====&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* Joel Weise : &amp;quot;Public Key Infrastructure Overview &amp;quot; http://www.sun.com/blueprints/0801/publickey.pdf Accessed 2nd March 2011&lt;br /&gt;
&lt;br /&gt;
* Security Glossary : http://www.cafesoft.com/support/security-glossary.html Accessed on 2nd March 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7881</id>
		<title>DistOS-2011W Reputation</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_Reputation&amp;diff=7881"/>
		<updated>2011-03-03T16:09:53Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Public-key infrastructure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Members==&lt;br /&gt;
* Waheed Ahmed&lt;br /&gt;
* Trevor Gelowsky&lt;br /&gt;
* Michael Du Plessis&lt;br /&gt;
* Nicolas Lessard&lt;br /&gt;
&lt;br /&gt;
==The problem==&lt;br /&gt;
Emerge vs. Impose reputation on the system&lt;br /&gt;
==What currently exists?==&lt;br /&gt;
* Digital signatures&lt;br /&gt;
** Certificates signed by trusted organizations&lt;br /&gt;
==Public-key infrastructure==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
In order to build secure chain of trust Public-Key Infrastructure is used for internet based communication. It consists of various things like security policy , Certificate authority , registration authority , certificate distribution system PKI enabled applications. &lt;br /&gt;
&lt;br /&gt;
====Uses and Need====&lt;br /&gt;
With development of modern e-commerce based businesses which has minimal customer face-to-face interactions is demanding more security and integrity. The online web based stores where huge amount of transactions take place needs to ensure customers that there information is confidential and processed through a secure channel. This is where implementation of PKI steps in to provide mechanisms to ensure trusted relationships are established and maintained. The specific security functions in which a PKI can provide foundation are confidentiality, integrity, non-repudiation,and authentication.&lt;br /&gt;
&lt;br /&gt;
==Dissemination==&lt;br /&gt;
==Maintaining History==&lt;br /&gt;
==Querying Reputation==&lt;br /&gt;
==Possible implementations==&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7877</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7877"/>
		<updated>2011-03-03T15:44:48Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
== Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
== Server==&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Client==&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Daemon client and server==&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Marzullo’s algorithm and function marzullo(long []) ==&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future I guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work. The most important feature of NTP relevant to this paper is its scalability: its phase lock loop clock discipline is designed for small scale networks so that NTP can maintain low offsets among clocks, even if propagation delays increase significantly. &lt;br /&gt;
&lt;br /&gt;
They main problem of NTP is under heavy load, constantly changing offsets may cause frequent clock re-adjustments by NTP. Each time it re-adjust, packets transmitted at later time may have smaller time stamps than packets transmitted earlier resulting in interfere with path monitoring. Future plan is to Global Positioning System receivers  for clock synchronization among edge routers.&lt;br /&gt;
&lt;br /&gt;
Whether its traffic in air or ground or buying selling things carefully coordinated , reliable and accurate time is vital. In some cases ill-gotten time might cause DNS caches to to expire and entire internet to implode on the root servers , which was one of the threat on the eve of millennium in 1999. Critical data files might expire before they are created, and an electronic message might arrive before it was sent. Reliable and accurate computer time is necessary for any real-time distributed computer application, which is what much of our public infrastructure has become.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Linux Home Networking : &amp;quot;How To : NTP Server&amp;quot; : http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server Accessed on 15 Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7650</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7650"/>
		<updated>2011-03-01T05:19:07Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
== Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
== Server==&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Client==&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Daemon client and server==&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Marzullo’s algorithm and function marzullo(long []) ==&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future I guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work. The most important feature of NTP relevant to this paper is its scalability: its phase lock loop clock discipline is designed for small scale networks so that NTP can maintain low offsets among clocks, even if propagation delays increase significantly. &lt;br /&gt;
&lt;br /&gt;
They main problem of NTP is under heavy load, constantly changing offsets may cause frequent clock re-adjustments by NTP. Each time it re-adjust, packets transmitted at later time may have smaller time stamps than packets transmitted earlier resulting in interfere with path monitoring. Future plan is to Global Positioning System receivers  for clock synchronization among edge routers.&lt;br /&gt;
&lt;br /&gt;
Whether its traffic in air or ground or buying selling things carefully coordinated , reliable and accurate time is vital. In some cases ill-gotten time might cause DNS caches to to expire and entire internet to implode on the root servers , which was one of the threat on the eve of millennium in 1999. Critical data files might expire before they are created, and an electronic message might arrive before it was sent. Reliable and accurate computer time is necessary for any real-time distributed computer application, which is what much of our public infrastructure has become.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7531</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7531"/>
		<updated>2011-02-28T19:45:25Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
== Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
== Server==&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Client==&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Daemon client and server==&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Marzullo’s algorithm and function marzullo(long []) ==&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future I guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work. The most important feature of NTP relevant to this paper is its scalability: its phase lock loop clock discipline is designed for small scale networks so that NTP can maintain low offsets among clocks, even if propagation delays increase significantly. &lt;br /&gt;
&lt;br /&gt;
They main problem of NTP is under heavy load, constantly changing offsets may cause frequent clock re-adjustments by NTP. Each time it re-adjust, packets transmitted at later time may have smaller time stamps than packets transmitted earlier resulting in interfere with path monitoring. Future plan is to Global Positioning System receivers  for clock synchronization among edge routers.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7321</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7321"/>
		<updated>2011-02-22T18:38:30Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 3.2 Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
== Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
== Server==&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Client==&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Daemon client and server==&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Marzullo’s algorithm and function marzullo(long []) ==&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7320</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7320"/>
		<updated>2011-02-22T18:38:05Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Development Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
== Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
== Server==&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==3.2 Client==&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Daemon client and server==&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Marzullo’s algorithm and function marzullo(long []) ==&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7319</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7319"/>
		<updated>2011-02-22T18:35:25Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 2.5 Level 3 client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
== Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7318</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7318"/>
		<updated>2011-02-22T18:35:17Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 2.4 Level 2 server and client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
==2.5 Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7317</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7317"/>
		<updated>2011-02-22T18:35:04Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 2.3 Level 1 server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
== Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
==2.4 Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
==2.5 Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7316</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7316"/>
		<updated>2011-02-22T18:34:55Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 2.2 Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
== Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
&lt;br /&gt;
==2.3 Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
==2.4 Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
==2.5 Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7315</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7315"/>
		<updated>2011-02-22T18:34:45Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 2.1 NTP timestamps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
== NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
==2.2 Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
==2.3 Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
==2.4 Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
==2.5 Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7314</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7314"/>
		<updated>2011-02-22T18:34:30Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Detailed context/background information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
==2.1 NTP timestamps==&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
==2.2 Structure==&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
==2.3 Level 1 server==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
==2.4 Level 2 server and client==&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
==2.5 Level 3 client==&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7313</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7313"/>
		<updated>2011-02-22T18:33:38Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 1.5 Outline of the report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7312</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7312"/>
		<updated>2011-02-22T18:33:20Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction:Context/Background=&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==1.5 Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7311</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7311"/>
		<updated>2011-02-22T18:32:15Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 1.2	Importance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==	Context/Background==&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
==	Definition of the problem ==&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
==	Summary of the result ==&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
==1.5 Outline of the report==&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7310</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7310"/>
		<updated>2011-02-22T18:31:28Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 1.1	Context/Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==	Context/Background==&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==1.2	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7309</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7309"/>
		<updated>2011-02-22T18:31:08Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==1.1	Context/Background==&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
==1.2	Importance==&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7308</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7308"/>
		<updated>2011-02-22T18:30:35Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
==1.1	Context/Background==&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
*1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7307</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7307"/>
		<updated>2011-02-22T18:29:13Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 4. List of files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
*1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
*1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
= List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7306</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7306"/>
		<updated>2011-02-22T18:28:28Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 3.1 Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
*1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
*1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
*3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
*3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
=4. List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7305</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7305"/>
		<updated>2011-02-22T18:27:14Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 3. Development Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
*1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
*1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
= Development Details=&lt;br /&gt;
&lt;br /&gt;
=3.1 Server=&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
=4. List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7304</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7304"/>
		<updated>2011-02-22T18:25:10Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 2. Detailed context/background information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
*1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
*1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
= Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
*2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
*2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
*2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
*2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
*2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
=3. Development Details=&lt;br /&gt;
&lt;br /&gt;
3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
=4. List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7303</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7303"/>
		<updated>2011-02-22T18:24:03Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
*1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
*1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
*1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
*1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
*1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
=2. Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
=3. Development Details=&lt;br /&gt;
&lt;br /&gt;
3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
=4. List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7301</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7301"/>
		<updated>2011-02-21T21:05:37Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* 3. Development Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
=2. Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
=3. Development Details=&lt;br /&gt;
&lt;br /&gt;
3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
=4. List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7300</id>
		<title>DistOS-2011W NTP</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS-2011W_NTP&amp;diff=7300"/>
		<updated>2011-02-21T21:03:05Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
1. Introduction:&lt;br /&gt;
&lt;br /&gt;
1.1	Context/Background&lt;br /&gt;
&lt;br /&gt;
Network Time Protocol (NTP) synchronizes clocks of hosts and routers. According to NIST estimates there are 10-20 million NTP servers and clients deployed in the internet and its tributaries all over the world. NTP software has been ported to almost every workstation and server platform available today – from PCs to Cray’s – UNIX, Windows, VMS and embedded systems, even home routers and battery backup systems.&lt;br /&gt;
&lt;br /&gt;
NTP provides nominal accuracies of low tens of milliseconds on WANs, sub milliseconds on LANs and sub microseconds using a precision time source such as cesium oscillator or GPS receiver.  Our  time  protocol   was  designed  over  the  LAN  and  our  goal  was  to  achieve sub milliseconds of accuracy.&lt;br /&gt;
&lt;br /&gt;
1.2	Importance&lt;br /&gt;
&lt;br /&gt;
Precision of time is very important in the computer world. Following are some example why it is so important to maintain a precise and accurate time.&lt;br /&gt;
&lt;br /&gt;
Network monitoring, measurement and control, Distributed database transaction journaling and logging,   Secure   document   timestamps   with   cryptographic   certification,   Radio   and   TV programming lunch and monitoring,  Stock market buy and sell orders, Distributed network gaming and training, etc.&lt;br /&gt;
 &lt;br /&gt;
1.3	Definition of the problem&lt;br /&gt;
&lt;br /&gt;
My goal was to acquire time accuracy in the Linux lab assuming that all the computers do not have internet connection. To time synchronize all the computers I had to build our own hierarchy of NTP servers and clients.&lt;br /&gt;
&lt;br /&gt;
1.4	Summary of the result&lt;br /&gt;
&lt;br /&gt;
An  efficient  hierarchy  of  NTP  server  and  client  has  been  implemented.  Precision  of&lt;br /&gt;
Sub milliseconds were achieved.&lt;br /&gt;
&lt;br /&gt;
1.5 Outline of the report&lt;br /&gt;
Detailed background information and the structure of our time protocol are provided in Section&lt;br /&gt;
2. The development setup and code explanation is reviewed in Section 3. Details of which server/client contains which files are given in section 4. My contributions in this implementation are described in Section 5.&lt;br /&gt;
&lt;br /&gt;
=2. Detailed context/background information=&lt;br /&gt;
&lt;br /&gt;
In  this  section  the  background  information  of  Network  Time  protocol  and  the hierarchical model  and the comparison with the original NTP designed by Dave Mills is reviewed. For unambiguity I will call the protocol as Linux lab time protocol (LLTP) and the original Network time protocol as NTP.&lt;br /&gt;
&lt;br /&gt;
2.1 NTP timestamps&lt;br /&gt;
&lt;br /&gt;
The 64-bit timestamps used by NTP consist of a 32-bit second part and a 32-bit fractional second part. I followed the same time structure for our LLTP which gives us a time scale of 232 seconds (136 years) and a theoretical resolution of 2-32 seconds (233 picoseconds).&lt;br /&gt;
&lt;br /&gt;
2.2 Structure&lt;br /&gt;
&lt;br /&gt;
NTP uses a hierarchical, semi-layered system of levels of clock sources; each level of this hierarchy is termed a stratum and assigned a layer number starting with 0 at the top. The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in hierarchy.&lt;br /&gt;
&lt;br /&gt;
My target is to develop a time synchronizing software for a small office or lab with a large number of computer where a very few computer has internet connectivity but all the computers are connected together in a local network. As a result not all the computer is able to connect to internet for time accuracy. LLTP uses similar hierarchical, semi-layered sources as NTP. Each layer of this hierarchy is termed as level and assigned a layer number starting with 1.&lt;br /&gt;
 &lt;br /&gt;
2.3 Level 1 server&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Computers  with  internet  connectivity are  the  level  1  server for  our  LLTP&lt;br /&gt;
 &lt;br /&gt;
Level 1 server&lt;br /&gt;
 &lt;br /&gt;
synchronizes its system clock with the NTP servers on the internet. In this hierarchy, only a fixed (5) number of level 1 servers are used. Unlike NTP we don’t have the privilege to use a 10 of thousands of level 1 and level 2 servers, and unlike NTP our LLTP has only 3 level structures.&lt;br /&gt;
&lt;br /&gt;
Picture below shows the connectivity and the hierarchy of LLTP&lt;br /&gt;
&lt;br /&gt;
[[File:LTTPHireachy.jpg]]&lt;br /&gt;
&lt;br /&gt;
2.4 Level 2 server and client&lt;br /&gt;
&lt;br /&gt;
Level 2 servers run two different programs. A client program to synchronize its system clock with the level1 servers and a server program that waits for any level 3 client for time request. Upon the request it sends its synchronized system time to the client. Level 2 servers also synchronize its system clock with the other level2 servers.&lt;br /&gt;
&lt;br /&gt;
Each level2 server is connected to 4 level1 servers. It polls time from each level1 server and chooses the best time and synchronizes its system clock. How the best time is achieved is described in the section 3 below with code explanation. There are maximum 5 level2 servers with our LLTP model. Each level2 server is connected to 4 different level1 servers. None of the level2 server has the same level1 server set.&lt;br /&gt;
&lt;br /&gt;
2.5 Level 3 client&lt;br /&gt;
&lt;br /&gt;
Bottom of the LLTP hierarchy is level3 client. It only runs a client program that polls time from the level2 servers. It can only connect/request time from one of our level2 servers at a time. It also requires the knowledge of the IP address of the level2 server. For the load management purpose level 3 clients are not able to connect to a Level1 servers.&lt;br /&gt;
&lt;br /&gt;
=3. Development Details=&lt;br /&gt;
&lt;br /&gt;
3.1 Server&lt;br /&gt;
&lt;br /&gt;
As it is mentioned in section-2, there are two servers in our LLTP model. One is level 1 and the other is level 2. Both servers wait for a client with time requests and upon receiving one send the time string. Code structure for both the servers is almost similar with minor technical differences which are explained later in this section. Both servers use a infinite for loop for waiting for the&lt;br /&gt;
client. They use a fixed but different port number for the client connection.&lt;br /&gt;
&lt;br /&gt;
[[File:Z:\clientntp.jpg]]&lt;br /&gt;
&lt;br /&gt;
Time requests sent to Level 1 server have to contain a message no more than 1 character and it has to be an integer which is sent by the level2 client to distinguish the level1 servers from one another. Level1 server will take that message received from the client and add that at the end of the time string sent to the client. If the level1 server receives a time request message with greater size of 1than it will not return any time value. For the level2 server the maximum message size is&lt;br /&gt;
128 characters and it do not have to be an integer. Level2 server discards the message sent from the level3 client. A unique feature of level2 server is that a level3 client time request with “exit” message can shut down the level2 server. This feature is not implemented in level1 servers.&lt;br /&gt;
&lt;br /&gt;
[[File:level1servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:level2servercode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Both servers send time as a string which handles the problem with big and little Endean.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.2 Client&lt;br /&gt;
&lt;br /&gt;
There are also two clients for our LLTP, level2 client and level3 client. Level3 client is very straight forward where the level3 is a bit more complicated.&lt;br /&gt;
&lt;br /&gt;
Level3 client sends a time request to the level2 server. It cannot send time request to a level1 server as the port number for both server are different and the port numbers are hard coded for both the client (leve3 client/level2 server uses port 123 where level2 client/level1 server uses port 4003). Level2 server also has a restriction over the message sent by the client which is explained above in the server section. Upon receiving the time string back from the server which contains the seconds and milliseconds part together as a string separated by a comma (‘,’),  it separates this two parts and checks for the latency and calls function named set_time(long[] ) which sets the system clock time with the new time.&lt;br /&gt;
&lt;br /&gt;
[[File:level3clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client dose almost the same things but in a broader and sophisticated way. It polls time from four different levle1 time server at the same time. When it sends the time request, it sends a unique message as the server ID to identify the time received from different level1 server which helps to fix the latency later.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode.jpg]]&lt;br /&gt;
&lt;br /&gt;
Level2 client also uses a time out of 1 second. If it dose not receive the time string back from the server then it will  ignore the time from that server and choose the best time from the ones it received from the other servers. Received time strings from the different servers also have the server id added at the end of the time string.  Using that information level2 client saves the received time in order and fixes the latency accordingly. It keeps all the latency fixed time in an array with the invalid time being -1. Then it calls a different function called marzullo(long []), which  takes  the  array  of  latency  fixed  times  and  returns  the  best  time  depending  on  the Marzullo’s algorithm. Function marzullo() is explained in the section 3.4. Then it uses the set_time(long []) method to set the system clock time.&lt;br /&gt;
&lt;br /&gt;
[[File:level2clientcode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.3 Daemon client and server&lt;br /&gt;
&lt;br /&gt;
The  level2  client  and  server  runs  as  a  daemon  process  to  give  them  the  privilege  to  run continuously in the background. As both the client and server in level2 does not need any user interference and need to run all the time to update the system clock of the running computer from the level1 server.&lt;br /&gt;
 &lt;br /&gt;
As it is mentioned above the client process for level2 run continuously and it updates its system clock every 1 minute (polls time from the level1 server every 60 seconds). Server daemon process is built in the same manner but unlike the client process it does not have a waiting time.&lt;br /&gt;
&lt;br /&gt;
[[File:codefordaemon.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.4 Marzullo’s algorithm and function marzullo(long [])&lt;br /&gt;
&lt;br /&gt;
Marzullo’s algorithm, invented by Keith Marzullo, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. A modified version of his algorithm, intersection  algorithm, is use in NTP. We used the simplified version of this algorithm to choose the best possible time from our time sources (level1 servers).&lt;br /&gt;
&lt;br /&gt;
Our function long* marzullo (long  [])  takes an array of four times from four different level1 servers and return a pointer to an array with the best seconds and milliseconds. First it takes the given array of times and makes two entries for each time as ±2 milliseconds. For each entry it also adds a type of -1 for -2millisecons and +1 for +2 milliseconds. As a result for 4 time entry it produces an array of 8 time entries with type as ±1. For our LLTP we took ±2milliseconds as our error range. After adding the type the entry will look like &amp;lt;entry – 2, -1&amp;gt; for the beginning of the range and &amp;lt;entry+2, +1&amp;gt; for the end of the range [entry±2].&lt;br /&gt;
&lt;br /&gt;
[[File:IntersectionMarzullasalg.jpg]]&lt;br /&gt;
&lt;br /&gt;
The  description  of  the  algorithm  uses  the  following  variables:  best  (largest  number  of overlapping  intervals  found),  cnt  (current  number  of  overlapping  intervals),  best_start  and&lt;br /&gt;
 &lt;br /&gt;
best_end (the beginning and end of best interval found so far). We used a two dimensional array to keep the second, millisecond and type of the range. The structure of the array is as follows:&lt;br /&gt;
&lt;br /&gt;
time_entry  [i][0]  =  second  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][1]  =  millisecond  part  of  the  time  &lt;br /&gt;
entry time_entry  [i][2]  =  type  of  the  range  (i.e. ±1)&lt;br /&gt;
&lt;br /&gt;
Here ‘Time_entry is the name of the array and ‘i’ is used as an index to traverse the array. After creating the array it follows the following step to determine the accurate time. Then it sends back the best chosen time to the level2 client program.&lt;br /&gt;
&lt;br /&gt;
[[File:section3last.jpg]]&lt;br /&gt;
&lt;br /&gt;
=4. List of files=&lt;br /&gt;
&lt;br /&gt;
Level1 server:&lt;br /&gt;
&lt;br /&gt;
            DieWithError.c &lt;br /&gt;
            get-time.c &lt;br /&gt;
            L1Server.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level2 server:&lt;br /&gt;
 &lt;br /&gt;
             daemon_server.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Server.c&lt;br /&gt;
 &lt;br /&gt;
Level2 client:&lt;br /&gt;
&lt;br /&gt;
             daemon_client.c &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c &lt;br /&gt;
             L2Client.c &lt;br /&gt;
             marzullo.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             selection_sort.c &lt;br /&gt;
             set-time.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level3 client:&lt;br /&gt;
 &lt;br /&gt;
             DieWithError.c &lt;br /&gt;
             get-time.c&lt;br /&gt;
             print-time.c &lt;br /&gt;
             set-time.c &lt;br /&gt;
             UDPTimeClient.c&lt;br /&gt;
&lt;br /&gt;
=Discussion/Output=&lt;br /&gt;
&lt;br /&gt;
The most intresting part of testing this was to see how distrubted architect of NTP client-server works and how could it be improved. I learnt alot by setting up and running them and seeing the results. It was fun improving little bit on exsisting implementation of NTP.&lt;br /&gt;
&lt;br /&gt;
Output form different levels of clients and servers are given in this section. Output from level1 server:&lt;br /&gt;
&lt;br /&gt;
[[File:output1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:output4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Overall, there has been lots of work going on NTP , due to high demand of distributed clinet-server architect based application. This was carried on a very small linux based lab , in future i guess there will be need to test on large industry based scale , where many systems can be connected and than test to see how the delay from clients to server causes disturbance in algorithm. There will be issues for sure since as the information travels it takes time and that delayed time will need to be adjusted more and will be focus of future work.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*Ntp home page:  http://ntp.org Acessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for network time protocol:  http://en.wikipedia.org/wiki/Network_Time_Protocol Accessed on 13th Feb 2011&lt;br /&gt;
&lt;br /&gt;
*Wikipedia for Marzullo’s algorithm:  http://en.wikipedia.org/wiki/Marzullo&#039;s_algorithm Accessed on 13th Feb 2011&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Section3last.jpg&amp;diff=7299</id>
		<title>File:Section3last.jpg</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Section3last.jpg&amp;diff=7299"/>
		<updated>2011-02-21T20:59:25Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level3clientcode.jpg&amp;diff=7298</id>
		<title>File:Level3clientcode.jpg</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level3clientcode.jpg&amp;diff=7298"/>
		<updated>2011-02-21T20:58:45Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level2servercode.jpg&amp;diff=7297</id>
		<title>File:Level2servercode.jpg</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level2servercode.jpg&amp;diff=7297"/>
		<updated>2011-02-21T20:58:35Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level2clientcode2.jpg&amp;diff=7296</id>
		<title>File:Level2clientcode2.jpg</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level2clientcode2.jpg&amp;diff=7296"/>
		<updated>2011-02-21T20:58:22Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level2clientcode.jpg&amp;diff=7295</id>
		<title>File:Level2clientcode.jpg</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level2clientcode.jpg&amp;diff=7295"/>
		<updated>2011-02-21T20:58:13Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level1servercode.jpg&amp;diff=7294</id>
		<title>File:Level1servercode.jpg</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=File:Level1servercode.jpg&amp;diff=7294"/>
		<updated>2011-02-21T20:58:04Z</updated>

		<summary type="html">&lt;p&gt;Wahmed2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wahmed2</name></author>
	</entry>
</feed>