Friday, November 15, 2019

Vigenère Cipher C Program

Vigenà ¨re Cipher C Program Write a C program to implement a Vigenà ¨re cipher. You may use whatever IDE you wish but the program must be compile with the standard gcc compiler. Your program should give the user the option to either encrypt or decrypt a message. The user should be prompted to enter the passphrase to be entered and the keyword to be used in the cipher. The output should be text printed to stdout. Comments should be used to explain the rationale behind the design of your code. You must also provide a critical analysis as to the robustness of the Vigenà ¨re cipher and provide a recommendation as to whether or not it would be it would be sufficient for use in communications between colleagues within a non-technical environment. C Programme /* Vigener Ciper*/ /*This is the program to Encrypt and to Decrypt the text using the Vigener ciper method*/ /* User has to choose the option either to Encrypt or to Decrypt */ /*The user has to enter the text to be Encrypted and the Key to*/ /*The user has to enter the Encrypted Text and Key to Decrypt the text*/ #include #include main() { int select;// variable declairation int i,j; char passphrase[256]; char keyword[33]; int value; while(1)// infinite loop { printf(n1.Encrypt n);// Display options for the user printf(2.Decryptn);// Encrypt or Decrypt scanf(%d,select);// read the option selected if (select == 1) { printf(Please Enter Message to be encryptedn);//text to be encrypted scanf(%s,passphrase); printf(Please Enter keywordn); // key word scanf(%s,keyword); for(i=0,j=0;i { if(j>=strlen(keyword))// repeat the key word { j=0; } value = (((passphrase[i])-97)+((keyword[j])-97)); //logic (passphrase+key)%26 printf(%c, 97+ (value %26)); // display Encrypted text } } else if (select == 2) { printf(Please Enter Encrypted Message to be Decryptedn); //text to be decrypted scanf(%s,passphrase); printf(Please Enter keyn);//key scanf(%s,keyword); for(i=0,j=0;i { if(j>=strlen(keyword)) { j=0;// repeate the key } value = ((passphrase[i])-96)-(keyword[j]-96); //logic (passphrase-key)%26 if( value { value = value * -1; //make the value positive } printf(%c,97 + (value % 26)); // display dencrypted message } } else printf(Please Choose a correct optionn); } } Introduction The c-program gives the user to choose either to encrypt or to decrypt a message. The user will be prompted to enter the passphrase to be entered and the keyword to be used in the cipher. Vigenere cipher is a form of polyalphabetic substitution cipher which is used for encrypting a plain text. Vigenere cipher can be explained by Caesar cipher method of encryption. In a Caesar cipher encryption method, every letter of the plain text is shifted to some number of places where as in vigenere cipher every letter is shifted with different shift values. Method of Encrypting and Decrypting The logic to obtain the cipher text by vigener cipher is by modular addition of plaintext and repeating keyword. The formula for the encryption is as follows C(i) = T(i) + K(i) (mod 26) C(i) i-th letter of the cipher text T(i) i- th letter of the plain text K(i) i-th letter of keyword (Key word will be repeated at its end) Similarly, the logic to decrypt the message is by modular subtraction of Encrypted text and keyword The formula for the decryption is T(i) = C(i) K(i) (mod 26) C(i) i-th letter of the cipher text T(i) i- th letter of the plain text K(i) i-th letter of keyword (Key word will be repeated at its end) The flow of the c- program is explained by the bellow flowchart Flow chart for the C-program 1. Encryption Flow chart for Decryption Function Robustness of the vigenere cipher When the Vigener cipher was first invented and came into use, it was difficult to break as it uses 26 different cipher alphabet. Vigenere cipher is a polyalphabetic cipher and these kinds of ciphers are difficult to decipher because of their resistance to letter frequency analysis and the same text will not be encrypted with same key each time. In the year 1854 a British cryptographer Charles Babbage found the method to decipher the message. The vulnerability for vigenere cipher is repetition of key When a word in plain text repeats it gives the hint to guess the length of the key Once the length of the key is found it is easy to crack the vigenere cipher The above example illustrates how the vigener cipher can be cracked. The plain text used in this is maths is short for mathematics and keyword used is key. Since the plain text contains the word math twice, cipher text also contains the same encrypted text WERR twice with 15 letters apart. Now it can be guessed that keyword must be a factor of 15. 1,3,5,15 are the factors, if it is 1 then it is simple caesar cipher , key word cant be of 15 letter in this case, between 3 and 5 it can be found easily by closely analyzing the ciphertext. Recommendation Considering the colleges within the non-technical environment Vigenere cipher can be recommended because, As the vigener cipher is difficult to break since it uses 26 different cipher alphabets. The method of encryption is difficult to understand by non-technical people. Without the key, it is difficult to decrypt the message Conclusion Vigener cipher is implemented by using the c-program and the flow of the program is explained with the help of flow chart. Vigener cipher is critically analyzed and its robustness is explained. Recommendations are made on use of this method for the communication between colleges in non-technical environment.      Ã‚   Reference http://crypto.interactive-maths.com/kasiski-analysis-breaking-the-code.html

Wednesday, November 13, 2019

European Integration Essay -- essays research papers

  Ã‚  Ã‚  Ã‚  Ã‚  After the tragedies of World War II, European leaders have made striving efforts to prevent such a catastrophic event from occurring on their continent again. The best solution seemed to be highly mechanized cooperation among the highest European powers to assure that future conflict, and perhaps war, could not arise between them. If all the states ran themselves in a manner cooperating with their neighbors, conflict could be avoided. To prevent other nations from not cooperating, treaties and institutions would have to be designed for each area of international interest such as trade, communications, security, and so forth. As the century progressed, more organizations, institutions and associations were developed and soon leaders recognized that maybe more good could come to Europe as a whole if cooperation as such could grow and eventually arrive at full European integration.   Ã‚  Ã‚  Ã‚  Ã‚  The â€Å"establishment of the European Union in November 1993 reoriented the European movement .† The union incorporates a good portion of Western Europe and fundamentally acts as an enforcer of all the agreements the included nations make with each other in terms of trade and the â€Å"economic, political, and social stabilization of the entire continent .† As we seem to get closer to Europe’s achieving integration, the actual possibility of it ever really occurring has been in constant question among scholars. Liberals believe that cooperation on the level of integration is very possible and likely, as each nation essentially desires to maximize its own individual gains, and each nation gains more by cooperating more and banding together as one â€Å"state†. However, as constructivists remind us, we cannot neglect the element of identity in this equation. Thereafter, we must recognize that lately it is more popular for nations to fig ht for their own established identity rather than to create a new one for the good of maintaining peace in their new state as we have seen in so many Eastern European countries. Therefore, as realists would agree, integration is in reality impossible due to the trend of nations to protect their individual sovereignty and at the fear of losing it, move towards more nationalistic regimes.   Ã‚  Ã‚  Ã‚  Ã‚  Liberals believe that nations inherently wish to cooperate as it benefits both actor... ...ative gains. They can never know each other’s intentions, and won’t risk the cooperation if they think they can gain more in the future from conflicting.   Ã‚  Ã‚  Ã‚  Ã‚  Furthermore, as in the Balkans or in Russia we have seen how disinclined nations or ethnic groups are to ignore their own unique national identity in order to create a new identity of the newly established state. Richard Caplan and John Feffer note that, â€Å"nationalism has been embraced as a bulwark against the erosion of cultural diversity and popular sovereignty in the face of creeping federalism .† New ethnic conflict arises and peace is far from realized as a result of integration. The potential European integration would suffer a similar and most likely greater effect. In the long run, integration, if actualized, would not lead to a peaceful and trusting state as hoped, but instead a brand new set of ethnic and nationalist conflict. This is a risk most states are probably not willing to take.   Ã‚  Ã‚  Ã‚  Ã‚  As we have seen on smaller scales in newly integrated democratic states in Europe today, nationalism is not a dying epidemic. In fact, ethnic and nationalist conflicts

Monday, November 11, 2019

Walt Whitman

I chose Walt Whitman for my biography report because Mr. Farlow said that if I wasn't going to take this class seriously and pick a real poet I might as well not come to class anymore. Walt Whitman was an awful child molester who was born in ancient Hong Kong. He is over 3,000 years old and remembers the names of all the forgotten Gods. Walt Whitman is 90 stories tall, and his adventures are legendary. With his blue ox, Emily Dickenson, Walt Whitman traveled across young America and helped the nation greow into the angry powerhouse it is today. He dropped his mighty axe, forming the Grand Canyon; the apple cores he would spit from his mighty mouth planted apple treees all acoess the country; and the stomp of his mighty boot caused the stock market to crash. He and his friend, Huck Finn, traveled down the Mississippi river and freed the slaves. Walt Whitman believed that the only good Chinaman was a dead Chinaman, so he went to Tiananmen Square and gave them all candy. Except instead of candy he killed them. Walt Whitman's might seem like a real cool guy, but in reality he's a whiny. His Livejournal, which he doesn't think anyone knows about is full of whiny goth poetry. His Current Mood is always â€Å"Apathetic† and his music is always some obscure punk band that no one has ever heard of. SOme people who pretended to be his friend so they could get access to his â€Å"friends only† posts grabbed some of poetry and made a book from them, and called it â€Å"Ode to Faggotry. When tehy found out other goth kids would actually read it, they changed the name to â€Å"Leaves of Grass† and it sold like gothcakes. Walt Whitman to this day doesn't know they're selling his poems andmaking a fortune off him. They still don't invite him to any parties though, because no one likes him. Walt Whitman died a lonely man in Walt Disney Land. He was on the gondola ride, and he fell out because he wasn't fastened properly to the restraint. Thanks to his dumb, now none of us can ride it anymore. Thanks a lot Walt Whitman.

Friday, November 8, 2019

News and Houses

News and Houses News and Houses News and Houses By Maeve Maddox Lately I’ve noticed that several announcers on NPR (National Public Radio)both national and local announcershave taken to pronouncing the word news as [noos]. U.S. and British speakers usually differ in the way they pronounce the vowel in news. Most U.S. speakers say [nooz]. British pronunciation is [nyooz]. The pronunciation [noos] is a new one on me. Long before I heard [noos], I began to notice a shift in the way some U.S. speakers pronounce the words house and houses, pronouncing the [z] of the plural as [s]. I first noticed it in the speech of Chicago speakers, but now I hear it in the national media. House is pronounced differently according to whether it is a noun or a verb. â€Å"Let’s paint the house pink.† (noun) Used as a noun, house is pronounced [hous]. The plural of house is houses [hou-ziz]. â€Å"Relief services must house all the homeless storm survivors.† (verb) As a verb, house is pronounced [houz]. House has an -ing form that can be used as either a noun or a verb: â€Å"Local hotels are providing temporary housing for the survivors.† (verbal noun) â€Å"FEMA is housing the survivors in mobile homes.† (present participle) The pronunciation of housing is [hou-zing] Several rules govern the pronunciation of the letter s in English. I’ll mention only the ones that apply to news and houses. houses If the last consonant sound of the word is a sibilant sound like [s] or [z]), the final sound is pronounced like an extra syllable: [houz-iz] news If the last letter of the word ends in a vowel sound (e.g. bees, flies), the s is pronounced [z]. Don’t let the consonant letter w in news fool you. English has many more vowel sounds than it has vowel letters. The w in news belongs to the vowel digraph ew, the vowel sound heard in news. Such handy rules for the pronunciation of s at the end of words do not exist for s in a medial position. Those you must learn on a word-by-word basis. When in doubt, consult a dictionary. Interesting side note: One of the announcers on my local NPR station pronounces noon as [njun] instead of [noon]. She says that a program is on â€Å"from 11 a.m. to [njun].† I’m waiting for another announcer to do it. I think this kind of thing may be catching. Want to improve your English in five minutes a day? Get a subscription and start receiving our writing tips and exercises daily! Keep learning! Browse the Spelling category, check our popular posts, or choose a related post below:Useful Stock Phrases for Your Business Emails20 Pairs of One-Word and Two-Word FormsDouble Possessive

Wednesday, November 6, 2019

Depression and everything that comes with it essays

Depression and everything that comes with it essays Depression and Everything That Comes With It Depression is something that most people will experience at some point in their life (Patterson, 1). It can be a result of an external or internal influence. Depression can last for minutes or years. There are many different kinds of depression that can strike at any time. Depression can make its victim cry or commit suicide. The goal of this paper is to explain the different kinds of depression, their different symptoms, different ways to deal with them, and other important information needed to understand this illness. There are many different kinds of depression. The most inclusive type is termed major depression. The defining factor of major depression is that it interferes with a persons ability to work, study, sleep, eat, and/or enjoy once pleasurable activities (webmd.com/). This is the type of depression that most people will encounter in their life. Major depression has been found to be more prevalent in homosexuals because of their feelings of being unaccepted (202, Solomon). Major depression can be triggered by grief, interpersonal disputes, role transitions, interpersonal deficits, or nothing at all. Typical treatments include antidepressant medications and psychotherapy. Another kind of depression is called Dysthymia. Dysthymia, or chronic depression, usually last for a substantial period of time (webmd.com/). The difference between Dysthymia and most other kinds of depression is that Dysthymia typically does not interfere with everyday life and functions. Symptoms of Dysthymia are the same as major depression, yet less strong, hence the ability to function adequately. These observable symptoms include difficulty sleeping, loss of interest in oneself, feelings of guilt, loss of energy, difficulty concentrating, changes in appetite, mental and physical sluggishness, and thoughts of death or suicide (Solomon, 2...

Monday, November 4, 2019

Americas involvement or lack of during the holocaust Essay

Americas involvement or lack of during the holocaust - Essay Example This German policy led to the massacre of millions of Jews during the 1930s. Yet the U.S remained aloof from the situation in Eastern Europe. Several views have been highlighted to defend the role of US in the holocaust. Some state that the country was adhering to its foreign policy rules. Many suggest that it was ignorance or simply denial of the original facts. Many also state that the anti Semitism was behind the non involvement of the US in the European affairs. In this paper I aim to discuss the various theories behind the non involvement attitude of the US towards the holocaust. I shall explore every theory with different angles thus highlighting the underlying factors behind the lack of involvement of the United States in the Eastern European affairs during the holocaust. The paper will highlight the motives which led one of the most influential nations of the world from keeping away from the international affairs of other countries. The Americans did not involve themselves in rescuing the Jews from the German persecution partly because they had adopted the policy of isolationism which stated that they would not get involved in other countries international and domestic issues. Although many claim that the US was unaware of the mass scale killing of the Jews, still some information was provided to the government. The government however decided not to interfere in the matter. According to the online holocaust encyclopedia, in August 1942, the US State department received a cable which confirmed the Nazi plan of killing all the European Jews. The report was sent by Gerhard Reigner, a representative of the World Jewish Congress in Geneva. A copy of it was also sent to an American Rabbi, Stephen Wise, who was asked by the government not to raise an issue about it. The report was also not shared with the other government officials (Holocaust Encyclopedia, 2008). In another incident a Polish courier Jan Karski

Friday, November 1, 2019

Statement in support of application Essay Example | Topics and Well Written Essays - 500 words

Statement in support of application - Essay Example I worked hard to gain much necessary work experience while I was in college. This hard work let me serve as a journalist in many local and international Arabic papers. Although I worked hard to gain work experience, I did not neglect my studies. I put much effort into learning English, and into getting good grades. Also, I put time into extracurricular activities, like the Kuwait Environment Society and the Human Rights Society. After graduation, I became a correspondent for Saudi Research and Marketing, between the years 1998 and 2000. I then moved on to become a strategies and policies researcher for CSFS in Kuwait, and stayed in that position until 2001. Then I became a deputy director for the same company in 2001. In 2002, I became the acting director for CSFS (I also became a freelance media and public relations consultant at that time, and am continuing doing that to the present) until 2003, when I then became the director for research and public relations for Kuwait University. Starting in 2004, I was then promoted to Vice Chairman of the media group. I then became a public relations and media manager for an investment company. As you can see, my work experience is varied. I have done basic things, such as editing reports, press releases and spread sheets, but my later work is what I am proudest of.