Distributed and Concurrent Systems 11.4.2008 Exercise 5 No X-exercise this week. 25) Let us simulate a distributed system by students an a classroom. Each student has one or more neighbours. All communication is done via delivering paper notes to neighbors. You can assume that all students can act concurrently, i.e., send and receive notes with any neigbour. Notes can only contain numbers, and you recognize the person who wrote them from the figures. Task is to count the number of students. Let us assume that one student (but we don't know who) tries to sabotage the count. What kind of tricks (s)he can do? Is it possible to make an algorithm/protocol that always count correctly whatever tricks the single person does? If you think so, sketch such algorithm. If you think that reliable count is impossible, show the situation and the tricks that make count go wrong. 26) Let us continue the exercise 5 (week 1), but increase the group to a bit larger (>= 10) and exploit also multicast the same message to all members of the group. Let us assume that an ordinary message costs 10c. What would be the cheapest protocol if the multicast costs a) 10c, b) 20c, c) N*5c, where N is the number of participants. 27) Let us continue the exercise 5 (week 1), but make it for a secret closed club. We'll use emails instead of SMS messages. What kind of security measures would ensure confidentiality is new members are taken only at physical meetings? a) Let us assume that all members participate all meetings. b) Part of the members may be absent from part of meetings. 28) Convert the previous task so that new members can be accepted via recommendations from three exiting members using emails only. What security protocols could used now? Take skeletons for next exercises CryptExample and FileExample) from www-page. 29) Write a Java program that counts and prints in hex the MD5 hash of the given file. 30) Write a Java program that encrypts the given file using Blowfish and a key asked from the user (twice).