Sunday, April 08, 2007

Second Year…Second Term

It was like a dream that make you out of breath, but you enjoy it a lot when you weak up. It was second year second term. I'm now a third year student in Computer and Systems Engineering Department, Faculty of Engineering, Alexandria University in Egypt. Our department is known as the hardest one over all faculty departments. I feel working under pressure day and night is one of our department goals besides being a qualified engineer. Sure we saw a lot of continuous work pressure over our terms in our lovely department. The most imaginary was second year second term.

Really this term our teaching assistants exceeded all rates of pressure we have seen before (at least our class). It was usual to have three or four assignments at a time in file structure, digital design, numerical analysis, system programming and/or automatic control. It was more wonderful if you work in four different groups with different circumstances, available time and working style. You can be close to madness edge in this case (which I think some of my class already reached last term).

Really this term cannot be forgotten. The main characteristics of that term was lack of study and lack of sleep. Lack of sleep is somehow obvious as we continuously work day and night. Lack of study was because of the same reason of course which may be strange when you waste study time in faculty work :D:D. I can mention many of situations faced me in that interesting term, but to keep post not very long I can talk about one or two of situations I cannot forget at all.

First is SIC/SICXE Simulator assignment, we worked somehow well in this assignment. Its due was three days after mid-term exams. As we almost don't study, before mid-term exam we were forced to ignore working in assignments and study for exams. After mid-term exams we resumed work in Simulator again which was not about finishing. When you study for exams after ignoring studying for many weeks, it makes you tired enough. Now you have to deliver an assignment after three days with new IDE you have never used before (VS.NET 2005) and you discover that coding in it is not simple as you are familiar in other visual IDEs. I and my group-mate Tarek had to work two successive days with almost no sleep (a little to still standing up). In third day, delivery day, we was so tired and nervous (lack of sleep makes a lot). But, unfortunately, we have to deliver Huffman Coding Compression Program after tomorrow :'( :'( . He was not Tarek this time, he was Amr Kabardy. We had written approximately half of code which contained many bugs. Bugs in bit manipulation are so painful. I slept for 3 hours after Simulator and wake up to begin Huffman fun. I can forget a lot of tracing bits inside program data structure and a lot of instability of compression program, but what I can't forget the last 12 hours before delivery. Delivery was Tuesday at 12:00 PM . Amr Kabardy came to my house at 12:00 AM that day to trace and finish program together. I was about madness at this moment. Almost no sleeping for 5 days is a horrible situation. We worked the whole night this day. Sometimes we work together and other times work in different tasks one on PC and the other on my laptop. The most interesting thing in that 12 hours that both of us fall asleep. When one work on computer he talked to the other but there is no response. When he looked at him, he was asleep. This situation repeated for both of us. Finally we left at about 11:30 to faculty to deliver and we delivered it better than we expect (thanks Allah). I remember that I slept much hours after that, but it was great experience with no doubt.

When we finished this term, we felt that we gained a different thing. Now we have an experience about how to work under incredible pressure, how to deliver at time and how to work with different people in different projects and quietly handle each group issues. It was a great unforgettable term.
Amr Magdy
5 / 2 / 2007

Friday, April 06, 2007

Curriculum Vitae vs. Resume

The primary differences between a resume and a curriculum vitae (CV) are the length, what is included and what each is used for.

A resume is a one or two page summary of your skills, experience and education. While a resume is brief and concise - no more than a page or two, a Curriculum Vitae is a longer (at least two page) and more detailed synopsis. A Curriculum Vitae includes a summary of your educational and academic backgrounds as well as teaching and research experience, publications, presentations, awards, honors, affiliations and other details.

In Europe, the Middle East, Africa, or Asia, employers expect to receive a curriculum vitae. In the United States, a curriculum vitae is used primarily when applying for academic, education, scientific or research positions. It is also applicable when applying for fellowships or grants.

Source:
http://jobsearch.about.com/cs/curriculumvitae/f/cvresume.htm

Related Links:
http://jobsearch.about.com/od/coverletters/Cover_Letters.htm
http://jobsearch.about.com/od/curriculumvitaewriting/a/blcv.htm

Monday, April 02, 2007

RSA -- A public-key encryption algorithm

What is RSA ? and why named like that ?

RSA is an algorithm for public-key encryption. The RSA algorithm was invented in 1978 by Ron Rivest, Adi Shamir, and Leonard Adleman and was named after them.

How RSA works ?

Here's the relatively easy to understand math behind RSA public key encryption.

1. Find P and Q, two large (e.g., 1024-bit) prime numbers.

2. Choose E such that E is greater than 1, E is less than PQ, and E and (P-1)(Q-1) are relatively prime, which means they have no prime factors in common. E does not have to be prime, but it must be odd. (P-1)(Q-1) can't be prime because it's an even number.

3. Compute D such that (DE - 1) is evenly divisible by (P-1)(Q-1). Mathematicians write this as DE = 1 (mod (P-1)(Q-1)), and they call D the multiplicative inverse of E. This is easy to do -- simply find an integer X which causes D = (X(P-1)(Q-1) + 1)/E to be an integer, then use that value of D.

4. The encryption function is C = (T^E) mod PQ, where C is the ciphertext (a positive integer), T is the plaintext (a positive integer), and ^ indicates exponentiation. The message being encrypted, T, must be less than the modulus, PQ.

5. The decryption function is T = (C^D) mod PQ, where C is the ciphertext (a positive integer), T is the plaintext (a positive integer), and ^ indicates exponentiation.

Your public key is the pair (PQ, E). Your private key is the number D (reveal it to no one). The product PQ is the modulus (often called N in the literature). E is the public exponent. D is the secret exponent.

You can publish your public key freely, because there are no known easy methods of calculating D, P, or Q given only (PQ, E) (your public key). If P and Q are each 1024 bits long, the sun will burn out before the most powerful deterministic computers presently in existence can factor your modulus into P and Q.

An Example of the RSA Algorithm:

P = 61 <- first prime number
Q = 53 <- second prime number
PQ = 3233 <- modulus (give this to others)
E = 17 <- public exponent (give this to others)
D = 2753 <- private exponent (keep this secret!)

Your public key is (E,PQ).
Your private key is D.

The encryption function is:
encrypt(T) = (T^E) mod PQ = (T^17) mod 3233

The decryption function is:
decrypt(C) = (C^D) mod PQ = (C^2753) mod 3233

To encrypt the plaintext value 123, do this:
encrypt(123) = (123^17) mod 3233 = 337587917446653715596592958817679803 mod 3233 = 855

To decrypt the ciphertext value 855, do this:
decrypt(855) = (855^2753) mod 3233 = 123

Sources and more about RSA: