Showing posts with label Introduction to Cryptography. Show all posts
Showing posts with label Introduction to Cryptography. Show all posts

DES.

Trying out my Crypto assignment 3. But I haven't found the answer to anything yet huhu. But I sort of know how DES works now, thanks to D, who helped to explain it through the phone huhu. She explained willingly when she called my room, I didn't have to ask. I tell you I've the nicest coursemates, like everrr~ Never in my entire school years dariku damit sampai uni years have I found people inda karit ilmu as the lots I hang out wit in my course. Sampai aku plang rasa guilty of taking up their time to help me, when most of the time it wasn't even me who even asked for help, pasal aku ego sikit kan~ =P and malas jua kan nyusahkan urang. Huhuhu. They often ask me how I'm doing and ask about my work and then when ku say I'm stuck with this and that, abis tia segala jenis pertulungan datang arahku. So nice ah. They also commented on my decision, and said that they can help if I need help on my studies and that sort of stuff, but I told them how will I learn things myself if I get people to help me on everything? =)

So anyways, DES. Ada 6 steps. And then the 6 steps repeated for 16 times. DES mula2nya plaintext of 64 bits. Then you split into half, so jadi 32 bits. So now there's two 32 bits, one left one right.

The 32 bits on the right side will be processed. First, the bits go through Expansion Permutation, where durang kana expand jadi 48 bits. Then each bits are XOR-ed with the round key, which is also 48 bits. The output will still be 48 bits, and then you split the bits into eight lots, which means 6 bits each lah ah. Then each 6 bits will be passed through S-Box, which is substitution box. Ada 8 S-Box altogether. Then the output from each S-Box will be 4 bits, which means the total bits from all 8 S-Box is 32 bits (which is macam amount of bits yang mula2). Then the 32 bits are combined and permuted. And finally, the permuted 32 bits are then XOR-ed with the initial left half that didn't go through the DES round tadi, and when they're XOR-ed, the result will be a new right half, then the process will be repeated for 16 times lah. Then after 16 rounds, we get our ciphertext.

So the steps tadi:
  1. Expansion permutation - 32 bits expanded to 48 bits
  2. Use of Round Key(48 bits) to XOR with result of (1)
  3. Splitting of result into 8 lots of 6 bits.
  4. S-Box - outputnya 4 bits each, which total up to 32 bits
  5. P-Box - combine everything, so 32 bits, and permutate.
  6. Feistel Part - XOR with left half to get new right half.
...and repeat sampai sangal... 16 kali plang saja.

I've checked the past year exam papers for this module yang since 1998, and yang ani usulnya rajin keluar. Bah baiktah ingati kali.

But assignment ani cana ni? Inda jua bekaitan ni dengan apa yang ku explain tadi. Apatah jawapannya ni? =/

Tata.

One Way Or Another.

Had my second Law and IT test and I got 50% saja. Aih, banartah, I should bring my laptop to next test so that I can search for words and answers easier. Mun laptop ani cute and feather-light inda jua ku kata2 kan membawa kali, ani sebasar2nya and sebarat2nya kan diangkut. But anyways Law and IT has got to be my favourite subject, cause the lecturer's so cali and baik and semualah. If u noticed ada sometime in previous post aku gitau aku macam keboringan this module, but I think I like it now. And it's by far the easiest module in the course jua masa ani so yatah ku suka. =P

I don't like C.. truly terribly hate it. Well maybe I don't hate the language, but the way things are assessed, I feel are just not fair. You see, the way the tests and assignments are assessed are cemani, in tests you have to submit your program within 2 hours. And you've to get it to work perfectly, or else you won't be allowed to submit it. So if your program's not working 100% you won't get the chance to submit, hence you don't pass lah the test. And lagi kadang2 telimpas time 2 hours, then you can't submit it. So it's either you get 100%, or you get 0%. So far for the two tests I got 0%. Gila bah!! I dun mind the first test as masa atu aku blank, but if the second test was to be marked secara baik hati dan munasabah sikit, I could actually get 50-60%, ganya I couldn't finish the last part, sekali nda tesubmit jua. =( And as for the assigments.. samalah jua. Ngalih ku kan explain lebih lanjut. Tapi that's the thing. When you put in so much effort, but sometimes just for one silly mistake, you get 0% tarus. To be honest my first assignment atu 100% plang tu, ganya I forgot to compile it with all the extensions yang dimaunya so ada segala warning2. Sekadar jua eh. And the second one, if it was to be marked part by part, I guess I could've had 70%. But... malasku kan cakap.

Bah bebahasa melayu ku dulu, karang manatau testumble upon this blog ka secara kebetulan segala tenaga pengajarnya, kana banci ku tarus huhu. Sekali I went to see personal tutor tadi to discuss an important matter, and had a good session of meluahkan perasaan inda puas hatiku lah tarus. I talked about how I feel pasal cara marking yang inda fair etc2. And my tutor even said that most people do complain about that the strict marking atu plang. So it's not just me ok? And then aku komplen pasal lecturer ku arah this one module yang ku inda suka =P But of course I asked him first if our conversation tadi atu confidential kah inda, hehe. So I complained about how the lecturer sorang ani sedikit intimidating orangnya, and payah kan approach usulnya, and how sometimes ia nampak annoyed when people ask what's probably an obvious thing to him. And tutorku kenal siapa ku cakapkan, even when aku malas kan gitau namanya mula2. =P I mean banar jua tu, people ask when they don't know. What's obvious to one person may not be to another so mun urang btanya benda simple pun kan teroll2 eyes, baiktah branti keraja. How do you expect people to learn something when they don't feel comfortable enough to ask you something cause all you do is roll your eyes and show this annoyed face when people ask you a somewhat simple question. Kurik karang biji mata ah. Canatah urang kan contribute tu mun urang inda bleh silap cakap in class? Entah eh. Sekali ku mengadu lagi how the lecturer inda ada reply to emailku yang ku betanya pasal something. I said the least he could do was reply me with a "yes its ok" or a "no its not ok", rather than inda reply langsung and leave me curious. Canakan tu?? Barutah ku telarah tejumpa lecturer catu atu. Kejam dan segala2nya. And I complained about the workload that's neverending menimpa2. Every week kan test, every week ada saja assignment kan disubmit. Nyangku baru sebulan sudah tia tahap stressku cani ani. Then he mentioned about all the other people yang sama jua didn't do well in the tests and assignments, and some of them are intelligent people nya and they even found certain2 modules payah. Sekali ku gitau lah yatah tu jadinya mun sudah yang pandai2 belaka atu pun pandai kan fail, aku ani apatah lagi nyangku. Then I told him pasal the other international students atu are private students. They pay their own fee. I told him I feel more pressure pasal bukan aku bayar sendiri ni. Mun ku bayar sendiri sekati ku lah kali ah, usinku. Sekali he said banar plang, and one of the modules right now, Crypto is one of the hardest katanya, and next term ada Advanced Crypto, which is lagi difficult katanya. And he showed me past years exam result of Advanced Crypto, and luluh hatiku meliat.. so many reds! Intro Crypto ani sudah ku gone haywire in the first month, malas ku imagine cana kejadianku mun Advanced Crypto nanti. Menulis pun inda lurus kali lagi. So after about one hour talking and a bit of crying, I came to my decision and he somewhat agreed. Oh, nada plang ada apa2 yang penting sangat. I'm quitting my course ganya. =P

A little note from me. As human, we're bound to make wrong choices. There are people who force themselves to live with their choice just because they're too worry about what others might think of them if they do something about it. As for me, I found out I made the wrong choice by coming here, and therefore I'm gonna look for what I hope is a better one before it's too late. Why do we have to care what people have got to say? Well you know, it's human nature. Of course people will talk about you when you do something that they don't see themselves doing, but they'll grow tired and stop eventually, and move on to talk about other people. I don't know about you, but when I know I can choose, I choose to not do things that don't make me happy, and I don't like to wait until it's too late. Besides, it's not like I didn't try it at all. I tried it, I didn't like it, so I'm gonna move on. I may not know if the next thing will be better, but life are full of choices, and as I said, we human are bound to make wrong ones, but that doesn't mean we've to stop making choices.

Bah tata!!!! Kan buat assignment ku! Sama kan prepare jawapan lagi mun reporter2 betanya. =P

*lari sebelum disoalsiasat pihak2 yang tidak berkenaan.*

Week 3 of 12 - 4

I've finally finished my Cryptography assignment! I don't know how I managed to do the last question though, macam aku stress dari siang tadi sudah, sekali ani tadi I was taking a break from it and somehow things just popped in my mind tarus2 and then when I tried it, it worked! huhuhu... Macam aku suka. =S

Bah gotta read for my Law and IT test tomorrow!

Tata people.

Week 3 of 12 - 1

So I've formed a group with 4 other people for Information Security assignment. 3 of us are in the same course, and the other one in his final year in Computer Science degree. Task 1 is done, which is to email the names to the lecturer and think of a topic for the assignment. We're thinking of doing an article/report on Access control of biometric methods. Let's hope the topic will be accepted by the lecturer. The pages must not exceed 12, excluding title page and bibliography. Task 2 is to prepare bibliography and abstract and show them to the lecturer nanti. Oh and the report will be 40% of the course. 60% lagi from exam. Well, good luck to us!

I'm still working on Cryptography assignment, and Alhamdulillah I've finished 3 out of 4 questions. Due date is 22 October so hopefully I get to finish the final one! I've got Shift cipher for question 1, Vigenere cipher for question 2, Substitution cipher for question 3 and Permutation cipher for question 4. Yang alum siap ani Permutation cipher lah. I don't know whether the texts are divided into 5, 6,7 or probably more?? Well yang ku sasak is that for something so hard (At least I think it is. But most people find it hard too so believe me, it's not just me.), the assignment is only worth 4%!!!!! But I think the fact that I know what type of cipher one is just by looking at the frequency analysis is one step towards being handal at it huhu =P Just the part of deciphering atu yang bagi stress. But since this is the first assignment, I'm thinking this is actually the 'easiest' part of the course? =( The first, and already I'm looking and feeling like pffttt... Hope I can survive the other assignments and the test. Again, good luck to me!

And of course, C, another work to do. Hope I can manage to do that by this weekend before next week's test. And I hope I'll do well in the Law and IT exam! It's an open book test, and I think(and hope!) I can answer them cause as I've mentioned somewhere in the blog, I've learned something similar twice before in Teesside and Aston. Hope the questions are easy tooooo but since it's an open book, I doubt it. I don't know about you but everytime I have an open book test, I can't seem to find the answer to the questions in the book ani bah. Macam inda pedah2 jua mbagi open book test rasaku. Oh well. Good luck me! =)

Oh and today I skipped my Information Security lecture which was at 3. It was because I was sleepy since the morning lectures, for both 9 and 11 am lectures, and I stayed for C Programming lecture at 2, and I was also sleepy by then. Tapi ani baru first time ku skip class ni, banar inda tipu =P Can't make it a habit though =( I think as of next week I'll get a coffee right before afternoon classes on Monday and Tuesday. The coffee in the vending machine only costs 60p so I think I can manage to fork out 3.60 a month for coffee kan?

Tata.

Many Many.

Fuh... Finally submitted the C assignment. Crazy I tell you. It was so hard for me to understand the question, and I didn't even understand the stuff being explained in the module forum. Macam, sakit jualah kepalaku mikirkan. Then I went to ask for an explanation from this one guy in my course, then faham tah ku soalannya, then it was ok for me. Ganya my room was in a complete mess with papers everywhere bakas scribbling codes and numbers and whatever. Even notebook yang standard size atu pun abis dah separuh bakas menulis2 codes ganya, cause see, I scribble big. And inda cukup paper, the Note application in the handphone pun ku pakai to text in codes before I go to bed, manatau lupa esuknya. Huhu way too much thinking, and it's only week 2! I'm happy about the assignment, BUTTTTTTTT I'm not about the test yesterday. I failed the test yesterday. Alum plang ada resultnya but confident jua ku membagitau ni because I didn't even get to submit my work. =S And I didn't get to submit it why?.. Because my program didn't work. Eh I mean it worked plang eh, but gave results which were absolutely unrelated from what was asked for. Ahahaha. I don't know why I'm laughing. It's not suppose to be funny. =| It asked for the initial number that gives out the longest hailstone numbers sequence. Part of it was from the exercises I did last week, tapi dah atu kana tweak sikit the question. And I don't know apa kah kejadiannya code ku atu. Malas jua ku mikirkan lagi bah. So I spent two hours in the lab for nothing, not even for attendance. It's as if I didn't come for the test at all. Apparently mun codingmu working and correct, then you can submit the test, and then barutah kana tick nama. Cam apakan... =S Ah well, there'll be some other tests to not look forward to.

I still haven't found any group to be in for Information Security assignment! Ngalih ku eh kan tanya2 sapa yang alum ada group... =S And I hope if I do find some people, they'd want to do the same topic as what I want to do, tapi kan alum plang ku tefikir kan pilih which topic. Yawns.

Tomorrow I'm gonna start on Cryptography assignment. Took a look at the first question and tried to solve it few days ago but macam inda tesolve ulihku. And there are 4 questions altogether. Kepisan eh. Bejurit keratas tah lagi ni esuk2 bilikku.

Tata.

Hoping to Move Faster.

Starting to stress out sudah. Lots of things to do for the coming weeks!! =( I've C practical test next Wednesday and an assignment due Friday. And another test for Law and IT on next two Fridays. Then I have Introduction to Cryptography assignment, which is due on 22/10, and for Information Security I still have to come up with an assignment topic and form a group by 21/10.

TAKUTKU EH T_T.

I'll update when I get some of the things done... ta................

I Still C.

Believe it or not, I'm still stuck on the prime number thingy on C. I haven't spend much time on it either. =S The calculation works so far but it doesn't print the amount of prime numbers the user wants, but instead it loops for the number of times the user wants the prime number to be printed and omit all other numbers and print the prime numbers up to the number of times wanted. If that makes sense. Gonna have the lab session for three hours later on at 1 so I'll try to figure it out karang lah lagi. Ani relek lu kajap ok.

I've had the lectures for all the modules I'm taking this term sudah. The modules I'm taking for this term are Programming in C, Introduction to Cryptograhy, Information Security, Law and IT, and Mobile and Ubiquitous Computing. My thoughts so far.. Well I don't think I'll favour Law and IT, cause I've learned something similar in Teesside and Aston. Inda ku suka ni belajar benda sama brabis ani. Payah lagi tu. Mun sanang inda jua papa =S Obviously it's about law thing lah and the connection with IT. So we learn about cases, data protection law, computer law etc2 that sort of stuff. And I realised from the first time I studied Computer Law, that I'm not meant to be a lawyer. I suck at learning law. T_T Breaking the law pandai plang ku hehe.. For Law and IT, we're gonna have two essay courseworks of 3000 words. Or we can choose to do some sort of four biweekly tests and do only one essay. Or do everything and they'll choose the best marks. I'm thinking of doing everything.. essays and tests. Hahaha nadawah eksenku. =S Inda ku rajin sangat. I might choose to do one of the tests first to see if the questions are okay. Mun testnya sanang I might do tests and only one essay. I'll tell you nanti.

For Mobile and Ubiquitous Computing... kami punya lecturer very good looking lah. He even looked like a student wah masa ia masuk. And he's quite adorable in the sense as mun ia becali kiut usulnya senyum. But kawin sudah, ada cincin. Hehe. So for this module, I'm not sure brabisly apa yang kan dbuat, but something that's got to do with mobile computing obviously, and I think for the coursework we're gonna be making a mobile application. I think. If I'm not mistaken that's what he said. I was a bit sleepy yatah. I'm gonna check the handbook later on. Right now I'm not that bothered to get my details correct actually cause I'm waiting for my lab to start so ani ku saja blogging.

Bah tata.