A few more solved exams

If you took the time to explore this blog's content backwards you've realized some of the older links are dead. But fear not, some of that content is brought back to life here. These are a few solved exams more for you to look at.

Don't forget next Monday we'll have the exam.

Either you are attending to one term exam or two, see you there.
 

Breaking bad

Some years ago we've got a situation at UPV. This paper details some of the events that happened. I reckon both students involved are still at UPV.
Paper

Exam details

Next June 2009 exam will consist of two parts. Those of you only interested on the second term part have to come at 10:00. 2nd term exam will last two hours.

After the 2nd term exam a 1st term exam will be held (same place but fewer rooms).

Please note that it is mandatory you take now the 2nd term exam but the 1st term one is optional. If you are happy with the mark you already have got in the 1st term then you do not need to repeat that. Your final mark will average the mark of both semesters "no strings attached".

Both exams will follow a similar format than the ones on the blog (sorry but old links may not work).
 

Improve your Spanish while learning cryptography


Manuel Lucena is a professor from Jaen University who has a great book on cryptographic algorithms and who is kind enough to provide us a free PDF version.

There is only a catch on this offer: it's only available in Spanish. What a good opportunity for practicing your newly acquired skills!!

Contrary to what happened in the classroom, the book provides a detailed view of many cryptographic algorithms, including DES, IDEA, AES, RSA, ElGamal, DSA, ... etc

Update:
For those of you that still prefer a book written in English you can download this one. Though a bit aged it is still a very solid book.
 

Put your crypto skills to work


For many of you [non-Spaniards] this might be a more difficult challenge as Spanish knowledge can help. Can you discover what is the hidden part of this message?

You are welcome to bring the solution to the class and I'll pay you a coffee.

For more challenging proposals you can go to this contest.
 

Last two chapters


Chapter 6 and Chapter 8 are the last chapters of our course. There is not much time left and we will skip some of the sections, please stay tuned to get the details about what is left out.

Lab#10

This is the last lab of the course. Click on the title to get the file.

More info here.

Easter Fun


Now that we're approaching the end of the course you might be eager to see the whole thing in action. There is no better way to learn anything that when you're facing the task of building a working system. And I mean to build all of it!

Most of the time you work on a personal computer. Not the hardware or the operating system are part of what you have to build. In an extreme case you might be rebuilding the kernel of the operating system you're running.

If you like hardware and to experiment I propose you to get one Arduino board and a LAN adapter for it. I've used in the past the ones I'm referencing and I've found that seller the cheapest option at the time.

To get things running you'll need to download the software library for the LAN card plus the Arduino IDE appropriated for your computer (OS X, Linux or Windows).

Arduino is an easy-to-use low-cost "open hardware" microcontroller board around ATmega168 chip. USB bus server to both power the board and download developed code to it. Many extensions are possible and the LAN card adds a simple Microchip LAN controller to Arduino. All the source code you see is all what's available: no operating system below, no hidden strings, just the bare source of the library.

Lab#9

Click on the title.

Error checking (kind of)

If you want to know the character (for error control purposes) of a Spanish identification document, just perform the modulo 23 operation over the DNI number. Then use the next table. That's it.

0 T 12 N
1 R 13 J
2 W 14 Z
3 A 15 S
4 G 16 Q
5 M 17 V
6 Y 18 H
7 F 19 L
8 P 20 C
9 D 21 K
10 X 22 E
11 B



And if you want to get a better idea about how CRC works you can visit this old post. There is a detailed Wikipedia article too.

Chapter #5 slides

Oops, I've almost forgot to post it here. You can click on the title to get the file.

Lab#8

Just click on the title.

IPv6 survey result

It was published recently on NetworkWorld site. ISP's are not seeing a big business drive for IPv6.

Sample implementation of assignment#3

You'll need it if you're planning to do assignment#4 but you did not do #3. Source code is available here. It consists of a main class and three additional classes one for each server (peer, query and file server).

Better late than never

After some questions I've learned that I mention nowhere what the expected command-line parameters order for #3 and #4 is. Three are the parameters you need: port number, shared folder and initial peer, like this:

$ java P2P 7123 ./ 158.42.53.17:7777
| | |
port | |
folder |
initial peer

I just thought this afternoon that a test tool might come in handy for you to test your assignment #3 servers. So here you have such a tool. Please remember a full implementation of a peer was also available (as another way to test that your server works nicely).

The test program is intended to be run in the same computer as #3, so you only need to provide the port information.

$ java P2Tester 7777
>>> CONNECT OK
158.42.53.17:7777
158.42.53.17:8899
1.1.1.1:1234

P2P.class
QueryServer.class
ListManagement.class
Peers.class
FileServer.class

>>> READ FROM FILE (first ten bytes): FileServer.class
ca fe ba be 00 00 00 32 00 72
Please note the output above shows the expected behaviour where you have three sections. On the top it is the peer list, after connect ok message that tells you the three server ports are open (p, p+1 and p+2). Next you have the list of filenames (only if your code reacts this way to an empty line query, something mine does) and in the third place you have the first 10 data bytes of the filename that appears last on your file list (FileServer.class).

Please note the file is not read from the filesystem but sending a file download request to your server listening on port P+2.

Also note that peer 1.1.1.1:1234 might not appear on the peer list till you run test program twice.

Do not use an empty folder for your P2P server: share some files!!

Last assignment is out


Fourth and last assignment completes the P2P software you started building on #3. Therefore you'll need to add the #4 code to the one you wrote for #3. If you did not do third assignment but you'd like to attempt the fourth, please contact me for a reference implementation for third assignment (once #3 due time has expired).

This last assignment takes care of the user interface of the peer to peer program, that allows the user to search for files on the network of peers and to download a file from a peer. It also takes care of maintaining a "live" list of active peers (pruning it when a peer is found not responsive).

Due date is April 30th, 2009.

Assume command line information is correct.

Lab #7 available only in Spanish

Just click on the title to get the file.

IPv6 addresses problem

IPv6 is proposed as an almost unlimited source of addresses to overcome the IPv4 address shortage some people have suggested. As IPv6 addresses are 128-bit long, 2^128 (aprox 3.4 x 10^38 ) addresses are possible. This should be large enough.

To put things into perspective consider the following problem: How many IPv6 addresses could you put into each squared centimeter of the planet? (Assume the Earth is a regular sphere of 40.000 Km of perimeter).

And a second part ... compare the above number of IPv6 addresses per square centimeter to the total address space of IPv4.

Fragmentation exercise


A 4000 byte-long datagram has to be transmitted over a network whose MTU is 512 bytes. Determine the number of fragments and, for each one of them, write down the fragment offset field contents and the number of data bytes of each fragment.

Solution was presented as a spreadsheet in the class. Here you have a copy. You can export it to your favorite spreadsheet software too (to see the formulas).