The Wayback Machine - https://web.archive.org/web/20000309223442/http://www.dice.u... TIMESEC Digital Time-Stamping and the Evaluation of Security Primitives This page presents the Belgian Project TIMESEC funded by the OSTC (Federal Office for Scientific, Technical and Cultural Affairs). Contents • Project duration • Main objectives • Major expected outputs • Deliverables • Output Documents • List of partners • Contacts • Other related web pages Project duration TIMESEC is a project that started on August 1996, for a duration of 2 years. Main objectives Today, computer and telecommunication securisation is a major issue. Exchanging information requires several things such as: integrity, identification, non-repudiation, confidentiality,... which are necessary to each secure protocol to exchange messages. Time-stamping is of high importance for electronic contracts. It's important for EDI (Electronic Data Interchange which is essential for electronic trade), IPR (Intellectual Property Rights), interactive multimedia services (pay-TV, homeshopping, video online,...), and in general, Internet securisation. The project is of strategic importance because up to now people who want to certify their techniques, their products, or their securisation machine in order to market them must export their products, their knowledge and their know-how to other countries (competitor). Our proposition will provide an answer to this paradoxical economic problem. The method which will be develop during this project will be use to improve future evaluation; it will play a major role in the standardization and the normalization of future systems for information securisation. It seems to be essential to improve Belgian appraisal in this field, and to pave the way to a Belgian evaluation center designed according to these criteria. Major expected outputs The concrete objective of the project is to develop • a complete system of digital time-stamping and electronic notarization • as well as security primitives evaluation methods. Deliverables • Time and cryptography (Technical Report 1), March 1997 • Evaluation Methodology for Security Primitives (Technical Report 2), December 1997 • Design of a Timestamping System (Technical Report 3), 1998 • Specification and Implementation of a Timestamping System (Technical Report 4), 1999 Output documents Presentation of progress (meeting Feb. 18, 1997) • Evaluation methodology for security primitives (Bart Van Rompay, K.U.L.) • Timestamping(Henri Massias, U.C.L.) US-patent concerning Timestamping Number Title 5,136,646 Digital document time-stamping with catenate certificate 5,136,647 Method for secure timestamping of digital documents 5,373,561 Method of extending the validity of a cryptographic certificate RE. 34,954 Method for secure timestamping of digital documents 5,781,629 Digital document authentication system List of partners • extern members 1. Utimaco Belgium n.v. 2. Belgacom 3. Belnet • active partners 1. U.C.L. 2. K.U.L.(Coordinator) Contacts 1. Ronny Bjones, Director Technical Departement Utimaco Belgium n.v. Ambachtelijke Zone De Vunt 9 3220 Holsbeek Belgium Phone: +32 16 44 01 35 - Fax: +32 16 44 01 40 2. Marc Roger Belnet Rue de la science 8 1000 Bruxelles Belgium Phone: +32 2 238 34 70 - Fax: +32 2 231 15 31 3. Olivier Delos Belgacom Boulevard E.Jacqmain 177 B-1210 Bruxelles Belgium Phone: +32 2 202 92 76 - Fax: +32 2 202 84 52 4. People working for TIMESEC at UCL: Prof. Jean Jacques Quisquater UCL Crypto Group Faculté des sciences appliquées Université de Louvain Place du Levant, 3 B-1348 Louvain-la-Neuve Belgium Phone: +32 10 47 25 41 - Fax: +32 10 47 25 98 Henri MASSIAS (research assistant) UCL Crypto Group Faculté des sciences appliquées Université de Louvain Place du Levant, 3 B-1348 Louvain-la-Neuve Belgium Phone: +32 10 47 81 39 - Fax: +32 10 47 25 98 5. People working for TIMESEC at KUL: Bart Preneel (Coordinator) Katholieke Universiteit Leuven Departement Elektrotechniek-ESAT Onderzoeksgroep COSIC K.Mercierlaan 94 B-3001 Heverlee Belgium Phone: +32 16 32 11 48 - Fax: +32 16 32 19 86 Bart Van Rompay (research assistant) Katholieke Universiteit Leuven Departement Elektrotechniek-ESAT Onderzoeksgroep COSIC K.Mercierlaan 94 B-3001 Heverlee Belgium Phone: +32 16 32 11 34 - Fax: +32 16 32 19 86 Other related web pages • Time Service Department • Digital Notary • Estonian Timestamping Project Cuculus • PGP digital Timestamping Service • PKITS(Public Key Infrastructure with Time Stamping) • Network Time Protocol • Time stamping links (author: Helger Lipmaa) The access statistics of this page may be found here. Goto : UCL | FSA | ELEC | DICE | CRYPTO GROUP Last modified : August 17, 1999 Send any comment to : massias@dice.ucl.ac.be (H.Massias) DESIGN OF A SECURE TIMESTAMPING SERVICE WITH MINIMAL TRUST REQUIREMENT H. Massias, X. Serret Avila, J.-J. Quisquater UCL Crypto group Pla e du Levant, 3 , B-1348 Louvain-la-Neuve, Belgium massias, serret, jjqdi e.u l.a .be This paper presents our design of a timestamping system for the Belgian proje t TIMESEC. We rst introdu e the timestamping method used and we justify our hoi e for it. Then we present the design of our implementation as well as some of the important issues we found and the solutions we gave to them. INTRODUCTION The reation date of digital do uments and the times expressed in them are be oming in reasingly important as digital do uments are being introdu ed into the legal domain. We dene digital timestamp as a digital erti ate intended to assure the existen e of a generi digital do ument at a ertain time. In order to produ e fully trusted timestamps, very spe i designs have been introdu ed. We give an overview of the most relevant methods and we introdu e the one we used for the implementation of the Belgian proje t TIMESEC (see + [PRQ 98℄), justifying our hoi e for it. Then we present the design of the times- tamping system we made for this proje t. We separate the dierent pro esses that are: do ument timestamping, timestamp veri ation, auditing, system start-up and system shutdown. INTRODUCTION OF THE TIMESTAMPING TECHNIQUES There are two families of timestamping te hniques: those that work with a trusted third party and those that are based on the on ept of distributed trust. Te hniques based on a trusted third party rely on the impartiality of the entity that is in harge of issuing the timestamps. Te hniques based on the distributed trust onsist on making do uments dated and signed by a large set of people in order to onvin e the veriers that we ould not have orrupted all of them. The trusted third party te hniques an also be lassied into two dierent kinds: those where the third party is ompletely trusted and those where it is partially trusted. A detailed study of timestamping te hniques an be found in [MQ97℄. We believe that te hniques based on distributed trust are not really workable in a professional environment, that is why we on entrate on the trusted third party approa h. Nevertheless, we imposed to ourselves the requirement to lower the ne essary trust on the third party to the maximum extend. The easy solution, whi h onsists on on atenating the do ument with the urrent time and sign the result, has been dis arded be ause it has two main drawba ks: 1. We must ompletely trust the third party, alled Se ure Timestamp Autho- rity (STA), whi h an issue undete table ba k-dated timestamps. 2. The limited lifetime of ryptographi signatures, whi h an be shorter than the do ument time-to-life. The timestamping method that we have hosen uses a binary tree stru ture and has been des ribed in [HS91℄ and [HS97℄. This method works by rounds. For ea h round a binary tree is onstru ted with the requests lled during it. The rounds have a xed duration, whi h is the result of a trade-o between the timestamps a ura y and the number of requests submitted. In Figure 1 we an see a graphi al representation of a round onstru ted using this method. RH(i-1) RH(i) H18 H14 H58 H12 H34 H56 H78 y1 y2 y3 y4 y5 y6 y7 y8 Figure 1: The binary tree stru ture Ea h of the timestamp requests onsists on a hash value of a given do ument. The leafs of the tree are ea h of those hash values. The leaf values are then on atenated by two and hashed again to obtain the parent value (Ex: H 34 = H (y3 j y4 ) ). The pro ess is repeated for ea h level until a single value is obtained. Finally, the top value of the round tree (H18 ), alled the Round Root Value, is then on atenated with the value obtained for the pre eding round (RHi 1 ) and then hashed again to obtain the a tual Round Value (RHi ). The timestamp of the do ument ontains all the values ne essary to rebuilt the orresponding bran h of the tree. For example, the timestamp for y 4 ontains f( 3 y ; L); (H 12 ; L); (H58 ; R); (RHi 1 ; L)g. The veri ation pro ess onsists of re- building the tree's bran h and the linking hain of Round Values until a trusted (from the verier point of view) Round Value is re omputed. This veri ation method is explained in detail in [HS91℄ and [MQ97℄. Periodi ally, one of the Round Values is published on an unmodiable, widely witnessed media (Ex: newspaper...). These spe ial Round Values, whi h we will all Big Round Values, are the base of the trust for all the timestamps issued. All veriers must trust these Big Round Values as well as the time asso iated with them. This is a reasonable requirement be ause those values are widely witnessed. The absolute time trusted by all the potential veriers is the time indi ated by the unmodiable media. We suppose that this time is the same than the time indi ated by the STA for the Big Round. For ing the lients to he k the timestamps as soon as they get them is another requirement. In that way the pro ess is ontinuously audited and the STA will not have any margin to maneuver in an untrusted way. A very useful method for extending the lifetime of timestamps is des ribed in [BHS92℄. It basi ally onsists on re-timestamping the hash of the do ument as well as the original timestamp before the hash fun tion is broken. We build two trees in parallel for ea h round using two dierent hash fun tions (SHA-1 and RIPEMD-160). In that way, the system remains se ure in the ase of an unexpe ted break of one of the hash fun tions used. DESCRIPTION AND ANALYSIS OF THE TIMESEC TIMESTAMPING IM- PLEMENTATION We will now introdu e the basi design of the system we have developed, whi h is based on the te hnique introdu ed above. Initially, the user designates a do ument to be timestamped. Two hashes of it are reated using the SHA-1 and RIPEMD-160 algorithms. The request ontaining the two hashes is then sent by the lient to the STA . Upon request re eipt, the STA reates the orresponding timestamp using the following pro ess. Main des ription of the timestamping pro ess The system design follows a highly de oupled multi-threaded approa h. Ea h step is assigned to a spe i omponent, whi h has its own dierent thread. In the Figure 2 we present a s hemati outline of the pro ess. The multi-thread approa h is justied by the requirement to obtain a highly responsive and load independent implementation. By isolating the pro ess harges into independent steps we try to de ouple the load between them. Ea h step has also a working queue. Those queues are in harge of softening the speed dieren es between the dierent pro ess steps. Network Listener Request Timer Round Queue Coordinator Timestamp Generator i Logger Round Queue Coordinator Network Answer i-1 Figure 2: Intera tions between the omponents The Network Listener is in harge of ontinuously listen to the lients' timestamp requests. The Request Timer re eives the onstru ted requests from the Network Listener. Then, it times and forwards them to the a tual Round Queue Coordinator. Ea h round has its own Round Queue Coordinator, whi h is in harge of ompiling and pro essing into a tree all the requests belonging to the round. When the round tree has been omputed it is forwarded to the Timestamp Generator, whi h generates the orresponding timestamps. On e a timestamp is generated, the Timestamp Generator forwards it to the Network Answer, whi h in turn forwards it to the lient. The Network Listener The Network Listener responsibility is to listen the network ontinuously for timestamping requests. When it re eives a data stream, the Network Listener he ks it in order to determine if it is a valid request. In the ase it is, it sends an armative onta t response to the lient, it reates a Timestamp Request obje t and adds it to the Request Timer queue. Then it goes ba k to listen to the network. In the ase the request message is not orre t, it sends an error message to the lient. We tried to give as few tasks as possible to the Network Listener to let it listen the network, whi h is its primary task. In order to improve the overall performan e, and to avoid the fa t that a slow lient onne tion ould ae t the other ones, several opies of the Network Listener an be a tive at the same time. The Request Timer There is only an instan e of The Request Timer in the system. The Request Timer is in harge of ordering the requests re eived from the several Network Listeners and timing them a ordingly. All delays introdu ed by the system before that point (namely, those introdu ed by the Network Listener) are in- distinguishable from network delays, and thus not taken into a ount. On e a request has been timed, the Request Timer tries to add it to the urrent round queue. As the rounds are losed asyn hronously by the orresponding Round Queue Coordinator this operation is not always su essful, in that ase, the Re- quest Timer re-times the request and retries to queue it until it nds an open round. In that pro ess the request sequen e is preserved in order to provide a onsistent behavior. Round Queue Coordinator reation: Round Queue Coordinator instan es are reated by the Request Timer upon pro essing a request orresponding to a non-existing round. The reation of the rounds that have no requests is delayed until a request is re eived. On e reated, those empty rounds are immediately pro essed, introdu ing no signi ant delay into the pro ess. Round number determination: Round numbers form a non-interrupted in- reasing integer sequen e. Rounds are always in syn hronization with the round duration intervals. In other words, if the round duration is one minute, all rounds will start in an absolute minute boundary, independently from when the system has been started. Big Rounds are determined by the Request Timer using a similar approa h to the one followed to determine the round boundaries. We do not restri t the duration of the round to a xed value for the lifetime of the STA. To a hieve this, the information about round and Big Round duration is intro- du ed into the system at the start-up phase. If we wish to modify it, we must rst shutdown the system, hange the values and then restart the system, whi h is the only safe pro edure we had foreseen. The Round Queue Coordinator The rst thing a Round Queue Coordinator does is to determine the oset between the a tual time and the round due time. Requests will be a epted only if the round is still valid (round is open). When requested by the Request Timer, the Round Queue Coordinator adds the request to the queue and logs it. This logged request will be latter used for pro ess auditing purposes. When the round time is over, it obtains the Round Values from the pre ed- ing round and it omputes the round binary trees (one for ea h hash algorithm) to obtain the orresponding Round Values. Then it gives the omputed trees to the Timestamp Generator and nally adds to the log the Round Values and the Round Root Values. Those logged values will be latter used for timestamp veri ation and pro ess auditing purposes. If the a tual round is a Big Round those values are forwarded to a xed media as well. As you may have noti ed in the se tion Introdu tion of the timestamping te hniques, the binary tree is dened for a number of leafs (requests) that is a power of 2. In general, this is not the ase. We ould reate fake requests to nish n the tree, but this will add a lot of requests (if we have 2 + 1 requests, then we will n need to add 2 1 fake requests). A smarter solution is to add a random value only when we need it. Then, we add at most n values (one for ea h level of the tree). We all these nodes Spe ial Node, whi h will be logged as well. Instead of random values we ould hoose to use 0 or another xed value, this would be as se ure as our hoi e if the hash fun tions were perfe t. As hash fun tions are only presumably perfe t, we though that we ould made our design more se ure with really few additional omputations. In our implementation, the STA queues the requests and omputes the tree at the end of the round. At rst sight, it ould seem a more natural solution to build the tree as soon as the requests arrive. At the end of the round, the omputation of the tree would then be ended by getting the last Round Value and omputing the a tual Round Value. In fa t, this solution is harder to implement, and has no ee t on the se urity a hieved as no one an he k that the STA does not perform any reordering of the requests before it publishes the Round Value. The Timestamp Generator The Timestamp Generator pro esses the round trees by pairs (one for ea h hash algorithm) in order to generate the timestamps for ea h of the requests ontained in the trees. In order to maximize the system responsiveness, on e a timestamp has been generated it is immediately forwarded to the Network Answer. Finally, when all the timestamps ontained in a round tree have been pro essed the tree is destroyed. The Network Answer The Network Answer is in harge of forwarding the pro essed timestamps to the lients. It has been spe ied in su h a way that it an run several threads, in that way the rest of the timestamping pro ess an be isolated from possible network delay problemati . The timestamp veri ation pro ess First, the verier designates a do ument and its orresponding timestamp for veri ation. Then, the verier's system (his personal omputer or a remote om- puter independent from the STA) generates the two do ument hashes and he ks if they mat h with those ontained in the timestamp. Afterwards, the Round Value is re onstru ted using the data provided in the timestamp. If the om- puted Round Value is onsistent with the one ontained in the timestamp then the next step in the veri ation pro ess is to ompare this Round Value to the Round Value obtained from the STA repository. Finally, the verier provides his system with the two Big Round Values that he founds in the unmodiable me- dia; the verier's system gets all the ne essary Round Values and Root Round Values from the STA and it he ks the oheren y of the two linking hains (one for ea h hash fun tion). The audit pro ess The auditor designates two Big Rounds, whi h he fet hes from a xed media. The system behavior will be he ked between these two Big Round Values. For ea h round, the auditor's system gets all the hash values (leafs of the tree and Spe ial Nodes) and the Round Value from the STA. Then, it onstru ts the two trees and he ks that the Round Value is onsistent. These two steps are repeated until all the onsidered rounds are he ked or until an error has been found. In that way, all theoreti ally veriable system behavior an be veried a posteriori. The system start-up pro ess Here the most sensible issue is to be able to orre tly start-up the system when an unexpe ted shutdown has o urred. If that is the ase, the log will show an unnished round; then the system marks all entries after the last omplete round as invalid and publishes that round as a Big Round. If the log was onsistent, it a esses the last valid Round Value in the log and publishes it as a Big Round. This pro ess insures a fully veriable behavior; we are able to dete t non fully-pro essed requests. The system shutdown pro ess The administrator signals the system to shutdown. No more timestamping re- quests are a epted. The system waits until the urrent round is nished and this Round Value is published as Big Round. REFERENCES [BHS92℄ D. Bayer, S. Haber, and W.-S. Stornetta. Improving the e ien y and reliability of digital timestamping. In Springer Verlag, editor, Sequen es'91: Methods in Communi ation, Se urity, and Computer S ien e, pages 329334, 1992. [HS91℄ S. Haber and W.-S. Stornetta. How to timestamp a digital do ument. Journal of Cryptology, 3(2):99112, 1991. [HS97℄ Pro- S. Haber and W.S. Stornetta. Se ure names for bit-strings. In eedings of the 4th ACM Conferen e on Computer and Communi ation Se urity, pages 2835. ACM Press, April 1997. [MQ97℄ H. Massias and J.-J. Quisquater. Time and ryptography. Te hni al report, TIMESEC Proje t (Federal Governement Proje t, Belgium), 1997. Available at http://www.di e.u l.a .be/ rypto/TIMESEC.html. + [PRQ 98℄ B. Preneel, B. Van Rompay, J.-J. Quiquater, H. Massias, and X. Serret Avila. Design of a timestamping system. Te hni al report, TIMESEC Proje t (Federal Governement Proje t, Belgium), 1998. To be avail- able at http://www.di e.u l.a .be/ rypto/TIMESEC.html. TIMESEC Digital Timestamping and the Evaluation of Security Primitives Design of a timestamping system B. Preneel, B. Van Rompay Katholieke Universiteit Leuven J.-J. Quisquater, H. Massias, J. Serret Avila Universite Catholique de Louvain WP3, Technical Report CONTENTS Contents 1 The time reference 3 1.1 The Network Time Protocol (NTP) . . . . . . . . . . . . . . . . . . 3 1.2 The type of time used . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 The BELNET's NTP service . . . . . . . . . . . . . . . . . . . . . . 4 1.4 The security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 The common part of the protocols 6 2.1 The client side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 The server side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 The veri er side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.4 Computer failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 Tree method 8 3.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 The process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 The security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4 The renewing process . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 Accumulators 13 4.1 The problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 One-wayness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.3 Quasi-commutativity . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.4 In uence of the properties on the proof of membership . . . . . . . . 14 4.5 The proposed accumulator . . . . . . . . . . . . . . . . . . . . . . . . 14 4.6 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.7 Nyberg's accumulators . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5 Binary Linking Schemes 16 6 The method of signature 18 7 Overview 19 1 CONTENTS Introduction We expose here the complete design of a digital timestamping system according to the previous work ([MQ97, PRQM97]). As it was mentioned in the description of the project an authority will provide timestamps. We have chosen technics which lower the trust needed in this authority that we will call STA1 . The amount of work necessary to verify timestamps will be proportional to the trust we have in the STA. The underlying assumptions for time-stamping are the followings: 1. to establish that a document was created after a given moment in time, it is necessary to report events which could not have been predicted before they happened; 2. to establish that a document was created before a given moment in time, it is necessary to cause an event based on the document, which can be witnessed by others. First we will clarify which service the STA will exactly provide and what is the meaning of the timestamps it will issue. We de ne which time reference we have chosen and how we keep an \accurate" time. Then we will expose the general behavior of the di erent parties: the client, the STA and the veri er. This part is common to the two technics that we will present. We have chosen to implement two di erent technics for two reasons: rstly because one of the technique is patented and secondly to be able to compare the implementation of these two methods. The rst method which is the one patented, is the tree method. This method is already in use and commercialised by its inventors S. Haber and W.-S. Stornetta. The company selling this service is Surety Technics. The second method uses an object called accumulators. It has been introduce by J. Benaloh and M. De Mare. The drawback is that it is slower because it uses modular exponentiations instead of hash functions. The advantage is that the time certi cates are smaller when the amount of requests is big enough. These two methods are separate and, as well, the implementation will also be separate. Only one method at a time is necessary to provide a reliable timestamping service. We will also brie y present a recent timestamping technique which could be interesting for a future version of our STA. We will use an ISO standards for the STA's signatures. 1 Secure Time Authority 2 1 THE TIME REFERENCE 1 The time reference To be useful, the STA must have a time which will be recognized by everybody who will use it. All the clients and veri ers must have a common reference. For them the absolute reference will be the STA. The veri er will be able to compare two documents that have been timestamped at di erent rounds. If we trust the STA, it will be possible to compare two documents which have been timestamped with the tree technic (3) during the same round; but it will not be possible to achieve that with the accumulator technic. For the tree technique the relative position of two timestamps issued during the same round can be easely determined by there position in the tree, if the STA is building it respecting the original request receiving order. It will be nearly impossible to compare two timestamps issued by two di erent STA even if they are using the same technic. To achieve that, it is necessary to de ne comparison rules between the two STA's, but we do not think that it is possible to de ne general rules that matches strong security requirements. Nervertheless, to make easier the task of de ning rules to compare timestamps issued by di erent STA, we will use the NTP protocol which permits the synchronization of the computers internal clocks. Belnet provides the NTP service. 1.1 The Network Time Protocol (NTP) NTP enables computers connected to the Internet to know with a mesurable ac- curacy what time it is (see [Ser]). The time service is o ered on the Internet by workstations and routers covering the whole world. Thanks to the special NTP software and a link established with a radio receiver and/or an atomic clock, these machines can keep track of time within an accuracy of a few picoseconds. Radio re- ceivers pick up the time reference via GPS ("Global Positioning System") satellites or approved transmission stations. The NTP software then reads the time value of the atomic clock or the receiver and distributes it on the Internet by means of the NTP protocol. These machines are called "stratum-1 servers". BELNET o ers aliated institutions an NTP service with an accuracy of about 100 milliseconds. Within institutions, therefore, the local time service can use this service to indicate the exact time to all connected machines. 1.2 The type of time used The times of astronomical and weather phenomena and events that are observed internationally are often given in \Universal Time" (abbreviated UT) or \Greenwich Mean Time" (abbreviated GMT). The two terms are often used synonymously to refer to time kept on the Greenwich meridian (longitude 0). However, in normal civil usage, UT or GMT refers to a time scale called \Uni- versal Time Coordinated" (abbreviated UTC), which is the basis for the worldwide system of civil time. The UTC time is kept by a large number of highly precise atomic clocks at facilities around the world, and there is international coordina- tion in maintaining UTC to better than a nanosecond (billionth of second) per day. The length of a UTC second is de ned in terms of a count of radiation cycles of a 3 1 THE TIME REFERENCE certain atomic transition of the element cesium, and is not directly related to any astronomical phenomena. 1.3 The BELNET's NTP service BELNET's NTP service works as follows. The BELNET routers-concentrators lo- cated in Brussels and Louvain regularly request the exact time from several stratum- 1 servers. At present, this synchronization operates with three NTP servers in West- ern Europe. These two routers then communicate this time reference to the other BELNET routers-concentrators in Antwerp, Mons, Ghent, Louvain, Liege and Louvain-la- Neuve. In this way, a hierarchy of NTP servers is created in which the stratum number increases as one moves down a level. The Louvain and Brussels routers-concentrators thus correspond to "stratum" 2, while the other routers-concentrators downstream are at stratum 3. Operating through their NTP server, the institutions connected to BELNET can obtain, if they wish, a time reference from the BELNET stratum-3 servers. There exist three Internet Time Protocols of the same kind 1. The Time Protocol (RFC 868) provides a simple way for a system to poll for the current time from a time server. 2. The Network Time Protocol (NTP version 3, RFC 1305), is a much more sophisticated protocol which allows a system to continuously synchronize its clock against multiple time servers (to protect against transiently misbehaving servers), with adjustment for network latency and clock drift. It is targeted at synchronizing machines with each other and to a common reference, the Universal Time, Coordinated through the Internet. 3. The Simple Network Time Protocol or SNTP (RFC 1361), is a simpli ed RFC 1305 implementation for clients. This allows a client to take advantage of some of the features of an RFC1305 service without a full RFC1305 implementation. BELNET enables synchronization with its 7 CISCO 7000 routers and its work- station time.belnet.be: The rst three are peering at Stratum-2 (brussels.belnet.be, leuven.belnet.be and time.belnet.be) and ve others at Stratum-3 (lln.belnet.be, liege.belnet.be, antwer- pen.belnet.be, mons.belnet.be, gent.belnet.be). Stratum-2 servers are peering with each other and get their time from Stratum-1 servers which in turn are connected to a radio or atomic clock. A typical NTP con guration for the xntpd server in a BELNET institution involves three or more local NTP servers, peering with each other and getting their time from the ve BELNET Stratum-3 servers. Other machines inside the institution align their clocks on these 3 servers with NTP clients. 4 1 THE TIME REFERENCE Hostname layer Protocol brussels.belnet.be Stratum-2 RFC1305 leuven.belnet.be Stratum-2 RFC1305 time.belnet.be Stratum-2 RFC1305 lln.belnet.be Stratum-3 RFC1305 antwerpen.belnet.be Stratum-3 RFC1305 mons.belnet.be Stratum-3 RFC1305 gent.belnet.be Stratum-3 RFC1305 liege.belnet.be Stratum-3 RFC1305 Table 1: NTP servers 1.4 The security We assume that the Stratum servers have the accurate time. Mainly ve types of attacks on a time service are possible. An attacker could cause a non-time server to impersonate a time server (masquerade ), an attacker could modify some or all time messages sent by a time server (modi cation ), an attacker could resend a time server's time messages (replay ), an attacker could intercept a time server's time messages and delete them (denial of service ), and an attacker could delay the time messages by, for example, deliberately ooding the network, thereby introducing large transmission delays (delay ) (see [Bis90]). In NTP version 3, countermeasures against these attacks must have been taken. The version of NTP actually in use is 3. NTP Version 3 authentication scheme uses one-way hash functions and private keys, which must be con gured in advance. The NTP Version 4 authentication scheme uses public-key crypto-system and certi- ed public values to avoid need for key predistribution or pairwise agreement. 5 2 THE COMMON PART OF THE PROTOCOLS 2 The common part of the protocols We consider the Client-Server situation. The general form of the scheme will be the same for each solution we will propose. The di erences will be in the de nition of the messages between the client and the server as well as the method used by the server to timestamp the request. The methods developed must permit to everybody to check that the server is honest. 2.1 The client side The user has a software at his side for helping him doing a few tasks. The client chooses the document he wants to timestamp. This document can be every thing he wants: a concatenation of text les, a sound le, an image, a video, etc... The software creates then a temporary data stream which consists on the hash value of the document with SHA-1 followed by the hash value of the same document with RIPEMD-160 (see [PRQM97, section 6]). By making this mandatory, we are sure that the requests are \short" and we avoid the question of examining the contains (privacy). The output (request) is send to the STA which proceeds it and sends a time certi cate as a response (see 2.2). The client must then check the validity of the certi cate he received as well as if he agrees on the time put by the STA. If he does not agree, he must contact the STA and they should nd a solution. If the client does not contest the timestamp at this moment he would not be able to do it in the future. The certi cate will be signed by the STA for authenti cation purposes. So the client will have to give the identity of the STA with the certi cate to any potential veri er. The main purpose of this signature is the authentication of the STA in front of the client (see [MQ97]). If the client has enough trust on the STA, he can use the signature and avoid the veri cation of the certi cate consistence. 2.2 The server side First of all, the server will not examine (check) the identity of the requester. We will also not examine the problem of checking if the client has the right for using this service (i.e. if he has paid for). The server will proceed by rounds. All the rounds will have the same duration (any reasonable time slot up to 1 second) that will be xed in advance. He will start to proceed the requests as soon as he receives them. He will issue a value for each round which is also linked to the value for the previous round. By conception, it is necessary for the STA to wait the end of the round to be able to issue any of the timestamps for the documents belonging to this round. The maximum response time of the STA and the duration time of the rounds will be de ned at the implementation. We will allow the STA to have some delay in issuing the timestamps, but he absolutely must timestamp the document in the round corresponding to the time slot covering the time arrival of the request from the client. The value for each round will be stored by the STA. It can also be stored by a third party and available on-line for the veri cation step. In order to improve the security and low the trust needed in the STA, we publish some round values in some unmodi able media (for example: CDROM, newspaper, ...) to be able to 6 2 THE COMMON PART OF THE PROTOCOLS completely rely on it. The STA will put all the values for the same day together and sign the result to limit the number of signature checks for the veri er. This signatures will be published online. For the current day, the signed round values will also be published on an online server. These publications on an online server will be done using a standard protocol (ftp, http, NFS, ...) to allow veri cation of certi cate issued at the current day. The identity of the STA must be given with the certi cate, because without it, the certi cate has no value anymore. The veri er must know at which online server he will obtain the value necessary to check the integrity of the STA. 2.3 The veri er side We suppose that the veri er is able to securely check the signature of the STA (i.e. he knows his public key). When the veri er will have to check the validity of a timestamp issued by the STA, he will check the certi cate. Then if it is valid, he will contact the online service to obtain the value for the round corresponding to the time the certi cate has been issued and compare it to the one included in the certi cate. If he doubt that the STA is really honest, he can check the value for the round at a third party or ask for all the round values in the corresponding interval between two values published and check that the linking is valid. 2.4 Computer failures The STA will store the \vital" values at the repository as we will explain in 3. For a full implementation, it is necessary to protect the server from failures. We propose to use clusters and backups to achieve that. The purpose is to eliminate any single point of failure. This method is well known and widely use in much sensitive applications, so we will not detailed it and not implement it in the demonstrator because it is a bit outside the goals of TIMESEC and requires a strong computer infrastructure to be ecient. 7 3 TREE METHOD 3 Tree method This method of time-stamping has been developed by S. Haber and W. S. Stor- netta ([BHS93]). A more detailed explanation and a new application is given in [HS97]. An implementation of this method is in use at Surety Technologies (see: http://www.surety.com). It has been analyzed in [MQ97]. 3.1 Method The principal tool used in this digital time-stamping scheme is that of a one-way hash function. We will now explain what the server will do when he processes the requests during one round. The STA builds simultaneously two binary trees as he receives the requests. One containing the hash value of the document using SHA-1 and the other with the hash value made using RIPEMD-160. For these trees, we will use the part of the request containing the hash made using the corresponding hash function. Because it has no sense to build the two trees using the concatenate of the two hash values of the client document because if one of these hash function is broken, the corresponding value and the corresponding tree are obsolete. So we group together the material using the same hash function. Let now see in details the building of the binary tree using one of the one-way hash functions which we wil call H . The procedure is the same for the other hash function. We call yij the hash values that are send during the round i, j represents the request ordinal during the round i. The leafs of the tree are the hash values included in the request. The value are concatenated by two and then hashed to give the parent value. If one stage has an odd number of values, then the last value is kept and we will proceed it at the next stage (in Figure 1, Hi;14 = yi7 ). Let see an example with 7 requests ( gure 1). HVi Hi;21 Hi;22 Hi;11 Hi;12 Hi;13 Hi;14 yi1 yi2 yi3 yi4 yi5 yi6 yi7 Figure 1: The binary tree structure 8 3 TREE METHOD Then the root value (HVi ) will be concatenated with the previous round value (SHVi 1 ) to obtain the current round value (see Figure 2). time ti time ti +1 SHVi 1 SHVi SHVi +1 HVi HVi +1 Figure 2: Calculation of round values The values SHVi are stored by the STA. The STA will sign them and put on the online server. We assume that only the STA can write or modify values on this server. The values are signed to prevent attacks during the communication from the client or veri er to the online server. For the demonstrator, the round values will simply be signed and available online. But for a really trusted version of the timestamping service, at least one round value must be widely published as explained before (2.2) for each day. The purpose of this is to enable the veri er to have a value which the STA can not have modi ed after generation. This value must be widely witnessed to make it infeasible to change. 3.2 The process We will explain the process which is graphically illustrated in gure 3. 1. h is SHA-1 and h0 is RIPEMD-160. The client sends the request (yihj ; yihj ) to 0 the STA, where yihj = h(yij ). 2. The STA computes the tree and the values for the round as explained in 3.1. 3. The STA signs and stores the values HVi ; SHVi (corresponding to h) and HVi0; SHVi0 (corresponding to h0 ) for the round binded with the number i and the time ti of the round. 4. The STA publishes the signed values HVi ; SHVi and HVi0 ; SHVi0 together with its binded information for the round on the online site. 5. The STA sends the certi cate C to the client. In our example, if the request of the client is number 4 in the round, the certi cate is C = S (i; ti ; yih4 ; SHVi ; ((yih3 ; l); (hi;11 ; l); (hi;22 ; r)); SHVi 1 ; yih4 ; SHVi0 ; ((yih3 ; l); (h0i;11 ; l); (h0i;22 ; r)); SHVi0 1 ) 0 0 9 3 TREE METHOD 2 4 3 Server FTP Server Repository 1 11 10 5 8 Verifier Client 7 13 9 12 6 Figure 3: The process where S is the signature provided by the STA, ti is the time of the beginning of round i. This means that the document has been submitted between ti and ti+1 . The values yih4 and yih4 are not necessary in the certi cate because they 0 can be obtained from the document which is certi ed but it give redundancy that will be useful for the implementation. 6. The client checks his certi cate. First he checks the signature, then rebuilds the two trees, compute the round values SHVi and SHVi0 and compare it to the values contained in the certi cate. Then he can ask the online server to verify the round values included in the certi cate. 7. The client claims to the veri er that he has made this document at the time corresponding to the round i. The veri er asks the client for the certi cate of the document. 8. The client sends the requested certi cate to the the veri er as well as the identity of the STA. 9. The veri er makes the veri cation in the same way as the client in 6. 10. Then the veri er asks the online server for the values of the round i: ti ; SHVi ; SHVi0 and all the values necessary to rebuilt the chain between two values published which contain the round i. 11. The online server sends the round values SHV; SHV 0 and the values HV; HV 0 necessary to rebuild a chain that will at least begin and end with witnessed 10 3 TREE METHOD values. 12. The veri er checks that the values for the round i matches with the one in the certi cate, and he rebuilds the chain to verify the integrity of the STA. 13. At last, the veri er sends the result of the veri cation to the client . The veri er should have the choice of checking only the certi cate for one hash function. We propose that to improve speed and because it is only necessary to check the part of the certi cate using one hash function when the other gets compromised. 3.3 The security Most of the security aspects has been studied in [MQ97]. We are using in parallel two hash functions because the security relies on the robustness of the hash functions. If a hash function is broken, anybody is able to build a tree with values that he has chosen and with a root value equal to an existing root value. So, in the hypothesis that a hash function has been broken, anybody is able to generate a valid certi cate for a value that has not been issued at the time of the timestamp. Nevertheless the attacker needs the collaboration of the STA to have a signature of this certi cate. Another variant of this attack, which is simpler to implement is that the attacker is able to nd another document with the same hash value. So, the certi cate for the rst document is also valid for the second one. If we had not made mandatory the fact for the client to use SHA-1 and RIPEMD-160, a dishonest user could have use a weak hash function and then nd in the future collisions as he wants. To make the job of the veri er easier (he do not have to check the robustness of the hash function) and to limit the level of his competence we impose the use of the hash functions that we know to be secure. If one hash function is broken, all the evidence using this hash function are obsolete, so as in the Surety technique, it is more secure to use two hash functions in parallel in order to have the time to replace a broken one in case we could not have predict that before. Another aspect of the security is the con dentiality of the secret key of the STA. If the signature key of the STA is compromised, then the veri er can't trust anymore the signature of the certi cate, but he can always check the secure consistency of the certi cate as we have explained earlier. In case of the breaking of a hash function, the use of another hash function must be de ned. To maintain the validity of the certi cates, they must be retimestamp with the new hash functions before the two initial hash functions used are broken. In case the signature key of the STA is compromised or has expired, a new key must be generated, but nothing else must be done from the timestamping process point of view. 3.4 The renewing process When one hash function is compromised, all the time certi cates must be renewed before the other hash function is broken too. To achieve that, it is necessary to 11 3 TREE METHOD retimestamp not only the document submitted at the original time but also the old certi cate. In this way, we will be able to prove that the document has rst been timestamp at the date indicated in the old certi cate and that at this time the hash functions used were not broken. We must also put a new hash of this document because otherways an attacker could use the certi cate for a document which has the same hash values. To summarize, for renewing a timestamp, the client will submit to the software a document containing the initial document and the old certi cate. The request received by the STA will be a hash of this concatenation which will be processed in the habitual way but using the new hash functions. 12 4 ACCUMULATORS 4 Accumulators An alternative method of timestamping was proposed by J. Benaloh and M. de Mare [BdM91]. A primitive, called one-way accumulator, processes the requests (hash values) which are sent during one round and computes a root value (as in the tree technique). The use of a suitable accumulator allows to minimize the storage re- quirement (size of the certi cates). In their more recent article [BdM94] they de ned a one-way accumulator which has the quasi-commutative property. It is a kind of hash function that can be used to hash several messages whose processing order is irrelevant. The veri cation procedure for the timestamping service is based on a proof of membership of a particular message during a round. The relative position of requests of the same round cannot be determined. 4.1 The problem The input is a list of hash values (computed from the requests by the conventional hash functions SHA-1 and RIPEMD-160, as in the tree method) sent to the STA during one round: yi ; 1 i m. A one-way accumulator h is used to compute an   output value zm whose size is comparable to the size of one input value. The protocol to treat the input values yi is the following: zi = h(zi 1 ; yi ); 1 i m with z0 = IV (initial value):   The nal result is zm = h(h( h(z0 ; y1 ); ); ym ).   To prove that a request belongs to a certain round you must be able to verify that the corresponding hash value y yi ; 1 i m . 2 f   g 4.2 One-wayness The one-way property of an accumulator implies that:  given a pair (zi 1 ; yi ), the computation of h(zi 1 ; yi ) must be `easy'.  given a pair (zi 1 ; yi ) and y0 = yi , it must be `dicult' to nd z 0 = zi 1 such 6 6 that h(zi 1 ; yi ) = h(z 0 ; y0 ). 4.3 Quasi-commutativity A one-way accumulator h is said to be quasi-commutative if for all zi 1 and for all yi; yi+1 , h(h(zi 1 ; yi ); yi+1 ) = h(h(zi 1 ; yi+1 ); yi ): This property ensures that if one starts with an initial value IV , and a set of values y1 ; y2 ; :::; ym , then the accumulated hash would be unchanged if the order of the yi were permuted. 13 4 ACCUMULATORS 4.4 In uence of the properties on the proof of membership The one-way property ensures that no false membership proofs can be made. To prove that yj belongs to the set yi ; 1 i m , we must give c = zj 1 , f   g f yi; j i m (we call that the certi cate for yj ) and recompute zm.   g So we only need to save zj 1 and yi for j i m (rather than saving all yi ).   However, for most yj , this will result in only a small constant factor improvement in the storage requirements. The amount of storage is linear with respect to the number of requests m. But for a quasi-commutative accumulator the processing order of the yi is ir- relevant and the certi cate is only c = z; yj with z the accumulated hash using f g y1 ; :::; yj 1 ; yj +1 ; :::; ym . Hence the amount of storage is constant with respect to m. 4.5 The proposed accumulator The function proposed by Benaloh and de Mare is the modular exponentation: en (z; y) = zy modn. The output value associated with the input yi ; 1 i m   is: Qm zm = en (en ( en(en (en (z0 ; y1 ); y2 ); y3 ); ); ym ) = z0 i=1 yi mod n:   The one-way property of this function is based on the diculty of nding modular roots. The function is clearly quasi-commutative: (z0y1 )y2 modn = (z0y2 )y1 modn. The certi cate necessary to prove the membership of a given yj to the set yi ; 1 f  i m is  g m Q yi i=1 i=j mod n: c = z0 6 The veri cation phase consists of computing cyj mod n which must be equal to zm . We can remark that we don't verify that the certi cate c is a power of z0 because we have no means for doing that. This can be inconvenient in applications such as timestamping ([BdM94], [Jus97]). 4.6 Security If an attacker wants to nd a false certi cate for y0 62 f yi ; i = 1;  m , he has to g search z 0 such that z 0 y zm (mod n), 0    Y or search Y 0 such that z0y 0 zm (mod n). 0   Solving the rst situation is equivalent to breaking the RSA assumption. The second situation is equivalent to the discrete logarithm problem. Benaloh and de Mare propose to use a modulus n = pq with p and q prime numbers of the form 2r + 1 where r is also a prime number. This is called a rigid integer. For a closer study of the security of accumulators see [MQ98]. We must notice that if someone knows the factorisation of n, he is able to generate a certi cate for any documents he wants and for the time he chooses. The STA himself should not know this factorisation or he will be able to issue back-dated timestamps. 14 4 ACCUMULATORS 4.7 Nyberg's accumulators An alternative one-way accumulator, which has no trapdoor and doesn't have to be provided by a trusted third party, was proposed by K. Nyberg [Nyb96]. The drawback is that, to prevent forgery, an output length of about 2.8 Megabits is required. Nyberg proposes to hash with a conventional hash function and use the result as a seed for a pseudo-random number generator which can give an output of the desired length. 15 5 BINARY LINKING SCHEMES 5 Binary Linking Schemes Recently a new method for timestamping has been introduced ([BLLV]). This tech- nique is also based on rounds and hash functions. The main guideline is also to be able to check the work of the STA to allow having limited trust on it. The main advantage of this method is that we need less values to verify a timestamp. In the techniqueswe have described, we need all the round values between two published to verify a timestamp. The work on round values is as costly for the generation as for the veri cation, it is proportional to the number of values between two published. With this new technique it is only proportional to the logarithm of the number of values. A drawback is that we need a same xed number of requests during each round (we can easely override this drawback by self generating requests for exam- ple). For us it may not be a problem if we just use this technique for the root values obtained using one of the preceding methods. We can consider two levels of rounds: one like we have described (root values) and the other that we call meta-round which proceed with this root values and is limited by two consecutive published values. We will now give an overview of this method with an example. The number of requests during a round is 15 in our example. So value 0 and value 15 will be published: we suppose that nobody is able to change it and everybody can access it securely and accurately. H is a hash function and yi is a request. Let li = H (yi; li 1 ; lf (i) ) where f is a function which enable to have smaller timestamp. i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 f (i) 0 1 0 3 4 3 0 7 8 7 10 11 10 7 0 Table 2: The function f 15 On the verifying chain 7 14 Other links used for verification 3 10 6 13 Not used for verification 0 1 2 4 5 8 9 11 12 Figure 4: The timestamp of y4 The certi cate for the request y4 (see gure 4) is : tail(4) := (y15 ; l0 ; y14 ; l13 ; y7 ; l0 ; y6 ; l3 ; y5 ; l4 ) head(4) := (y4 ; l3 ; y3 ; l2 ) It is easy to check that this certi cate enables to reconstruct the smallest chain between the two round values: tail(4) from 15 to 4 and head(4) from 4 to 0. 16 5 BINARY LINKING SCHEMES We choose not to implement this technique in our present system because it is to new and it has not been enough studied. But it can be an open issue for the improvement of our system in the future. 17 6 THE METHOD OF SIGNATURE 6 The method of signature According to the work done on signature scheme ([PRQM97]), we will use the in- ternational standard ISO/IEC 9796 part2. We could not use part 1 because the certi cate that will be signed are too big. 18 7 OVERVIEW 7 Overview We have presented a design of a timestamping system which matches the require- ments of the project TIMESEC. The originality of this work is all what has been done on top of the timestamping algorithms (tree technique and accumulator tech- nic). Our main goal was to be able to put the minimum possible trust on the third party providing the timestamping service. To achieve that we have chosen times- tamping technics which allows anyone to check the work done by the STA. Another requirement was that the service should be as easy to use as possible without loss of security. For that, we have detailed the required behavior of the user by splitting the category of user in two parts: the client who ask for a time certi cate and the veri er who will check the correctness of the certi cate to be convinced by it. We also tried to reuse as much as possible of the existing Internet technology and infrastructure. The system works by rounds, so the reliable accuracy of the timestamp is the length of a round. The most suitable use of the timestamping service is to be able to compare two documents in terms of issuing time (i.e. submission to the STA). With the tree technique it is also possible to compare two timestamps issued during the same round, but only under the condition that we trust the STA to process the requests in the same order of their arrival. Each round value depends on the preceding round values as well as on the requests that have been submitted during this round. At a xed time laps that will be chosen for the implementation, a round value will be published on an unmodi able media (i.e. every body can consult this value but nobody, even the STA, can change it). The security of our system ultimately rely on hash functions, so we use two hash functions in parallel to prevent the failure of one. The time certi cates have a predetermined nite lifetime (the time after which the two hash functions will be broken), but it is possible to extend this lifetime by retimestamping the existing timestamp. All the requests will only contain hash values, so the documents that will be timestamped will never be known by the STA and their \secrecy" will not be exposed to possible transmissions issues. We have de ned the signi cance of the timestamps provided by our STA and how to generate them. We have been enough general to cover several timestamping needs: for notarial acts, medicine use, stock exchange ... We have also given indication for future possible improvements. Finally our job can also be useful for lawyers to de ne the status of electronic timestamp in the law, because for the moment, as far as we know electronic timestamps have no legal signi cation. 19 REFERENCES References [BdM91] J. Benaloh and M. de Mare. Ecient broadcast time-stamping. Tech- nical Report TR 91-1, Clarkson University Department of Mathematics and Computer Science, August 1991. [BdM94] J. Benaloh and M de Mare. One-way accumulators: A decentralised alternative to digital signatures. In Advances in Cryptology - Proceedings of Eurocrypt'93, number 765, pages 274{285. Springer-Verlag, 1994. [BHS93] D. Bayer, S. Haber, and W.S. Stornetta. Improving the eciency and reliability of digital time-stamping. In R.M. Capocelli, A. De Santis, and U. Vaccaro, editors, Sequences II: Methods in Communication, Security and Computer Science, pages 329{334. Springer Verlag, New York, 1993. [Bis90] M. Bishop. A security analysis of the ntp protocol. available at http://www.belnet.be/services/ntp/ntp1.html, 1990. [BLLV] A. Buldas, P. Laud, H. Lipmaa, and J. Villemson. Time-stamping with Binary Linking Schemes. In Advances in Cryptology - Proceedings of Crypto'98. accepted at Crypto'98. [HS97] S. Haber and W.S. Stornetta. Secure names for bit-strings. In Conference Proceedings CS 97, Zurich, Switzerland, pages 28{35. ACM, 1997. [Jus97] M. Just. Some timestamping protocol failures. Technical Report TR-97- 16, Carleton University, Canada, School of Computer Science, August 1997. [MQ97] H. Massias and J.-J. Quisquater. Time and cryptography. Technical re- port, TIMESEC Project (Federal Governement Project, Belgium), 1997. available at http://www.dice.ucl.ac.be/crypto/TIMESEC.html. [MQ98] H. Massias and J.-J. Quisquater. A survey of accumulators. Technical report, UCL Crypto group, University of Louvain-la-neuve, 1998. To appear. [Nyb96] K. Nyberg. Fast accumulated hashing. In Third Fast Software Encryp- tion Workshop, volume LNCS 1039, pages 83{88. Springer-Verlag, 1996. [PRQM97] B. Preneel, B. Van Rompay, J.-J. Quiquater, and H. Massias. Evalua- tion methodology for security primitives. Technical report, TIMESEC Project (Federal Governement Project, Belgium), 1997. available at http://www.dice.ucl.ac.be/crypto/TIMESEC.html. [Ser] BELNET Services. The network time protocol (ntp). available at http://www.belnet.be/services/ntp/ntp.html. 20 TIMESEC Digital Timestamping and the Evaluation of Security Primitives http://www.dice.ucl.ac.be/crypto/TIMESEC/TIMESEC.html Specification and implementation of a timestamping system J.-J. Quisquater, H. Massias, J. Serret Avila Université Catholique de Louvain B. Preneel, B. Van Rompay Katholieke Universiteit Leuven December 1999 Technical Report CONTENTS CONTENTS Contents 1 Introduction 4 2 Reminder of the previous work 5 3 Accumulation using a binary tree. 7 4 Accumulation using a one-way accumulator 8 5 A timestamping system based on the tree technique 9 6 Overview of the global system 10 6.1 The actors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6.2 The use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6.2.1 Use Case 1: “Document timestamp” . . . . . . . . . . . . . . . . . . . . . 10 6.2.2 Use Case 2: “Timestamp check” . . . . . . . . . . . . . . . . . . . . . . . 12 6.2.3 Use Case 3: “System audit” . . . . . . . . . . . . . . . . . . . . . . . . . 14 6.2.4 Use Case 4: “System start-up” . . . . . . . . . . . . . . . . . . . . . . . . 17 6.2.5 Use Case 5: “System shut-down” . . . . . . . . . . . . . . . . . . . . . . 17 7 Description of the different processes 20 7.1 The timestamping process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.1.1 The “Network Listener” . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 7.1.2 The “Request Timer” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.1.3 The “Round Queue Coordinator” . . . . . . . . . . . . . . . . . . . . . . 23 7.1.4 The Timestamp Generator . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.1.5 The Network Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.1.6 The Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2 The timestamp verification process . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.3 The audit process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.4 The system start-up process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.5 The system shutdown process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8 Description of the different classes 31 9 Algorithms 33 9.1 Construction of the round tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.2 Generation of the timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 10 A timestamping system based on the accumulator technique 34 11 Overview of the global system 35 12 The timestamp generation process 36 12.1 Use of a hash function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 12.2 Submitting a request to the STA . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 12.3 Collecting the requests for a round . . . . . . . . . . . . . . . . . . . . . . . . . . 37 12.4 Round accumulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 12.5 Sending back the timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 1 CONTENTS CONTENTS 12.6 Updating the archive with the round value . . . . . . . . . . . . . . . . . . . . . . 37 12.7 Updating the audit log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 12.8 Publishing round values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 12.9 Receiving the timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 13 The timestamp verification process 39 13.1 Checking the hash value contained in the certificate . . . . . . . . . . . . . . . . . 39 13.2 Checking the structure of the certificate . . . . . . . . . . . . . . . . . . . . . . . 39 13.3 Checking the round’s time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 14 Security and efficiency of the accumulator technique 40 15 User interface 41 16 Issues to think about when designing a concrete system 42 17 Annexes 44 2 LIST OF FIGURES LIST OF FIGURES List of Figures 1 The binary tree structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 Use case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Document timestamp activity diagram . . . . . . . . . . . . . . . . . . . . . . . . 13 4 Timestamp check activity diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5 System audit activity diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 System start-up activity diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7 System start-up activity diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8 Interactions between the components . . . . . . . . . . . . . . . . . . . . . . . . . 20 9 Network Listener state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 10 Request processing state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 11 Request Timer state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 12 Entry processing state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 13 Actual round creation state diagram . . . . . . . . . . . . . . . . . . . . . . . . . 24 14 Round Queue Coordinator state diagram . . . . . . . . . . . . . . . . . . . . . . . 26 15 Timestamp Generator state diagram . . . . . . . . . . . . . . . . . . . . . . . . . 27 16 Timestamp generation state diagram . . . . . . . . . . . . . . . . . . . . . . . . . 27 17 Generate timestamp for leaf state diagram . . . . . . . . . . . . . . . . . . . . . . 27 18 Network Answer state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 19 Logger state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 20 Logger process state diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 21 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3 1 INTRODUCTION 1 Introduction The goal of the TIMESEC project was the development of a complete system for digital times- tamping, as well as a methodology for the evaluation of security primitives (in particular those which are used for timestamping). The previous technical reports of the project were:  Time and cryptography [12] (a study of timestamping schemes);  Evaluation methodology for security primitives [14] (an analysis of digital signature schemes and cryptographic hash functions);  Design of a timestamping system [15] (a general design and overview of different tech- niques). The first part of this final technical report is a reminder of this previous work and the conclu- sions that were drawn. After analysing the different timestamping schemes (see [12] and [15]), it was decided to de- velop two seperate systems, based on different techniques: the tree technique and the accumulator technique. In this technical report we present the work done for the implementation of both these timestamping systems. 4 2 REMINDER OF THE PREVIOUS WORK 2 Reminder of the previous work This is an abstract of the results and the conclusions that have been obtained earlier in the project. Digital timestamping is a cryptographic technique used to provide temporal information about electronic documents. It allows other parties to validate the time at which a document has been created, and to check that the document hasn’t been altered since. There are two families of timestamping techniques:  techniques that work with a trusted third party. They rely on the unpartiality of the entity that is in charge of issuing the timestamps. We can also classify these techniques into two dif- ferent types: those where the third party is completely trusted and those where it is partially trusted.  techniques that are based on the concept of distributed trust. They consist of making doc- uments dated and signed by a large set of people in order to convince the verifiers that we could not have corrupted all of them. The main drawback is that it requires a lot of coopera- tion. A detailed study of timestamping techniques can be found in the first technical report [12]. Nowadays, all the commercial implementations of timestamping services are based on the first approach. It is for this reason that we concentrate on this trusted third party approach. An analysis of security primitives important for timestamping -digital signature schemes and hash functions- was presented in the second technical report [14]. Several candidates were pro- posed, which are expected to offer the required security for some years to come. The design for the timestamping system was described in the third technical report [15]. The main goal was to minimize the trust required in the third party providing the timestamping service. The “easy” solution, which consists of concatenating the document with the current time and signing the result has been discarded because it has two main drawbacks: 1. The first one is that we must completely trust the Secure Timestamp Authority (STA), which can issue undetectable back-dated timestamps. 2. The second one is related to the limited lifetime of cryptographic signatures, which can be shorter than the document time-to-life. The timestamping method that we have chosen works by rounds, as described in [2] and [3]. All the timestamping requests (which contain hash values of particular documents) received by the STA during a round are accumulated and combined to produce a single round value. Different methods of accumulation are possible and we have chosen to implement two of them which seem the most practical (see sections 3 and 4). The timestamp for an individual request processed during a particular round, consists of infor- mation which allows one to check that this request was part of the accumulation process which produced the corresponding round value. The first phase of the verification process consists of performing this check. The round values which are calculated in succeeding rounds, are linked to each other by means of a hash function, thus creating an unforgeable temporal chain. The verification of a timestamp concludes by rebuilding this chain until a value trusted by the verifier is obtained. Periodically, one of the round values is published on an unalterable and widely witnessed media (e.g., a newspaper...). These special round values, which we call “big round values”, are the base of trust for all the issued timestamps. All verifiers must trust these big round values as well as 5 2 REMINDER OF THE PREVIOUS WORK the time associated with them. This is a reasonable requirement because those values are widely witnessed. The absolute time trusted by all the potential verifiers is the time indicated by the unmodifiable media. For the following discussions we suppose that this time is the same as the time indicated by the STA for the big round. Another requirement is to force the clients to check the timestamps as soon as they get them. In that way the process is continuously audited and the STA will not have any margin to manoeuver in an untrusted way. A very useful method for extending the lifetime of timestamps is described in [2]. It basi- cally consists of re-timestamping the document as well as the original timestamp before the hash function is broken. Next we give a detailed description of the two different techniques for the round accumulation process. 6 3 ACCUMULATION USING A BINARY TREE. 3 Accumulation using a binary tree. The first method of accumulation uses a binary tree structure and has been described in [7] and [8]. For each round a binary tree is constructed with the requests received during the round. In Figure 1 we can see a graphical representation of a round constructed using this method. RH(i-1) RH(i) H18 H14 H58 H12 H34 H56 H78 y1 y2 y3 y4 y5 y6 y7 y8 Figure 1: The binary tree structure Each of the requests consists of a hash value of a given document. The leafs of the tree are each of those hash values. The leaf values are then concatenated by two and hashed again to obtain the parent value (e.g., H34 = H (y3 j y4 )). This process is repeated for each level until a single value is obtained. The top value of the round tree (H18 ), which is called the “round tree value”, is then concatenated with the value obtained for the preceeding round (RHi 1 ), and finally hashed again to obtain the actual round value (RHi ). The timestamp of a document requested during the current round contains all the values nec- essary to rebuild the corresponding branch of the tree. For example, the timestamp for y4 contains f(y3 ; L); (H12 ; L); (H58 ; R); RHi 1 g. The size of these timestamps increases with the number of requests processed in a round, on a logarithmic basis. The verification process consists of rebuilding the tree’s branch and the linking chain of round values until a trusted (for the verifier) round value is recomputed. This verification method is explained in detail in [7], [12] and [10]. The security relies on the hash function used: if this function is collision-free (this means that it is unfeasible to find two inputs which are processed to the same hash value), it is impossible to forge the binary round tree or the linking chain. As an additional feature we can build two trees in parallel for each round, using two different hash functions (SHA-1 and RIPEMD-160, chosen according to the work in [14]). In that way, the system remains secure in case of an unexpected break of one of these hash functions. 7 4 ACCUMULATION USING A ONE-WAY ACCUMULATOR 4 Accumulation using a one-way accumulator An alternative method of accumulation was proposed in [4]. During a round we collect the requests yi (1  i  m), which are hash values of individual documents. The accumulation is performed by means of the modular exponentiation operation. Starting from an initial value Z0 , the “round accumulation value” Z is computed as follows: Q m yi i=1 Z = Z0 mod N: This value is then concatenated with the value obtained for the preceeding round (RHi 1 ), and finally hashed to obtain the actual round value (RHi ). To verify the timestamp for a particular request yj we check the following equation: Q m yi i=1 yj i6=j Z = Zj mod N , with Zj = Z0 mod N: Hence an individual timestamp for request yj consists of the partial value Zj and the round accumulation value Z (this last value is the same for all requests processed during the same round). The size of the timestamps is independent of the number of requests processed in the round. The drawback of this method is that the modular exponentiation operation is less efficient than a hash function. The verification process consists of checking the equation above and rebuilding the linking chain of round values until a round value trusted by the verifier is recomputed. The security of this method relies (besides on the hash function used) on the well known RSA problem: to produce a fake timestamp for a value y 0 , one should find a value Z 0 with Z 0y = Z mod N: 0 If the factorization of the modulus (N = p  q ) is unknown this is unfeasible. As an additional feature we should construct the primes of the modulus as follows: p = 2p0 + 1 and q = 2q 0 + 1, where p0 and q 0 are also primes. The reason for this is that otherwise the repeated application of the modular exponentiation operation might reduce the size of the image so much that finding collisions would become feasible. The factorization of the modulus has to be kept secret, it must be provided by a trusted third party, which can however be off-line. An analysis of one-way accumulators is presented in [9]. 8 5 A TIMESTAMPING SYSTEM BASED ON THE TREE TECHNIQUE 5 A timestamping system based on the tree technique We present here the specification and implementation of the timestamping system we made for the project TIMESEC. The methodology used for the specification is object oriented and is inspired from the ones presented in [13] and [6]. We used the Unified Modeling Language (UML) to represent this specification (see [5], [6], [13] and [1]). The comments on the implementation are made when presenting the specification. First we present the different Use Cases of this system as well as the actors. The different processes are then described. The attributes and operations of the different classes are given. Interesting algorithms for the round tree generation and timestamp generation are presented. The last part is a resume of the most important issues that we solved for the implementation of this timestamping system. A brief description of our analysis can be found in [10]. Some issues when building a times- tamping system as well as when using timestamps are given in [11]. 9 6 OVERVIEW OF THE GLOBAL SYSTEM 6 Overview of the global system A first description of the global system has been done in [15]. We give here more details following those guidelines. 6.1 The actors The main actors of our system are the client, the verifier and the administrator. The complementary actors are the publisher, the accurate time and the auditor. An illustration of the interaction between this different actors is given in Figure 2. The role of each of those actors is the following: Client: the client (User) sends a timestamp request to the STA, waits for the answer and verify the validity of it as soon as he receives it; Verifier: the verifier is given a timestamp issued by the STA as well as the document originally timestamped and wants to verify if this timestamp is valid; Administrator: the administrator is in charge of maintaining a working timestamping system; Auditor: the auditor is in charge of verifying the correct behavior of the STA; Publisher: the publisher is in charge of publishing values associated with a time in one or several unmodifiable media when asked by the STA; Accurate time: the accurate time provides an accurate time to the STA. 6.2 The use cases The use cases are the following: 1. document timestamp, 2. timestamp check, 3. system audit, 4. system start-up, and 5. system shutdown. The description of each of those use case follows. 6.2.1 Use Case 1: “Document timestamp” The activity diagram of this use case is represented on Figure 3. Goal: Timestamp a document in a non-repudiable fully traceable way. Preconditions: The system is working and “on-time”. Primary actor: The user. 10 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases Document Timestamp «extends» Big Round publishing User Publisher «uses» Round Tree «extends» generating Accurate time «uses» Timestamp check Verifier «extends» «uses» Big Round «extends» Certificate Round check check «uses» System shutdown System Audit Auditor System Startup «uses» Key setup «uses» «uses» «uses» Administrator Accurate clock Round integrity setup First round recover generating Figure 2: Use case diagram 11 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases Main scenario 1. User designates a document 2. Two hashes of the document are created. 3. For every one of the hashes: put document hash in round queue. 4. Put the two hashes and arrival time and request ordinal in log. 5. Once round is due (round due is determined by accurate time), generate round value. 6. Put round value in log. 7. Generate document timestamp certificate. 8. Give user, document timestamp certificate. Extensions 6-A. If round=“Big round” (BIG ROUND PUBLISHING) 6-A-i. Publish round value at “Unmodifiable media”. Success end condition: User have document timestamp, all the timestamping process is traceable. 6.2.2 Use Case 2: “Timestamp check” The activity diagram of this use case is represented on Figure 4. Goal: Verify the timestamp of a document. Preconditions: The system is working and it exists a valid timestamp over a document. It exists an “unmodifiable media” which publishes big rounds. Primary actor: The verifier. Main scenario 1. The verifier designates a document and a “timestamp certificate” (which we will call simply certificate from now). 2. The system generates the document hash (*2) and checks if it matches with the one in the certificate. 3. The certificate (*2) structure is checked (including its construction and signature). 4. The result is returned to the verifier. 12 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases document designation *2 Hash generation Request timing log Request Round due time and empty pending request generate generate round value round value SHA1 RIPEMD log round values generate and send document timestamp Figure 3: Document timestamp activity diagram 13 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases Extensions 3-A. The verifier wants to check the certificate against its round value. (CERTIFICATE ROUND CHECK) 3-A-i. The system access the log to obtain the round values of the certificate. 3-A-ii. The system checks if the round values match. 3-B. The verifier wants to check the round construction (BIG ROUND CHECK). 3-B-i. The verifier provides the system with the two big round values that can be found in the “unmodifiable media” (provided by the publisher actor). 3-B-ii. The system accesses the log and obtains all the round values between the two big round values. 3-B-iii. The system checks the coherency of all the rounds values obtained be- tween the big round values. Success end condition: All checks are verified to be true. Failure condition: A check is false. 6.2.3 Use Case 3: “System audit” The activity diagram of this use case is represented on Figure 5. Goal: Verify the complete system behavior for a given amounts of rounds. Preconditions: The system is working and it exists an “unmodifiable media” with published big round values. Primary actor: The auditor. Main scenario 1. The user provides the system with a set of consecutive big round values. System behavior will be checked between the first and the last big rounds. 2. The system obtains from the log all the hash values and the round values for a given round. 3. The system constructs the tree and checks that the round values are consistent. 4. Steps 2-3 are repeated until all round between the first and the last big rounds have been checked. 5. The result is returned to the user. Success end condition: All checks are verified to be true. Failure condition: A check is false. The use of the last step illustrated in Figure 5 is to guarantee that all the round values between consecutive Big rounds have been checked and that the algorithm do not stop before the next big round. This step is not useful in our implementation because it is achieved by the main audit process. 14 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases Document certificate choosing *2 [for each hash algorithm] generate document hash check matching of hash with timestamp [not OK] failed [OK] check certificate construction against [not OK] failed hash [OK] check acces system log to [not OK] signature [OK and round check required] obtain round value failed [OK and STA trust] check round value against timestamp [not OK] failed [OK and no Big round check required] [OK and big round check required] succeed suceed obtain big round values [not exists] failed [exists] [for all the rounds compromised obtain round between the big round values] values from log failed check coherency of round values [not OK] failed [OK] succeed Figure 4: Timestamp check activity diagram 15 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases get set of consecutive Big rounds [for all consecutive big round values] Get round values between two Big round values [for all round values] get hash values [all hash values for a round are obtained] [previous round value is checked or is a big round] reconstruct round value check round value matching [not OK] [failed] [OK] [all round values checked] Verify that all the round to avoid the case and big round values [not OK] [failed] have been checked .... [OK] [succeed] Figure 5: System audit activity diagram 16 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases 6.2.4 Use Case 4: “System start-up” The activity diagram of this use case is represented on Figure 6. Goal: Start-up the system in a consistent and traceable way. Preconditions: The system is stopped. A protected storage for the private key exists. An accurate time server exists and is accessible. Primary actor: The administrator. Main scenario 1. The system access the private-public keys. 2. The system synchronizes its clock with the accurate time server. 3. The system access the log and obtains the last round value. 4. The system publishes this value as BIG ROUND. 5. The other use cases one enabled. Extensions 1-A. At first startup (KEY SETUP) 1-A-i. The administrator provides the system with public/private keys. 2-A. At first startup (ACCURATE CLOCK SETUP) 2-A-i. The system asks the administrator for the source of the accurate clock. 3-A. At first startup (FIRST ROUND GENERATING) 3-A-i. The system generates a hash = zero hash value = 0. 3-B. Incomplete round (ROUND INTEGRITY RECOVER) 3-B-i. The system accesses in the log the last valid round value. 3-B-ii. All entries after this value are marked invalid. Success end condition: System is working in a consistent way. 6.2.5 Use Case 5: “System shut-down” The activity diagram of this use case is represented on Figure 7. Goal: Shut-down the system in a consistent and traceable way. Preconditions: The system is working in a consistent way. Primary actor: The administrator. 17 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases acess private key Syncro clock RT obtain last round value [not OK] [is first round] [not first round] generate find last "hash 0" valid round [not found] value failed [found] [OK] get last valid round value mark invalid all entries after the found round value publish last round value as big round Enable user request suceed Figure 6: System start-up activity diagram 18 6 OVERVIEW OF THE GLOBAL SYSTEM 6.2 The use cases Main scenario 1. The administrator signals the system to shutdown. 2. No more user requests are accepted. 3. The system waits until the current round is finished. 4. The current round (Final round now) value is published as BIG ROUND. 5. The log is marked as consistent. Success end condition: System is correctly shutdown. no more request are accepted [end of current round] current round value is published as big round mark log as consistent Figure 7: System start-up activity diagram 19 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7 Description of the different processes The critical process in this system is the timestamping process. The verification process as well as the audit process mainly reuse primitives of the timestamping process. When designing the com- ponents we took care of being able to reuse it for the other processes. The system design follows a highly decoupled multi-threaded approach. Each step is assigned to a specific component, which has its own different thread. The multi-thread approach is justified by the requirement to obtain a highly responsive and load independent implementation. 7.1 The timestamping process When the client asks for a timestamp, a connection is established with the STA and remains open until the timestamp is send back to the client. In the case where this connection is broken, the timestamp is lost. This choice has been made for simplicity, but other types of connections (http, email, ...) can easily be implemented. Our design is independent from the type of connections, it is just an implementation issue. By isolating the process charges into independent steps we try to decouple the load between them. Each step has also a working queue. Those queues are in charge of softening the speed differences between the different process steps. The different components are the following:  the Network Listener,  the Request Timer,  the Round Queue Coordinator,  the Logger,  the Timestamp Generator and  the Network Answer. Network Listener Request Timer Round Queue Coordinator Timestamp Generator i Logger Round Queue Coordinator Network Answer i-1 Figure 8: Interactions between the components A schematic outline of the process is given in Figure 8. Network Listener: The “Network Listener” is in charge of continuously listen to the clients’ timestamp requests. Request Timer: The “Request Timer” receives the constructed requests from the “Network Lis- tener”. Then, it times and forwards them to the actual “Round Queue Coordinator”. 20 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7.1 The timestamping process Round Queue Coordinator: Each round has its own “Round Queue Coordinator”, which is in charge of compiling and processing into a tree all the requests belonging to the round. Timestamp Generator: When the round tree has been computed it is forwarded to the “Times- tamp Generator”, which generates the corresponding timestamps. Network Answer: Once a timestamp is generated, the “Timestamp Generator” forwards it to the “Network Answer”, which in turn forwards it to the client. A more in depth description of the timestamping process is represented on a sequence diagram (see Annexe A). 7.1.1 The “Network Listener” The state diagram of this component is given in Figures 9 and 10. The “Network Listener” responsibility is to listen the network continuously for timestamping requests. When it receives a data stream, the “Network Listener” checks it in order to determine if it is a valid request. In the case it is, it sends an affirmative contact response to the client, it creates a “Timestamp Request” object and adds it to the “Request Timer” queue. Then it goes back to listen to the network. In the case the request message is not correct, it sends an error message to the client. We tried to give as few tasks as possible to the “Network Listener” to let it listen to the network, which is its primary task. In order to improve the overall performance, and to avoid the fact that a slow client connection could affect the other ones, several copies of the “Network Listener” can be active at the same time. shutdown Listening Network signal / Message retrieval Request processing Figure 9: Network Listener state diagram 21 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7.1 The timestamping process Syntax Request Request Verifying [OK] creating queuing Return Error message to [Not OK] the sender Figure 10: Request processing state diagram 7.1.2 The “Request Timer” The state diagram of this component is given in Figures 11, 12 and 13. There is only an instance of “The Request Timer” in the system. The “Request Timer” is in charge of ordering the requests received from the several “Network Listeners” and timing them accordingly. All delays introduced by the system before that point (namely, those introduced by the “Network Listener”) are indistinguishable from network delays, and thus not taken into account. Once a request has been timed, the “Request Timer” tries to add it to the current round queue. As the rounds are closed asynchronously by the corresponding “Round Queue Coordinator” this operation is not always successful, in that case, the “Request Timer” re-times the request and retries to queue it until it finds an open round. In that process the request sequence is preserved in order to provide a consistent behavior. Round Queue Coordinator creation: “Round Queue Coordinator” instances are created by the “Request Timer” upon processing a request corresponding to a non-existing round. The creation of the rounds that have no requests is delayed until a request is received. Once created, those empty rounds are immediately processed, introducing no significant delay into the process. The round tree value used for those empty rounds is a random value. Round number determination: Round numbers form a non-interrupted increasing integer se- quence. Rounds are always in synchronization with the round duration intervals. In other words, if the round duration is one minute, all rounds will start in an absolute minute boundary, inde- pendently from when the system has been started. “Big Rounds” are determined by the “Request Timer” using a similar approach to the one followed to determine the round boundaries. We do not restrict the duration of the round to a fixed value for the lifetime of the STA. To achieve this, the information about round and “Big Round” duration is introduced into the system at the start-up phase. If we wish to modify it, we must first shutdown the system, change the values and then restart the system, which is the only safe procedure we have foreseen. The time associated with a round is the time at which the round is closed. When starting the system and creating the Request Timer, it test if the Initial Time for the system is greater than the actual time. In this case, it waits for this Initial Time. The actual round number is the round number corresponding to the last round of the previous execution of the system plus one. To have a monotonic increasing value for the round number (even if the system has been stopped for a long time, the round number of the round just following round number n is number n + 1), we have introduce the variable “Offset Round”. The “Round Due Time” is calculated using the following formula: 22 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7.1 The timestamping process Round Due T ime = I nitial T ime +(Round N umber + Of f set Round +1)  Round Duration: The “Offset Round” is calculated at the creation of the Request Timer with the following formula: Of f set Round = (time() I nitial T ime)=Round Duration Round N umber: shutdown Request Request Request waiting queuing Dequeue 1 item [Queue not empty] Queue Entry waiting processing shutdown [Queue empty] Figure 11: Request Timer state diagram 7.1.3 The “Round Queue Coordinator” The state diagram of this component is given in Figure 14. The first thing a “Round Queue Coordinator” does is to determine the offset between the actual time and the round due time. Requests will be accepted only if the round is still valid (round is open). When requested by the “Request Timer”, the “Round Queue Coordinator” adds the request to the queue and logs it. This logged request will be latter used for process auditing purposes. When the round time is over, it obtains the “Round Values” from the preceding round and it computes the round binary trees (one for each hash algorithm) to obtain the corresponding “Round Values”. Then it gives the computed trees to the “Timestamp Generator” and finally adds to the log the “round tree values” and the “round values”. Those logged values will be latter used for timestamp verification and process auditing purposes. If the actual round is a “Big Round” those values are forwarded to a fixed media as well. Remark: A slight modification of these specifications has been done in the implementation. The tree is computed before getting the last round value. After obtaining the last round value, the 23 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7.1 The timestamping process Time Actual Round retrieval determination [Late Request] [Round exist] [Round does not exist] Round Request Actual Round creation queueing Due Time Figure 12: Entry processing state diagram Create Big Round [Round type = Big Round] Queue Coordinator Determine Round type Create Round Queue [Round Type = Standart] Coordinator Figure 13: Actual round creation state diagram 24 7 DESCRIPTION OF THE DIFFERENT PROCESSES7.2 The timestamp verification process actual round value is immediately computed using the round tree value. This change improve a bit the system in the un-probable event where the computation of the round i 1 is not finished when starting the tree calculation for round i. As you may have noticed in the section 2, the binary tree is defined for a number of leafs (requests) that is a power of 2. In general, this is not the case. We could create fake requests to finish the tree, but this will add a lot of requests (if we have 2n + 1 requests, then we will need to add 2n 1 fake requests). A smarter solution is to add a random value only when we need it. Then, we add at most n values (one for each level of the tree). We call these nodes “Special Node”, which will be logged as well. Instead of random values we could choose to use 0 or another fixed value, this would be as secure as our choice if the hash functions were “perfect”. As hash functions are only “presumably perfect”, we though that we could made our design more secure with really few additional computations. In our implementation, the STA queues the requests and computes the tree at the end of the round. At first sight, it could seem a more natural solution to build the tree as soon as the requests arrive. At the end of the round, the computation of the tree would then be ended by getting the last “Round Value” and computing the actual “Round Value”. In fact, this solution is harder to implement, and has no effect on the security achieved as no one can check that the STA does not perform any reordering of the requests before it publishes the “Round Value”. 7.1.4 The Timestamp Generator The state diagram of this component is given in Figures 15, 16 and 17. The “Timestamp Generator” processes the round trees by pairs (one for each hash algorithm) in order to generate the timestamps for each of the requests contained in the trees. In order to maximize the system responsiveness, once a timestamp has been generated, it is immediately for- warded to the “Network Answer”. Finally, when all the timestamps contained in a round tree have been processed the tree is destroyed. 7.1.5 The Network Answer The state diagram of this component is given in Figure 18. The “Network Answer” is in charge of forwarding the processed timestamps to the clients. It has been specified in such a way that it can run several threads, in that way the rest of the timestamping process can be isolated from possible network delay problematic. 7.1.6 The Logger The state diagram of this component is given in Figures 19 and 20. The logger logs the values when asked. It keeps also an index file that contains the position of the round values in the log file. 7.2 The timestamp verification process The activity diagram of this process is given in Figure 4. First, the verifier designates a document and its corresponding timestamp for verification. Then, the verifier’s system (his personal computer or a remote computer independent from the STA) generates the two document hashes and checks if they match with those contained in the 25 7 DESCRIPTION OF THE DIFFERENT PROCESSES7.2 The timestamp verification process Request Request Request waiting Request queuing Logging Due Time Closed round Round Due Last Round value Time waiting Due Time getting Last round killing Round Tree building and round value calculation [if Big Round] Big round publishing Round queuing for timestamp generation Figure 14: Round Queue Coordinator state diagram 26 7 DESCRIPTION OF THE DIFFERENT PROCESSES7.2 The timestamp verification process shutdown Request Request Round Tree waiting Queuing Queue Timestamp waiting Dequeue [queue not empty] generation shutdown [queue empty] Figure 15: Timestamp Generator state diagram get Leaf generate [yes] timestamp for leaf [no leaf] queue timestamp for answer Figure 16: Timestamp generation state diagram Get necessary prepare sign values from trees values Figure 17: Generate timestamp for leaf state diagram 27 7 DESCRIPTION OF THE DIFFERENT PROCESSES7.2 The timestamp verification process shutdown Request Request Request waiting queuing Dequeue [queue not empty] Queue Timestamp waiting sending shutdown [queue empty] Figure 18: Network Answer state diagram Logger process shutdown [Queue empty] Figure 19: Logger state diagram 28 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7.3 The audit process shutdown Request Request waiting Request queuing Dequeue [Queue not empty] Queue waiting Entry processing shutdown [Queue not empty] Figure 20: Logger process state diagram timestamp. Afterwards, the “Round Value” is reconstructed using the data provided in the times- tamp. If the computed “Round Value” is consistent with the one contained in the timestamp then the next step in the verification process is to compare this “Round Value” to the “Round Value” ob- tained from the STA repository. Finally, the verifier provides his system with the two “Big Round Values” that he founds in the “unmodifiable media”; the verifier’s system gets all the necessary “Round Values” and “Root Round Values” from the STA and it checks the coherency of the two linking chains (one for each hash function). This process is done at the client side and is not critical in terms of performances. A process is continuously working at the STA’s side. It waits for verifications requests and answer with the round value and round tree value of the asked round. It also indicates if it is or not a Big round. Three connections are established with the STA. One to get the considered round value. One to get the preceding round values until the preceding Big round. The last one to get the next round values until the next Big round. The way to obtain the necessary round values can be implemented differently. Our concern here was the simplicity of implementation. The verification of the matching of the Big round values given by the STA compared to the one in the unmodifiable media has not been done. The forwarding of the Big round values to the unmodifiable media has also not been implemented. 7.3 The audit process The auditor designates two “Big Rounds” that he fetches from a fixed media. The system behavior will be checked between these two “Big Round Values”. For each round, the auditor’s system gets all the hash values (leafs of the tree and “Special Nodes”) and the “Round Value” from the STA. Then, it constructs the two trees and checks that the “Round Value” is consistent. These two steps 29 7 DESCRIPTION OF THE DIFFERENT PROCESSES 7.4 The system start-up process are repeated until all the considered rounds are checked or until an error has been found. In that way, all theoretically verifiable system behavior can be verified a posteriori. 7.4 The system start-up process Here the most sensible issue is to be able to correctly start-up the system when an unexpected shutdown has occurred. If that is the case, the log will show an unfinished round; then the system marks all entries after the last complete round as invalid and publishes that round as a “Big Round”. If the log was consistent, it accesses the last valid “Round Value” in the log and publishes it as a “Big Round”. This process insures a fully verifiable behavior; we are able to detect non fully- processed requests. The recovery of the last round value when the log is not consistent (the last value in the log is not a valid round value) is not implemented in the actual version of our system. 7.5 The system shutdown process The administrator signals the system to shutdown. No more timestamping requests are accepted. The system waits until the current round is finished and this “Round Value” is published as “Big Round”. 30 8 DESCRIPTION OF THE DIFFERENT CLASSES 8 Description of the different classes The class diagram of our system is represented in Figure 21. The active classes are the one that have a bold border. «abstract» Request logRequest Network Listener Log Request * 1 1 «abstract» * Request Round value LogRequest 1 1 Logger 1 1 1 Request Timer Timestamp Request * Big round publishing * 1 1 * 1 * 1 * * 1 Round queue coordinator Big round queue coordinator * 1 2 1 Leaf First leaf #1 0..1 Special Round binary tree Hash_algoritm Node next #0..1 parents #0,1 0,2 previous #0..1 1 Timestamp Generator 1 Format algorithm Signature 1 1 1 * 1 Private Key * 1 Timestamp Public Key 1 1 Network Answer Figure 21: Class Diagram The CRC cards of the active class are the following. It states the responsibility of those classes as well as the class that implement it. 31 8 DESCRIPTION OF THE DIFFERENT CLASSES Network listener  listen the network (Socket)  convert data stream into request Request  add request to Request-timer queue Request-timer Request timer  add Request to queue  time requests and round determination Round queue coordinator  add request to round Round queue coordinator  round creation Round queue coordinator Round queue coordinator  kill preceding round and log  add requests to queue and log Hash tree queue and Logger  compute round value and log Round B. tree and Logger  give computed trees to Timestamp generator Timestamp generator Logger  add requests to queue Log request  write queue request to disk Timestamp generator  get Tree  explore tree to generate timestamp for each request Round B. tree  (Optional) store timestamps Timestamp storer  send computed request to requester Network answer Network answer  add computed request to queue  answer queued computed request Request, (Socket) The attributes and operations of those classes are detailed in Annexe B. In the class “Timestamp Request”, the “Process Time” has been mentionned to indicate the time of arrival but is not used in the actual version of the implementation. 32 9 ALGORITHMS 9 Algorithms 9.1 Construction of the round tree The two trees are constructed at the same time. We give the algorithm for just one hash function. Algorithm 1 Tree construction Begin construct the leafs with the queued requests while (number of nodes in the tree level > 1) process the node by two and construct the higher level if it remains one node then compute and hash a random value compute the node endif endwhile //The tree round value is then computed get the preceding round value to obtain the current round value End 9.2 Generation of the timestamps Algorithm 2 Timestamp generation Begin while all the requests have not been answered get next leaf while we are not at the tree round value if this node position is R then get the left node value else get the right node value endif this node=parent node endwhile get the preceding round value put the round time, round number, request sequence in the timestamp sign the timestamp send the timestamp to the Network Answer endwhile End 33 10 A TIMESTAMPING SYSTEM BASED ON THE ACCUMULATOR TECHNIQUE 10 A timestamping system based on the accumulator technique Next we describe an alternative system for timestamping which has also been developped for the TIMESEC project. This system is similar to the previous one in the dividing of the timestamping procedure in successive rounds. The main difference is the method used for processing (accumu- lating) all the timestamp requests of a round and generating the round value (see sections 3 and 4 for a description of both accumulation methods). 34 11 OVERVIEW OF THE GLOBAL SYSTEM 11 Overview of the global system The main actors involved in the system are the STA (Secure Timestamp Authority), the clients and the verifiers. The main use cases are the generation (by a client) and the verification (by a verifier) of a timestamp. In the first case the client wants a timestamp for a document he possesses. He submits a request to the STA and receives in return a timestamp certificate for his document. In the sec- ond case the verifier wants to check the correctness of a given timestamp certificate for a certain document. The role of the STA is in processing all timestamp requests, making the necessary computa- tions and sending back the timestamp certificates. It also generates an archive, which contains information on all succeeding timestamping rounds, and the linking between them. Finally it gen- erates a log with all information necessary for reconstructing the round processes. This permits an audit of the system. 35 12 THE TIMESTAMP GENERATION PROCESS 12 The timestamp generation process This process allows a client of the system to obtain a timestamp certificate for a document in his possession. He will send a request to the STA and receive a timestamp in return. The certificate obtained proves the temporal information on his document. The scenario is as follows: 1. The client designates the document for which he wants a timestamp. 2. He generates a hash of this document using a secure, collision-free hash function. 3. He sends this hash value to the STA. This is the request. 4. At the end of the round the STA generates the round value, which depends on all requests of the round and on the previous round value. 5. For each request he generates the corresponding timestamp certificate. 6. He appends the round value to the archive. 7. He sends the timestamp certificates to the clients who requested them. 8. The STA also logs all important round information in the audit log. Next we examine this process in more detail. 12.1 Use of a hash function Instead of just sending his document, the client first produces a hash of it. In this way the document remains secret, and sending, processing and storing requests is simplified (because the hash is much shorter). The correspondence between the hash value and the document must be unique, hence he must use a secure, collision-free, hash function. The first step followed by the verifier is checking this correpondence, by applying the same hash function to the document and checking it with the hash contained in the timestamp certificate. In the current implementation using the hash function RIPEMD-160 is suggested. The choice can also be left to the users: if the verifier agrees that a secure hash function was used by the client, he can trust the hash value contained in the certificate (by making the check with the hash function). RIPEMD-160 and SHA-1 both are good candidates, because they are well established algorithms (recently standardized by ISO/IEC). Both of them generate a hash value of 160 bits. Optionally we could enforce to use both of these hash functions in parallel (as in the previous system). Then the timestamps would remain secure if one of them is unexpectedly broken. In this case the system would process both hash values, by performing a round accumulation for each hash function in parallel. The certificates will contain values for both hash functions, and in the the verification process seperate checks will be made for each hash function. 12.2 Submitting a request to the STA To ask a timestamp for a document the client sends the hash value he generated in the previous step to the STA, along with his identity (this is the request). Our implementation uses a web interface for this step: the client enters a hash (up to 40 hexadecimal characters, which is equivalent to 160 bits) and his email-address, and submits it. The website is secured with SSL (providing encryption and server authentication) and also contains code for the RIPEMD-160 hash function used in the previous step. 36 12 THE TIMESTAMP GENERATION PROCESS 12.3 Collecting the requests for a round 12.3 Collecting the requests for a round The STA collects all requests during a round. The hash values and corresponding identities which are received, are stored in two separate files. When the round finishes the system moves these files to a new directory, where the processing (round accumulation) starts. At the same time, new requests for the next round start to be collected in the old directory. 12.4 Round accumulation The STA processes the collected hash values with the round accumulation technique described in section 4. Modular exponentiation is used as a one-way accumulator, in order to compute the round accumulation value Z and the partial values Zi (for 1  i  m) for the hash values yi (which were contained in the requests of the clients, and are up to 160 bits long). In a straightforward implementation m  (m 1) exponentiations would be required to compute the partial values Zi for m requests (m 1 exponentiations for each partial value). In a more careful implementation the number of operations can be reduced by reusing intermediate values: (m=2+1)  (m 1) exponentiations are sufficient. One more exponentiation allows the computation of the round accumulation value Z from one of the partial values Zi . 12.5 Sending back the timestamps The STA is now ready for sending back all timestamps to the clients who requested them. The timestamp for a particular request contains the hash value yi (which was sent by the client to the STA), the partial value Zi and the round accumulation value Z (this last value is the same for all clients of the same round). The certificate further includes the number and the time of the round. The identities (email addresses) which were stored, are used for sending the timestamps to the clients who requested them. 12.6 Updating the archive with the round value The STA now links the current round to the previous one. The round accumulation value Z which was computed is concatenated to the round value of the last round, and the result is hashed with the hash function RIPEMD-160 to obtain the new round value. The round accumulation value Z and the new round value are then appended to the archive, together with the number and the time of the round (i.e., the time at which all computations for the round were completed). Note that the linking procedure can be extended by applying a second hash function (SHA-1) in parallel, in order to protect against an unexpected break of one of the hash functions. 12.7 Updating the audit log The STA also keeps a log containing all important values used in a round. For each round the hash values and identities contained in the requests are stored, as well as the computed partial values, the round accumulation value, and the actual round value (after linking with the previous round). This allows any other independent party to check all the work done by the STA. 37 12 THE TIMESTAMP GENERATION PROCESS 12.8 Publishing round values 12.8 Publishing round values At certain time intervals the STA should have a round value published in some authentic, unmod- ifiable and widely witnessed media. We call this a big round, and the time connected to such a round should be trusted by all participants to the system. 12.9 Receiving the timestamps Each client receives the timestamp(s) that he requested in the past round. In our implementation he receives an email with a certificate that contains all the information which proves that the hash of his document was part of the round accumulation process. The round itself is identified by its number and time. The email further includes the time at which the request was sent and the machine (IP-address) it was sent from. A client should immediately verify a timestamp that he receives (see the next section for this procedure). 38 13 THE TIMESTAMP VERIFICATION PROCESS 13 The timestamp verification process This process allows a verifier given a document and corresponding timestamp certificate, to check the correctness of the certificate and the temporal information about the document contained in it. The scenario is as follows: 1. The verifier designates a document together with the corresponding timestamp certificate. 2. He generates a hash of the document (using the same hash function as the client did in the generation process). 3. He checks that this hash is identical to the hash value contained in the certificate. 4. He checks the structure of the certificate. 5. He uses the archive to check the linking with preceeding/succeeding rounds until trusted (published) values are encountered. Next we examine this process in more detail. 13.1 Checking the hash value contained in the certificate The first step for the verifier to check a document’s timestamp, is to compute the hash of the document and check that the result is equal to the hash value contained in the timestamp certificate. For this he uses the same hash function as the client did in the first step of the timestamp generation process. For a secure collision-free hash function (such as RIPEMD-160 or SHA-1) this proves that the timestamp belongs to the document given. 13.2 Checking the structure of the certificate Next the verifier checks the structure of the certificate, by using the values contained in it in the equation that reconstructs the round accumulation value from the partial value and the document’s hash value (see section 4). This involves one modular exponentiation. Code for performing this check is provided on the secure website (this code also needs the modulus of the system). Due to the intractibility of the RSA problem this proves that the document’s hash was part of the accumulation process that generated the round accumulation value. 13.3 Checking the round’s time The verifier already knows that the document’s timestamp belongs to the round characterized by the round accumulation value contained in the certificate. He will now check the temporal information provided by this round. The certificate includes the number and time of the round, and this information can be used to look up the round in the system’s archive (which is accessible via the secure website). The archive provides the information necessary for checking the linking between all successive rounds (the secure website provides code for performing this check). In this way the verifier can follow the temporal chain in both directions until he encounters trusted (published) values. In that way the round is proven to be situated between two such trusted (big) rounds. 39 14 SECURITY AND EFFICIENCY OF THE ACCUMULATOR TECHNIQUE 14 Security and efficiency of the accumulator technique The main advantage of using the accumulator technique is that the size of the timestamps is con- stant, independent of the number of requests in a round. The drawback is that the modular expo- nentiation operation which is used as a one-way accumulator is less efficient than hashing. We have shown that the number of exponentiations necessary for the timestamp and round value gen- eration is quadratic in the number of requests but with a careful implementation we have been able to reduce this number by about half. Another drawback is that, contrary to the tree technique, we cannot preserve the relative posi- tion of requests of the same round. However this information could not be proven in the system using the tree. With regards to security, as in the first system we need a secure, collision-free, hash function. The client needs to hash his document before sending the request to the server. The STA needs a hash function to link all successive rounds. In this system the security also depends on the intractibility of the RSA problem. For this we need a modulus that cannot be factored, for the time being a 1024-bit modulus should be sufficient for this, and this can be extended at a later time. The modulus must be provided by a trusted party, but this party can remain off-line, and needs not be involved further in the system. 40 15 USER INTERFACE 15 User interface As noted before, our implementation of the timestamping system using the accumulator technique uses a web interface, allowing clients to easily submit their timestamp requests. The website is also secured via SSL, which provides encryption for the communication and authentication of the server. In order to submit, the client enters the hash value of his document that he wants a timestamp for, and his email address to which the timestamp certificate will be sent. The webpage viewed by the users is shown in Annex C. The archive providing the temporal information of the rounds and the linking information be- tween them, is accessible on a seperate page (an example of which is shown in Annex D). Note that the values shown in the archive are in the format used by the multi-precision library that we used for our C-programming. This format first shows the length of a value (the number of 16-bit words in hexadecimal), and then the value itself in hexadecimal. Explanation about the system and code for hashing documents and verifying timestamps is also provided for. 41 16 ISSUES TO THINK ABOUT WHEN DESIGNING A CONCRETE SYSTEM 16 Issues to think about when designing a concrete system The remarks that we make in this section come from our experience in designing and implementing a complete timestamping system (see also [10]). Our principal design requirement was to minimize the trust required in the third party issuing the timestamps. Some of the remarks that we make here were already made previously in this report. We state them here again to summarize the important problems that must be solved when implementing a timestamping service and the solutions we have given to them. We implemented the two techniques summarized in section 2. For the tree technique we added the feature of building two trees in parallel for each round, using two different hash functions (SHA-1 and RIPEMD-160). This allows to remain secure in case of an unexpected break of one of the hash functions used. The client submits two hashes of the document he wants to timestamp using the same hash functions as the ones used by the STA. The STA has no knowledge of the kind of document that is being timestamped. It also can not check that the two hashes received have been computed from the same document or with the supposed hash functions. If this is not the case, the timestamped document will not be validated by the verification process, but this can not be detected in advance. As is demonstrated in [11], signatures should not be used for the timestamping process. In our designs we only use it for STA authentication purposes when sending back the timestamp to the client. A good timestamping technique should be auditable. In both of our designs, all the compu- tations of the STA can be checked at any time. All the values timestamped, as well as the round values, are logged. With this information any outside entity can recompute and check all the round values issued by the STA. System based on the tree technique. The binary tree is defined for a number of leafs (request) that is a power of 2. In general,this will not be the case . We could create fake requests to finish the tree, but it will add a lot of requests. Imagine that we have 2n + 1 requests, we need then to add 2n 1 fake requests. A smarter solution is to add a random value only when needed. We add at most n values (one for each level of the tree). We call this node “special node”. Another solution could be to use the 0 value or a fixed value instead. It is as secure as the solution we use if the hash functions are “perfect”. As hash functions are only “presumably perfect”, we though that we could make our design more secure with really few additional computations. In our implementation the STA queues the requests, and computes the tree at the end of the round. At first sight, it could seem a better and more secure solution to build the tree as soon as the requests arrive and at the end of the round finish the computation of the tree by getting the last round value. In fact, this solution is harder to implement, and has no effect on the security because no one can check that the STA does not perform any reordering of the requests before it publishes the round value. Our design uses a round queue for each round. There is a different thread assigned to each round queue, which is mainly waiting for the end of the round. Once the round is closed, the thread wakes up and constructs the round tree finally obtaining the round value. The time indicated in the timestamp is only determinated when the request is put in the round queue. The round queue does not accept any request after the end of the round. In that way, the computation of the tree can begin immediately. Another solution could be to determine the time as soon as the request is received. However we detected during the implementation design that it will then be difficult to know which are the requests belonging to a round waiting to be processed once the time for the round has expired. On the other hand, if there is an abnormal delay between the reception of a 42 16 ISSUES TO THINK ABOUT WHEN DESIGNING A CONCRETE SYSTEM request and the queuing, then the computation of the tree and then the issuing of the timestamps will be delayed. The values timestamped as well as the round values are logged on a file. This feature permits to define an audit process. When checking the validity of a timestamp, the verifier asks the STA for the necessary values. These values are all the round values between the last and next big rounds. With this material, the verifier will be able to check the validity of the timestamp without having to trust the STA at all. System based on the accumulator technique. The second system uses modular exponentiation instead of hashing for accumulating the requests. As in the previous case all requests received during a round are collected, and when the round finishes they will be processed by the one-way accumulator (modular exponentiation operation). For each request yj (see section 4 for the notations used in this discussion) we need to gener- ate the corresponding partial value Zj . We also need the round accumulation value Z , which is the same for all requests processed in the same round. The number of modular exponentiations required for computing these values for all requests of the round is quadratic in m (the number of requests), but by careful implementation we can reduce this number to about half the number required in a straightforward implementation. To use the system, clients have to submit a 160-bit hash (using RIPEMD-160) of their docu- ment. The STA will make the necessary computations when the current round has finished, and then send back all timestamps (containing the necessary values) to the corresponding clients. Suc- ceeding rounds are also linked to each other by using the RIPEMD-160 hash function. As in the other implementation, we can improve this further by using a second hash function (SHA-1) in parallel. The security of the system also relies on the modulus used. This modulus should be provided by some trusted third party (which can be different from the STA, and remain off-line), and its prime factors must remain secret from anyone else. A length of 1024 bits seems appropriate for the time being, and can be extended at a later time. All requests and round values are logged in a file, which permits auditing of the system. A particular timestamp is verified by checking the correspondence between the document and y its hash value (input of the request), checking the equation Z = Zj j mod N , and finally checking the linking of succeeding rounds until trusted (published) round values are obtained. 43 17 ANNEXES 17 Annexes Annexe A 44 17 ANNEXES 45 17 ANNEXES Annexe B 46 17 ANNEXES 47 17 ANNEXES 48 17 ANNEXES 49 17 ANNEXES 50 17 ANNEXES Annexe C 51 17 ANNEXES 52 17 ANNEXES Annexe D 53 17 ANNEXES 54 REFERENCES REFERENCES References [1] S.-S. Alhir. UML in a Nutshell. O’Reilly, 1998. ISBN 1-56592-448-7. [2] D. Bayer, S. Haber, and W.-S. Stornetta. Improving the efficiency and reliability of digi- tal timestamping. In Springer Verlag, editor, Sequences’91: Methods in Communication, Security, and Computer Science, pages 329–334, 1992. [3] J. Benaloh and M. de Mare. Efficient broadcast time-stamping. Technical Report TR 91-1, Clarkson University Department of Mathematics and Computer Science, August 1991. [4] J. Benaloh and M. de Mare. One-way accumulators: A decentralized alternative to digital signatures. In Tor Helleseth, editor, Advances in Cryptology - Proceedings of Eurocrypt’93, number 765, pages 274–285. Springer-Verlag, 1994. [5] G. Booch, J. Rumbaugh, and I. Jacobson. The Unified Modeling Language User Guide. Addison-Wesley, 1999. ISBN 0-201-57168-4. [6] M. Fowler and K. Scott. UML Distilled. Addison Wesley, 1998. ISBN 0-201-32563-2. [7] S. Haber and W.-S. Stornetta. How to timestamp a digital document. Journal of Cryptology, 3(2):99–112, 1991. [8] S. Haber and W.S. Stornetta. Secure names for bit-strings. In Proceedings of the 4th ACM Conference on Computer and Communication Security, pages 28–35. ACM Press, April 1997. [9] H. Massias. A survey of accumulators. Technical report, UCL Crypto Group Technical Report, February 1998. [10] H. Massias, X. Serret Avila, and J.-J. Quisquater. Design of a secure timestamping service with minimal trust requirements. In A. Barbé, E.C. van der Meulen, and P. Vanroose, editors, Twentieth Symposium on Information Theory in the Benelux, pages 79–86, May 1999. [11] H. Massias, X. Serret Avila, and J.-J. Quisquater. Timestamps: Main issues on their use and implementation. Accepted at Wet Ice ’99, Stanford CA, June, 1999. [12] H. Massias and J.-J. Quisquater. Time and cryptography. Technical report, TIMESEC Project (Federal Governement Project, Belgium), 1997. Available at http://www.dice.ucl.ac.be/crypto/TIMESEC.html. [13] R. Pooley and P. Stevens. Using UML: Software Engineering with Objects and Components. Addison-Wesley, 1998. ISBN 0-201-36067-5. [14] B. Preneel, B. Van Rompay, J.-J. Quiquater, and H. Massias. Evaluation methodology for security primitives. Technical report, TIMESEC Project (Federal Governement Project, Bel- gium), 1997. Available at http://www.dice.ucl.ac.be/crypto/TIMESEC.html. [15] B. Preneel, B. Van Rompay, J.-J. Quiquater, H. Massias, and X. Serret Avila. Design of a timestamping system. Technical report, TIMESEC Project (Federal Governement Project, Belgium), 1998. To be available at http://www.dice.ucl.ac.be/crypto/TIMESEC.html. 55 {transient} :Network Listener :Request Timer RQC1:Round queue coordinator :Timestamp Generator :Logger Private Key NA:Network Answer User Message (Request) Valid(Message) {transient} R:Timestamp Request <> is valid? Add queue(R) «signal» Queue not empty Obtain_Time_Round «signal» Due Time add_queue (R, time, absolute sequence number) closed_round() Obtain_Time_Round {transient} RQC2:Round queue coordinator «creates» (RQC1) {transient} add_queue (R, time, absolute sequence number) «abstract» «creates» LR1:Log Request Update(process_time,time, round number, absolute sequence number) (R) add_queue_log(LR1) «signal» Queue not empty data retreive «signal» «destroy» Due Time Obtain round value() Round value Destroy Tree construction {transient} RBT:Round binary tree {transient} «creates» «abstract» *2 LR2:Log Request «creates» (RBT->Round_value) *2 add_queue_log(Log_request(LR2)) add queue (RBT) «signal» Queue not empty «signal» data retreive Queue not empty «destroy» get_timestamp_Request_values() {transient} TS:Timestamp «creates» add_values_from_tree() {transient} prepare_signature() S:Signature Sign() «creates» add_signature(S) give_processed_timestamp() add_queue(R) «destroy» «signal» queue not empty Obtain client address Serialize message Send message «destroy» Network Listener -port: Integer {frozen} -Listening socket: socket -Process finished: boolean -Request Timer: Request_timer_pointer {frozen} -StaID: string {frozen} +constructor(port:Integer, Request_timer:Request_timer_pointer, StaID:string) -Listen_the_network() -Process_request(request content:stream, client address:network adress): boolean +Service() «abstract» Request +client_adress: network_adress {frozen} +StaID: string {frozen} #socket: socket #Valid: boolean +constructor(client_adress:network_adress, socket:socket, StaID:string) +abort_message(error:string) +Obtain STAId(): string -contact_confirmation() Timestamp Request -hash_value_SHA1: Integer -hash_value_RIPEMD: Integer -timestamp: timestamp_pointer -process_time: Integer -time: Integer -round: Integer -Sequence_number: Integer -timestamp signature: spki signature +abort_message(error:string): boolean +contact_confirmation() +constructor(client_adress:network_adress, socket:socket, StaID:string) +send_Message() +add_Timestamp(timestamp:timestamp_pointer, signature:spki signature) +obtain_hash_SHA1(): Integer {isQuery} +obtain_hash_RIPEMD(): Integer {isQuery} +update_position(time:Integer, round:Integer, sequence_number:Integer, process time:Integer) +obtain_position(time:Integer, round:Integer, sequence_number:Integer, process_time:Integer): {isQuery} +Obtain time(): Integer Request Timer -actual_RQC: RQC_pointer -queue: request_queue -Sequence: Integer -Round_number: Integer -logger_pointer: logger_pointer {frozen} -OffsetRound: Integer -InitialTime: Integer {frozen} -RoundDuration: Integer {frozen} -BigRoundDuration: Integer {frozen} -TimestampGenerator: TimestampGenerator pointer +constructor(Sequence:integer, round_number:integer, Logger:logger_pointer, TimestampGenerator:TsGen pointer, TimingInfo:3xInteger) +addQueue(Request:Request_pointer): boolean -process_Request(Request:Request_pointer) -obtain_time_round(time:integer, round:integer) -create_next_round() -Service() Round queue coordinator -number: Integer {frozen} -time: Integer {frozen} -queue: request_queue -actual_round_tree_SHA1: RBT_pointer -actual_round_tree_RIPEMD: RBT_pointer -closed_round: boolean -last_RQC: RQC_pointer -this_round_value_SHA1: Integer -this_round_value_RIPEMD: Integer -good_round_value: boolean -logger_pointer: logger_pointer {frozen} +constructor(number:integer, time:integer, last_RQC:RQC_pointer, logger_pointer:logger_pointer) +addQueue(Request:Request_pointer): boolean -obtain_last_round_value(last_round_value_SHA1:integer, last_round_value_RIPEMD:integer) -tree_construction() -forward_trees() -Service() Big round queue coordinator -big_round_publishing_pointers: big_round_publishing_pointer_list +constructor(number:Integer, time:Integer, last_RQC:RQC_pointer, logger_pointer:logger_pointer) Big round publishing -media_type: media_type -media_coordinates: media_coordinates +add_publish_request() Logger -queue: log_queue -log_file: string {frozen} +constructor(log_file:string) +add_Queue(Request:LogRequest): boolean -Log_request(Request:LogRequest): boolean -Service() «abstract» Log Request +constructor() +serialize() Request logRequest -request_pointer: request_pointer {frozen} +constructor(request_pointer:request_pointer) +serialize() Round value LogRequest -round_value_SHA1: Interger {frozen} -round_value_RIPEMD: Interger {frozen} -round_number: Interger {frozen} -time: Interger {frozen} -Big_round: boolean {frozen} +constructor(round_value_SHA1:Integer, round_value_RIPEMD:Integer, round_number:Integer, time:Integer, Big_round:boolean) +serialize() Algoritm: Hash Algoritm Node -parent: Node_pointer -localisation: {L,R,T} {frozen} (T means that this node is the tree round value) -next: Node_pointer -previous: Node_pointer {frozen} -value: Hash_value {frozen} +constructor(children_L:Node_pointer, children_R:Node_pointer, previous:Node_pointer) +next(): Node_pointer {isQuery} +previous()(): Node_pointer {isQuery} +localisation(): {L,R} {isQuery} +parent(): Node_pointer {isQuery} +value(): Hash_value {isQuery} Round binary tree -first_leaf: Node_pointer {frozen} -number: Integer {frozen} -time: Integer {frozen} +constructor(time:integer, number:integer, first_Request:Node_pointer) Leaf -Request: Request_pointer {frozen} +constructor(Request:Request_pointer, previous:Node_pointer) +Request(): Request_pointer {isQuery} Special +constructor(rand_seed:integer, previous:Node_pointer) Timestamp Generator -queue: RBT_queue -private_key: key {frozen} +add_Queue(RBT_SHA1:RBT_pointer, RBT_RIPEMD:RBT_pointer): boolean -process_tree_request() -process_client_request() -Service() Timestamp -time: Integer {frozen} -round_number: Integer {frozen} -sequence_number: Integer {frozen} -signature: signature_pointer -tree_branch_SHA1: string {frozen} -tree_branch_RIPEMD: string {frozen} +constructor(tree_branch_SHA1:string, tree_branch_RIPEMD:string) +serialize(): string +prepare_signature(): string +add_signature(signature:signature_pointer) Signature -signature: signature {frozen} -public_key: key +constructor(string:string, public_key:key) +obtain_signature(): signature {isQuery} +obtain_public_key() +serialize() Private Key -private_key: key -public_key: key_pointer +constructor(private_key:key) +sign(string:string): signature_pointer Network Answer -queue: request_queue +addQueue(Request:Request_pointer): boolean -process_Request(Request:Request_pointer) -Service() System Administration -Network_Listener: Network Listener -Request_Timer: Request Timer -Logger: Logger -Timestamp_generator: Timestamp Generator -Network_answer: Network Answer -config_file: file +constructor(config_file:file) +check_integrity(error_message:message): boolean COSIC Time Stamping Authority Hash value: Email: Request Time Stamp View the archive (roundstamps and linking values) How to use the system Technical overview The RIPEMD-160 hash function Linux executables: Check timestamps, Check linking, Hash a binary file using RIPEMD-160 This is an experimental system developped for the Belgian TIMESEC project, funded by the OSTC. More info: bart.vanrompay@esat.kuleuven.ac.be Thanks to: antoon.bosselaers@esat.kuleuven.ac.be (MP library) joris.claessens@esat.kuleuven.ac.be (web interface) Archive: round and linking values % example, using a 512-bit modulus and a round time interval of 10 minutes % ROUNDSTAMP = the round accumulation value, % 512-bits long (generated by modular exponentiation) % LINKING VALUE = the round value, % (after linking to the previous round value), 160-bits long (generated with RIPEMD-160) INITIAL LINKING VALUE a 4e35 b5af 9d3e b2b8 1166 de91 bc8b 383d 31b9 d4b0 ROUNDSTAMP 1: GMT+01 TIME = Mon Dec 13 14:00:05 1999 20 b347 fd6c e46a 4419 bb8d 754c 167e 0eaf b9e8 e863 c1f1 e360 e22d 6790 ebaa 90cf b7da 827d 9510 6b16 f742 349d bcb5 9754 6eed 0ba0 eb54 4134 9211 38b9 22cc 752b LINKING VALUE a 7328 feca 0652 ce73 31b2 cd74 d2f0 ae90 bc73 d68f ROUNDSTAMP 2: GMT+01 TIME = Mon Dec 13 14:10:05 1999 20 1b4f 9816 791c ed5f 16ca 99a6 caed 79b8 728b b8a8 79b3 62f7 1fde fb0e b73d ae83 cc6b 5f47 52c8 9c5c f3b7 1734 0e7b 946d 86fb 8f53 321c 8f3d 2f75 907d 58e6 4030 LINKING VALUE a c447 37f7 7b6f 026c 38bf 4ca0 b1b0 629a 19e4 aa02 ROUNDSTAMP 3: GMT+01 TIME = Mon Dec 13 14:20:05 1999 20 9c5e 3f95 ea1c d135 02cd a4f8 e86b b684 c042 986a 2a1d 4b31 ac25 9c50 b028 7b04 f439 5ac8 8875 33de 63e6 e023 dffb c115 577f 4e2a a32e bc5b 37a0 5fc3 71f1 594a LINKING VALUE a b857 d0e6 7bcf ae5a 1bd1 3dda d116 b845 d1e6 5b47 ROUNDSTAMP 4: GMT+01 TIME = Mon Dec 13 14:30:05 1999 20 24a8 9b18 abc8 f072 410c 65a8 67bc 2156 e72a ee0e 2626 6457 bc73 37a5 d072 137a a60c e7d2 72bf 28e1 0252 279c c135 c5d9 8eb1 8a3b 1b0b ff44 f321 1f6c 095d 66e6 LINKING VALUE a 47fb 2db0 0a03 3b8a c33e 841a f136 4c3c e5dc 8aed ROUNDSTAMP 5: GMT+01 TIME = Mon Dec 13 14:40:05 1999 20 b551 6c3f a6da d3a8 c8d9 5c90 2dba f8b6 5132 7bb9 0e13 215d 70d1 2d02 ecf7 cc28 84b4 6bbd 409d 7722 84cc 1f8a a154 5e14 113d cecb 30eb 38f0 74d7 a985 4fe9 a369 LINKING VALUE a 30a2 9cd4 5c9e f2ce b978 6082 142f 640f 55fe 3d1c