Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 13 22:54:48 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBE6smud018309 for ; Thu, 13 Dec 2007 22:54:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBE6frTT010138 for ; Thu, 13 Dec 2007 22:41:53 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lBE6frLS010137 for cs531@merlot; Thu, 13 Dec 2007 22:41:53 -0800 Date: Thu, 13 Dec 2007 22:41:53 -0800 From: Bill Cheng Message-Id: <200712140641.lBE6frLS010137@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Reminder about final exam tomorrow... Hi, Just a reminder that tomorrow's final exam will be between 2pm and 4pm in VKC 101. See you there! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 13 22:53:02 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBE6r2OP018191 for ; Thu, 13 Dec 2007 22:53:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBE6e7iw010105 for ; Thu, 13 Dec 2007 22:40:07 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lBE6e7GA010104 for cs531@merlot; Thu, 13 Dec 2007 22:40:07 -0800 Date: Thu, 13 Dec 2007 22:40:07 -0800 From: Bill Cheng Message-Id: <200712140640.lBE6e7GA010104@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: CS 531 HW7 regrade... Hi all, Since we are at the end of the semester and I will need to turn in all the grades soon after the final exam, if you have HW7 regrade issues, please try to get it resolved by next Tuesday! If somehow that your regrade is in progress when I have to turn in your grade, I will have to turn in your grade. If it ends up that you should get a higher letter grade, I'll just have to file a grade change and that's not a big deal. Thanks for your cooperation! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 13 00:39:26 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBD8dQp0011890 for ; Thu, 13 Dec 2007 00:39:26 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBD8QcEu019239 for ; Thu, 13 Dec 2007 00:26:38 -0800 Message-Id: <200712130826.lBD8QcEu019239@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CS531 exam location Date: Thu, 13 Dec 2007 00:26:38 -0800 From: Bill Cheng Someone wrote: > I am sorry if this information is already available somewhere but are > we having the final exam in the normal classroom? The final exam will be in the normal classroom, i.e., VKC 101. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 12 23:09:05 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBD795Lt007173 for ; Wed, 12 Dec 2007 23:09:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBD6uIgu017809 for ; Wed, 12 Dec 2007 22:56:18 -0800 Message-Id: <200712130656.lBD6uIgu017809@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Finding the multiplicative inverse Date: Wed, 12 Dec 2007 22:56:18 -0800 From: Bill Cheng Someone wrote: > As mentioned in slides that "Extendend Eclidian algorithm is used to > compute multiplicative inverse". > ax + ny = d and gcd(a,n) = 1 then x is a multiplicative inverse of a. > I tried to used table method that is an simple implementation of > Extendend Eclidian algorithm to find > a^(-1) of 3 of Z10 that is 7, but I got x = -3. > Why I did not get 7 from table method? > On the other hand, when I -3 is congruent to 7 modulo 10, so they are the same thing. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 12 23:06:05 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBD765SO007058 for ; Wed, 12 Dec 2007 23:06:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBD6rHsj017732 for ; Wed, 12 Dec 2007 22:53:17 -0800 Message-Id: <200712130653.lBD6rHsj017732@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: quadratic residue Date: Wed, 12 Dec 2007 22:53:17 -0800 From: Bill Cheng Someone wrote: > I have a question on Example 2.138 > > Give n = 7 (= 3 * 7). > > To calculate Q21 and ~Q21, we need to first calculate Q3, and Q7. > When we do that we calculate a = /A^i /mod 3 and a = /A^i/ mod 7 (upper > case A is alpha) > In doing that, we'll never get an a which is greater than or equal to 3 > and 7, respectively. > > On solving this, Q3 = {1} (generator=2) and Q7={1, 2, 4} (generator=3) > > However, Q21 = {1, 4, 16} > So how do we get 4 and16 here?? This is explained on slide 6 of the "generating prime numbers (part 1)" slides. If you have an old printout of the original slides, please make sure you get the current one from the web! The current slide has the following at the bottom of the page: 1, 4, 16 are in Q3 since they are all congruent to 1 mod 3 1, 4, 16 are in Q7 since they are congruent to 1, 4, and 2 mod 7 -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 12 22:56:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBD6uuaD006523 for ; Wed, 12 Dec 2007 22:56:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBD6i8Ee017637 for ; Wed, 12 Dec 2007 22:44:09 -0800 Message-Id: <200712130644.lBD6i8Ee017637@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: RSA computations Date: Wed, 12 Dec 2007 22:44:08 -0800 From: Bill Cheng Someone wrote: > we have given 2 primes p = 137 and q = 131 and want to compute e and d. > 1) in exam we will be supplied with the value of e? or we need to select it? In the exam, it can go either way. > 2) I selected e = 3 (as per solved example) and while computing d we > used Extended Euclidean algorithm, which returns "x" like > d = a ^ -1 mod phi ... and ax + ny = d .... where a = e = 3 and n = (p - > 1)(q - 1) = 17680 > > so in above computation we got x = -5893 > > now from here I am not able to compute d, am I going in right direction? > could you please let me know how to compute d? Actually, your x is d. You got x = -5893 = 11787 mod 17680. You can verify that x is d by computing e*d=35361 which is congruent to 1 mod 17680. It is important that you know how to verify your result so you know what you got it correct. And by the way, n is p*q = 17947 and what you calculated was phi(n) = (p-1) * (q-1) = 17680. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Dec 11 22:21:24 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBC6LO31024936 for ; Tue, 11 Dec 2007 22:21:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBC68jQq026392 for ; Tue, 11 Dec 2007 22:08:45 -0800 Message-Id: <200712120608.lBC68jQq026392@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: question about 531 exam Date: Tue, 11 Dec 2007 22:08:45 -0800 From: Bill Cheng Someone wrote: > Do you expect us to memorize the exact formula like > miller rabin, paklington theorem, AKS, maurer or just want us to know the > basic idea of them? I think more of these questions will be coming if I don't answer your question "correctly". So, let me simply say that you are responsible for all materials covered in class. Although you need to decide what's more likely to be on the test. I guess this is true with pretty much any kind of test. > I also don't understand incremental search especially random part. Could you > give me some example of it? Thank you. I certainly cannot explain a topic over e-mail and I cannot repeat a lecture. If you would like to discuss this, please make an appointment. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Dec 11 11:09:37 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBBJ9bSG021016 for ; Tue, 11 Dec 2007 11:09:37 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBBIv2Yh014923 for ; Tue, 11 Dec 2007 10:57:02 -0800 Message-Id: <200712111857.lBBIv2Yh014923@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in Stream Ciphers based on LFSR Date: Tue, 11 Dec 2007 10:57:02 -0800 From: Bill Cheng Someone wrote: > In Stream Ciphers based on LFSRs on slide 6 he Geffe Generator > diagram reveals the equation as (X1 and X2) xor ( ~x2 and X3) .. > while equation given says (X1 and X3) xor (~X2 and X3) .. So > please clarify on this. You are right that the equation was given was wrong. Thanks for catching it! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Dec 10 21:52:33 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lBB5qXu4009992 for ; Mon, 10 Dec 2007 21:52:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBB5e3te002627 for ; Mon, 10 Dec 2007 21:40:03 -0800 Message-Id: <200712110540.lBB5e3te002627@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: The period of each non-linear combination generator Date: Mon, 10 Dec 2007 21:40:03 -0800 From: Bill Cheng Someone wrote: > Do I have to remember the period formula of each non-linear combination > generator? Well, if a formula makes intuitive sense, then you should know it. Otherwise, you don't need to know the *exact* formula. But you should probably know the basic *order* of the formula. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 29 10:50:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lATIoNdn030897; Thu, 29 Nov 2007 10:50:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lATIdQIW027585; Thu, 29 Nov 2007 10:39:26 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lATIdQch027584; Thu, 29 Nov 2007 10:39:26 -0800 Date: Thu, 29 Nov 2007 10:39:26 -0800 From: Bill Cheng Message-Id: <200711291839.lATIdQch027584@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Office hour moved up by 15 minutes today... Hi, I have to leave campus early today, so I have to move up today's office hour by 15 minutes. So, it's going to be from 1:15pm to 2:15pm. Sorry about the inconvenience! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 29 09:56:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lATHuq69027767 for ; Thu, 29 Nov 2007 09:56:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lATHjtOm026986 for ; Thu, 29 Nov 2007 09:45:55 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lATHjtMV026985 for cs531@merlot; Thu, 29 Nov 2007 09:45:55 -0800 Date: Thu, 29 Nov 2007 09:45:55 -0800 From: Bill Cheng Message-Id: <200711291745.lATHjtMV026985@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Final exam time conflict with CS 555... Hi, For those who are taking CS 555 this semester, their final exam time is also between 2pm and 4pm on 12/14/07. Please send me e-mail ASAP so Prof. Neuman and I can make arrangements. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 23:52:50 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAR7qo5R031966; Mon, 26 Nov 2007 23:52:50 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR7gDWN025676; Mon, 26 Nov 2007 23:42:13 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lAR7gDPh025675; Mon, 26 Nov 2007 23:42:13 -0800 Date: Mon, 26 Nov 2007 23:42:13 -0800 From: Bill Cheng Message-Id: <200711270742.lAR7gDPh025675@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: I had to cancel office hour tomorrow! Hi, I'm sorry but I won't be able to come to campus tomorrow and have to cancel office hour tomorrow. If you would like to see me on Wednesday morning (say between 10am and 11am), please send me e-mail to make an appointment! Thanks and sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 20:09:03 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAQ493PT006656 for ; Sun, 25 Nov 2007 20:09:03 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ3wanI024411 for ; Sun, 25 Nov 2007 19:58:36 -0800 Message-Id: <200711260358.lAQ3wanI024411@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW7 doubt Date: Sun, 25 Nov 2007 19:58:36 -0800 From: Bill Cheng Someone wrote: > When we call the function BN_dec2bn(A, str), the resulting BIGNUM is stored > in **A. How do i retrieve the value from the 2-D pointer to a *A to do > addition, multiplication etc? > doing A[0] A[1] is not working. I think you are suppose to call BN_new() to get a pointer to an allocated BIGNUM. This will be of type (BIGNUM*). Now, if you pass the address of this pointer as the first argument to BN_dec2bn(), then it will be set to the BIGNUM representation of the str argument. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 24 15:32:53 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAONWr0E013291 for ; Sat, 24 Nov 2007 15:32:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAONMalv005171 for ; Sat, 24 Nov 2007 15:22:36 -0800 Message-Id: <200711242322.lAONMalv005171@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CSCI531: HW7 test data question Date: Sat, 24 Nov 2007 15:22:36 -0800 From: Bill Cheng Someone wrote: > In HW7 test data, we have, for example, > > hw7 maurer -k=10 -t=10 -p=primes.n220 -r=rnd.220 > ma.10 > hw7 maurer -k=24 -t=10 -p=primes.n220 -r=rnd.220 > ma.24 > > but the '-t' doesn't seem to be defined in the maurer cmd line > syntax. So should it or shouldn't have -t? Oops! I've just removed them from the spec. Thanks for catching this. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 23 17:47:21 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAO1lKJL007518 for ; Fri, 23 Nov 2007 17:47:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAO1bARt015399 for ; Fri, 23 Nov 2007 17:37:10 -0800 Message-Id: <200711240137.lAO1bARt015399@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW7 doubt Date: Fri, 23 Nov 2007 17:37:10 -0800 From: Bill Cheng Someone wrote: > Do I have to use BIGNUM with prime and trialdiv parts? I guess you don't *have to*. But for trial division, the input number can be very very large. I'm not sure how else you can use. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 23 17:26:19 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAO1QJSM006460 for ; Fri, 23 Nov 2007 17:26:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAO1G91P015011 for ; Fri, 23 Nov 2007 17:16:09 -0800 Message-Id: <200711240116.lAO1G91P015011@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: query Date: Fri, 23 Nov 2007 17:16:09 -0800 From: Bill Cheng Someone wrote: > Is there any way to print BIGNUM no. to console ? You should call BN_bn2dec() and print out the returned string. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 23:17:15 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAN7HFdN011665 for ; Thu, 22 Nov 2007 23:17:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAN77BuQ027186 for ; Thu, 22 Nov 2007 23:07:11 -0800 Message-Id: <200711230707.lAN77BuQ027186@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW7 doubt - trialdiv Date: Thu, 22 Nov 2007 23:07:11 -0800 From: Bill Cheng Someone wrote: > But then we have to find the square root of the bignum. > Which function can be used to find the sqrt of BIGNUM? I couldn't find BN_sqrt(), but there is BN_sqr(). -- Bill Cheng // bill.cheng@usc.edu > ----- Original Message ----- > From: Bill Cheng > Date: Thursday, November 22, 2007 1:50 pm > Subject: Re: HW7 doubt - trialdiv > To: cs531@merlot.usc.edu > > > Someone wrote: > > > > > Do we need to treat the input number in trialdiv as a BIGNUM? > > > > The input number should be in BIGNUM. So, for each small > > prime number, you should convert the prime number to BIGNUM > > and then call BN_mod() to see if the small prime number > > divides the input number. > > -- > > Bill Cheng // bill.cheng@usc.edu > > Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 13:59:16 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAMLxG8c014909 for ; Thu, 22 Nov 2007 13:59:16 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAMLnFvH019523 for ; Thu, 22 Nov 2007 13:49:15 -0800 Message-Id: <200711222149.lAMLnFvH019523@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW7 doubt - trialdiv Date: Thu, 22 Nov 2007 13:49:15 -0800 From: Bill Cheng Someone wrote: > Do we need to treat the input number in trialdiv as a BIGNUM? The input number should be in BIGNUM. So, for each small prime number, you should convert the prime number to BIGNUM and then call BN_mod() to see if the small prime number divides the input number. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 21 21:17:06 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAM5H5x3023789 for ; Wed, 21 Nov 2007 21:17:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAM57A6h001268 for ; Wed, 21 Nov 2007 21:07:10 -0800 Message-Id: <200711220507.lAM57A6h001268@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query in CS531-HW7 Date: Wed, 21 Nov 2007 21:07:10 -0800 From: Bill Cheng Someone wrote: > I have a query regarding the output of maurer algorithm in HW7. > > I tested my program for following commands from "Test Data & > Sample Output" section of HW7 specification from > (http://merlot.usc.edu/cs531-f07/homeworks/hw7/) and my output is > matching with mentioned output files. > > hw7 maurer -k=10 -t=10 -p=primes.n220 -r=rnd.220 > ma.10 > hw7 maurer -k=24 -t=10 -p=primes.n220 -r=rnd.220 > ma.24 > hw7 maurer -k=32 -t=10 -p=primes.n220 -r=rnd.220 > ma.32 > hw7 maurer -k=64 -t=10 -p=primes.n220 -r=rnd.220 > ma.64 > hw7 maurer -k=96 -t=10 -p=primes.n220 -r=rnd.220 > ma.96 > hw7 maurer -k=128 -t=10 -p=primes.n220 -r=rnd.220 > ma.128 > > However for few of the commands from Grading Guidelines > (http://merlot.usc.edu/cs531-f07/homeworks/hw7/hw7-grading.txt) > > my output is not matching with your output . > > So while analyzing that, I found this thing. > > hw7 maurer -k=24 -t=10 -p=primes.n220 -r=rnd.220 > ma.24 command > from "Test Data & Sample Output" and > > ./hw7 maurer -k=$k3 -t=10 -p=$pf -r=$rf > f3.ma from "Grading > Guidelines" where $k3 = 24 > > Above two commands should generate the same output however > $srcdir/f3.ma is not matching with ma.24 whereas my output file > f3.ma matches with ma.24 > > Could you please check and make sure that output mentioned in > Grading Guidelines are the correct ones? Thanks for catching these. I have replaced the bad *.ma files. > Also Grading Guidelines is using a redundant parameter -t=maxitr > for maurer. Maurer's algorithm is not using maxitr anywhere. I've removed them from the grading guidelines file and from the spec. THanks for reminding me! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 18 22:33:34 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAJ6XYW8014123 for ; Sun, 18 Nov 2007 22:33:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAJ6O3Ad025616 for ; Sun, 18 Nov 2007 22:24:03 -0800 Message-Id: <200711190624.lAJ6O3Ad025616@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: problems in Grading Guideline for HW7 Date: Sun, 18 Nov 2007 22:24:03 -0800 From: Bill Cheng Someone wrote: > I think the part (A) of grading guideline for HW7 is incorrect. > I think your prime files are not the results of the inputs in grading > guideline. > > In your prime files: > For f0.pms to f4.pms are results of the following inputs > n0=29, n1=290, n2=2900, n3=29000, n4=290000 > > For f5.pms to f9.pms are results of following inputs > n5=31, n6=310, n7=3100, n8=31000, n9=310000 > > For f10.pms is a result of n10=1110000 > > Your inputs are > n0=23 > n1=230 > n2=2300 > n3=23000 > n4=230000 > n5=31 > n6=310 > n7=3100 > n8=31000 > n9=310000 > n10=1000000 > > So, I think that your prime files and input n0..n10 are inconsistency. Oops! They are fixed now. Thanks for letting me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 18 18:59:19 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAJ2xJYr000976 for ; Sun, 18 Nov 2007 18:59:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAJ2nncq023285 for ; Sun, 18 Nov 2007 18:49:49 -0800 Message-Id: <200711190249.lAJ2nncq023285@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW7 doubt Date: Sun, 18 Nov 2007 18:49:49 -0800 From: Bill Cheng Someone wrote: > After I call the function *unsigned long htonl(unsigned long*), how can > I separate each byte from the value returned by the function; You can typecast the pointer to (unsigned char *) and get the bytes out by accessing it like an character array, i.e., [0], [1], ... -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 15 22:58:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAG6wqbg006849 for ; Thu, 15 Nov 2007 22:58:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAG6njJh030053 for ; Thu, 15 Nov 2007 22:49:45 -0800 Message-Id: <200711160649.lAG6njJh030053@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query in HW6 Date: Thu, 15 Nov 2007 22:49:45 -0800 From: Bill Cheng Someone wrote: > Like you said below that we can simply iterate through 256 values and check > the inverse, but output of inverse command is expected to be trace of table > method version of extended Euclidean algorithm so it seems that we have to > implement that method. The "inverse" command you need to implement is to find the inverse of a "polynomial with coefficients in GF(2^8)". The "inverse" that you can calculate by simply enumerating through all 256 possible byte values is inverse of a "polynomial with coefficients in Z_2" and we call it a "byte inverse". They are different. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: "Bill Cheng" To: Sent: Thursday, November 08, 2007 10:01 AM Subject: Re: Query in HW6 > Hi, > > May be it's not such a great idea to implement the Extended > Euclidean Algorithm to compute *byte inverses*! It's a lot > less trouble if you do, for each byte x, enumerate all 256 > possible values and see which one, when multiplied by x, give > you {01}, and that's the byte inverse. > -- > Bill Cheng // bill.cheng@usc.edu > > > > -----Original Message----- > Date: Thu, 08 Nov 2007 09:58:12 -0800 > From: Bill Cheng > To: cs531@merlot.usc.edu > Subject: Re: Query in HW6 > > Someone wrote: > > > I have a doubt in Table Method for extended Euclidean algorithm . > > > > I am having a hard time in understanding the example > > illustrated on slide 29 of the AES slides. > > I mean slide 29 of lecture 18 (there were 2 lectures regarding > AES). This is the same slides 24 of AES slides at: > > http://merlot.usc.edu/cs531-f07/lectures/tentative/06c_aes.pdf > > > Ex: > > a(x) = (x^ 6+x ^4+x+1) = {53} and b(x) = (x^ 8+x^ 4+x^ 3+x+1) = > {01}{1 > B} > > > > rem[1] = (x^8+x^4+x^3+x+1) = {01}{1B} > > rem[2] = (x^ 6+x ^4+x+1) = {53} > > > > Now rem[3] = rem[1] mod rem[2]; > > > > i.e. rem[3] = (0x11B) % (0x53) = 0x22 = x^4 + x^2 + x > > I'm not sure how you get 0x22 (or x^4 + x^2 + x)! > > > However in the slides it is given that > > > > rem[3] = x^2 = {0x04) > > > > I am sure there is something wrong in my understanding. > > Will you please point out the mistake in my understanding? > > Here is the long-hand division of (x^8+x^4+x^3+x+1) divided > by (x^6+x^4+x+1). First, the binary representation of > (x^8+x^4+x^3+x+1) is (00001 0001 1011); if we drop the leading > zeroes, we have (1 0001 1011). The binary representation of > (x^6+x^4+x+1) is (0101 0011); if we drop the leading zeroes, > we have (101 0011). Now the long-hand division (remember, > subtraction is just XORing): > > Step 1: > > +------------- > 101 0011 | 1 0001 1011 > > Step 2: > 1 > +------------- > 101 0011 | 1 0001 1011 > 1 0100 11 > ----------- > 101 011 > > Step 3: > 10 > +------------- > 101 0011 | 1 0001 1011 > 1 0100 11 > ----------- > 101 0111 > > Step 4: > 101 > +------------- > 101 0011 | 1 0001 1011 > 1 0100 11 > ----------- > 101 0111 > 101 0011 > ---------- > 100 > > So, the binary representation of the quotient is (0101)={05} > and the binary representation of the remainder is (0100)={04}. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 14 15:59:33 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lAENxXU7002203; Wed, 14 Nov 2007 15:59:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAENobKf029414; Wed, 14 Nov 2007 15:50:37 -0800 Message-Id: <200711142350.lAENobKf029414@bourbon.usc.edu> To: cs551@merlot.usc.edu, cs531@merlot.usc.edu Subject: [Fwd: Distinguished Lecture Series - Raj Reddy (November 20, 2007)] Date: Wed, 14 Nov 2007 15:50:37 -0800 From: Bill Cheng Hi everyone, You are strongly encouraged to attend the CS Distinguished Lecture at 4pm next Tuesday, 11/20/07. Prof. Raj Reddy from CMU will be giving a talk on "Technology and Society". Prof. Raj Reddy is very well-known in AI and Robotics. -- Bill Cheng // bill.cheng@usc.edu -------- Original Message -------- Subject: Distinguished Lecture Series - Raj Reddy (November 20, 2007) Date: Mon, 12 Nov 2007 15:23:55 -0800 From: Christine Martin on behalf of CS Chair To: cschair@usc.edu Distinguished Lecture - Reddy Time: 4 PM - 5:30 PM Location: Ethel Percy Andrus Gerontology (GER) Auditorium 2nd Annual George Bekey Keynote Lecture TITLE: Technology and Society Dr. Raj Reddy - Carnegie Mellon University BIO: Dr. Raj Reddy is the Mozah Bint Nasser University Professor of Computer Science and Robotics in the School of Computer Science at Carnegie Mellon University. His current research interests include Million Book Digital Library Project; Fiber To The Village Project; and Learning by Doing. He is a member of the National Academy of Engineering and the American Academy of Arts and Sciences. Dr. Reddy was awarded the Legion of Honor by President Mitterand in 1984, the ACM Turing Award in 1994, the Honda Prize in 2005 and Vannevar Bush Award in 2006. He served as co-chair of the President's Information Technology Advisory Committee (PITAC) from 1999 to 2001 ABSTRACT: Technology and Society This talk will present several examples of how Technology, in particular Information Technology, can contribute to a wide range of human activities. In particular we will discuss societal applications of Robotics, Speech Recognition and Synthesis, Computer Vision, Human Computer Interaction, Language Understanding Systems, and Artificial Intelligence. Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 8 15:29:24 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA8NTNHk003881 for ; Thu, 8 Nov 2007 15:29:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA8NLGad013632 for ; Thu, 8 Nov 2007 15:21:16 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lA8NLGQX013631 for cs531@merlot; Thu, 8 Nov 2007 15:21:16 -0800 Date: Thu, 8 Nov 2007 15:21:16 -0800 From: Bill Cheng Message-Id: <200711082321.lA8NLGQX013631@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CS 531 midterm exam grade... Hi, Just realized that I put someone else's available timeslots in the midterm grade e-mail I sent! Unbelievable! If you would like to see/discuss your midterm, please make an appointment with me for a 10-minute timeslot during the following periods for the next 2 weeks (i.e., before Thanksgiving holiday): Tue 10:30am - 12:30pm, 2:30pm - 4:00pm Thu 10:30am - 12:30pm, 2:30pm - 4:00pm Fri 11:00am - 12:00pm Sorry about my mistake! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 8 10:09:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA8I9UXJ018033 for ; Thu, 8 Nov 2007 10:09:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA8I1PZJ007440 for ; Thu, 8 Nov 2007 10:01:25 -0800 Message-Id: <200711081801.lA8I1PZJ007440@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query in HW6 Date: Thu, 08 Nov 2007 10:01:25 -0800 From: Bill Cheng Hi, May be it's not such a great idea to implement the Extended Euclidean Algorithm to compute *byte inverses*! It's a lot less trouble if you do, for each byte x, enumerate all 256 possible values and see which one, when multiplied by x, give you {01}, and that's the byte inverse. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 08 Nov 2007 09:58:12 -0800 From: Bill Cheng To: cs531@merlot.usc.edu Subject: Re: Query in HW6 Someone wrote: > I have a doubt in Table Method for extended Euclidean algorithm . > > I am having a hard time in understanding the example > illustrated on slide 29 of the AES slides. I mean slide 29 of lecture 18 (there were 2 lectures regarding AES). This is the same slides 24 of AES slides at: http://merlot.usc.edu/cs531-f07/lectures/tentative/06c_aes.pdf > Ex: > a(x) = (x^ 6+x ^4+x+1) = {53} and b(x) = (x^ 8+x^ 4+x^ 3+x+1) = {01}{1 B} > > rem[1] = (x^8+x^4+x^3+x+1) = {01}{1B} > rem[2] = (x^ 6+x ^4+x+1) = {53} > > Now rem[3] = rem[1] mod rem[2]; > > i.e. rem[3] = (0x11B) % (0x53) = 0x22 = x^4 + x^2 + x I'm not sure how you get 0x22 (or x^4 + x^2 + x)! > However in the slides it is given that > > rem[3] = x^2 = {0x04) > > I am sure there is something wrong in my understanding. > Will you please point out the mistake in my understanding? Here is the long-hand division of (x^8+x^4+x^3+x+1) divided by (x^6+x^4+x+1). First, the binary representation of (x^8+x^4+x^3+x+1) is (00001 0001 1011); if we drop the leading zeroes, we have (1 0001 1011). The binary representation of (x^6+x^4+x+1) is (0101 0011); if we drop the leading zeroes, we have (101 0011). Now the long-hand division (remember, subtraction is just XORing): Step 1: +------------- 101 0011 | 1 0001 1011 Step 2: 1 +------------- 101 0011 | 1 0001 1011 1 0100 11 ----------- 101 011 Step 3: 10 +------------- 101 0011 | 1 0001 1011 1 0100 11 ----------- 101 0111 Step 4: 101 +------------- 101 0011 | 1 0001 1011 1 0100 11 ----------- 101 0111 101 0011 ---------- 100 So, the binary representation of the quotient is (0101)={05} and the binary representation of the remainder is (0100)={04}. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 8 10:06:18 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA8I6Ib3017913 for ; Thu, 8 Nov 2007 10:06:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA8HwCOP007376 for ; Thu, 8 Nov 2007 09:58:12 -0800 Message-Id: <200711081758.lA8HwCOP007376@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query in HW6 Date: Thu, 08 Nov 2007 09:58:12 -0800 From: Bill Cheng Someone wrote: > I have a doubt in Table Method for extended Euclidean algorithm . > > I am having a hard time in understanding the example > illustrated on slide 29 of the AES slides. I mean slide 29 of lecture 18 (there were 2 lectures regarding AES). This is the same slides 24 of AES slides at: http://merlot.usc.edu/cs531-f07/lectures/tentative/06c_aes.pdf > Ex: > a(x) = (x^ 6+x ^4+x+1) = {53} and b(x) = (x^ 8+x^ 4+x^ 3+x+1) = {01}{1B} > > rem[1] = (x^8+x^4+x^3+x+1) = {01}{1B} > rem[2] = (x^ 6+x ^4+x+1) = {53} > > Now rem[3] = rem[1] mod rem[2]; > > i.e. rem[3] = (0x11B) % (0x53) = 0x22 = x^4 + x^2 + x I'm not sure how you get 0x22 (or x^4 + x^2 + x)! > However in the slides it is given that > > rem[3] = x^2 = {0x04) > > I am sure there is something wrong in my understanding. > Will you please point out the mistake in my understanding? Here is the long-hand division of (x^8+x^4+x^3+x+1) divided by (x^6+x^4+x+1). First, the binary representation of (x^8+x^4+x^3+x+1) is (00001 0001 1011); if we drop the leading zeroes, we have (1 0001 1011). The binary representation of (x^6+x^4+x+1) is (0101 0011); if we drop the leading zeroes, we have (101 0011). Now the long-hand division (remember, subtraction is just XORing): Step 1: +------------- 101 0011 | 1 0001 1011 Step 2: 1 +------------- 101 0011 | 1 0001 1011 1 0100 11 ----------- 101 011 Step 3: 10 +------------- 101 0011 | 1 0001 1011 1 0100 11 ----------- 101 0111 Step 4: 101 +------------- 101 0011 | 1 0001 1011 1 0100 11 ----------- 101 0111 101 0011 ---------- 100 So, the binary representation of the quotient is (0101)={05} and the binary representation of the remainder is (0100)={04}. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 7 21:12:12 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA85CCcg007827 for ; Wed, 7 Nov 2007 21:12:12 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA854BKr027435 for ; Wed, 7 Nov 2007 21:04:11 -0800 Message-Id: <200711080504.lA854BKr027435@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: midterm grades Date: Wed, 07 Nov 2007 21:04:11 -0800 From: Bill Cheng Someone wrote: > Any idea when we can get the midterm grades? I've mentioned in class today that I got the graded midterm exams from the TA and I will send the grades to you today. After looking over the exams, I felt that the TA may have graded a little more harsh than I expected. So, I've decided *not* to send the grades to you today. I'll look over it tomorrow and may be give more partial credits here and there and will e-mail your grades to you probably tomorrow afternoon. Sorry about the delays! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 7 10:53:02 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA7Ir2Gt007365 for ; Wed, 7 Nov 2007 10:53:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA7Ij50b018940 for ; Wed, 7 Nov 2007 10:45:05 -0800 Message-Id: <200711071845.lA7Ij50b018940@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW6 doubt Date: Wed, 07 Nov 2007 10:45:05 -0800 From: william@bourbon.usc.edu Someone wrote: > In the class, for HW6, you said that to find something, we can innumerate > through all the possible values. I dont remember what it was. Was it for > modprod? No. I was talking about byte-oriented operations (i.e., in GF(2^8)). Consider multiplying 2 bytes using the big-dot operator (please see slide 12 of lecture 18). If you want to find the inverse of a byte, you can use Extended Euclidean Algorithm to do it. But since we are only multiply bytes, an easier way to go is to try all possible values and see which one is the inverse. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 6 23:40:53 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA77erHb003694; Tue, 6 Nov 2007 23:40:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA77WxxW010365; Tue, 6 Nov 2007 23:32:59 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lA77WxWA010364; Tue, 6 Nov 2007 23:32:59 -0800 Date: Tue, 6 Nov 2007 23:32:59 -0800 From: william@bourbon.usc.edu Message-Id: <200711070732.lA77WxWA010364@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Announcement for the SS12 event... Hi everyone, You've probably seen the flyer all over SAL for the SS12 "Code-A-Thon challenge" event. Please check out the announcement in the News section of the class web page if you are interested in participating. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 22:46:20 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA56kKAi007825 for ; Sun, 4 Nov 2007 22:46:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA56a4q1028830 for ; Sun, 4 Nov 2007 22:36:04 -0800 Message-Id: <200711050636.lA56a4q1028830@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW6 Grading file does not exist Date: Sun, 04 Nov 2007 22:36:03 -0800 From: william@bourbon.usc.edu Someone wrote: > In ./hw6 tablecheck -t=$srcdir/f204.tbl > the guidelines says (invalid characters in P) > > In the file the value of P is > P=6b8ec36d > > What is invalid in this? Another oops! It should say "invalid character in INVP". It's fixed now. Thanks for catching the bug! -- Bill Cheng // bill.cheng@usc.edu On 11/4/07, william@bourbon.usc.edu wrote: > > Someone wrote: > > > In HW6, the Grading guidelines says: > > > > Bad commandline : -1 point each for each not handling properly > > ./hw6 > > (malformed command) > > ./hw6 tablecheck -t=$srcdir/f200.tbl > > (invalid S-box, wrong number of entries) > > ./hw6 tablecheck -t=$srcdir/f201.tbl > > (invalid S-box, repeated entries) > > ./hw6 tablecheck -t=$srcdir/f202.tbl > > (invalid P, too many terms in the poly) > > ./hw6 tablecheck -t=$srcdir/f203.tbl > > (missing INVP) > > ./hw6 tablecheck -t=$srcdir/f204.tbl > > > > > > > > 1) There are no f200.tbl, f201.tbl .... f204.tbl files in the > directory. > > Instead there are f300.tbl .... 304.tbl... Which one should I use? > > (Ouput of tablefiles f300.tbl ... 304.tbl are different than as > expected > > in 200.tbl .... 204.tbl ) > > Oops! Thanks for letting me know! I've put the f2??.tbl > files in ~csci551b/public/csac/hw6 and have removed the > f3??.tbl files. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 21:39:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id lA55duuK004009 for ; Sun, 4 Nov 2007 21:39:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA55Tei0027735 for ; Sun, 4 Nov 2007 21:29:40 -0800 Message-Id: <200711050529.lA55Tei0027735@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW6 Grading file does not exist Date: Sun, 04 Nov 2007 21:29:40 -0800 From: william@bourbon.usc.edu Someone wrote: > In HW6, the Grading guidelines says: > > Bad commandline : -1 point each for each not handling properly > ./hw6 > (malformed command) > ./hw6 tablecheck -t=$srcdir/f200.tbl > (invalid S-box, wrong number of entries) > ./hw6 tablecheck -t=$srcdir/f201.tbl > (invalid S-box, repeated entries) > ./hw6 tablecheck -t=$srcdir/f202.tbl > (invalid P, too many terms in the poly) > ./hw6 tablecheck -t=$srcdir/f203.tbl > (missing INVP) > ./hw6 tablecheck -t=$srcdir/f204.tbl > > > > 1) There are no f200.tbl, f201.tbl .... f204.tbl files in the directory. > Instead there are f300.tbl .... 304.tbl... Which one should I use? > (Ouput of tablefiles f300.tbl ... 304.tbl are different than as expected > in 200.tbl .... 204.tbl ) Oops! Thanks for letting me know! I've put the f2??.tbl files in ~csci551b/public/csac/hw6 and have removed the f3??.tbl files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 30 16:18:00 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9UNI0qa015720 for ; Tue, 30 Oct 2007 16:18:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9UN8Rlf017140 for ; Tue, 30 Oct 2007 16:08:27 -0700 Message-Id: <200710302308.l9UN8Rlf017140@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Printing C, D, L, R info Date: Tue, 30 Oct 2007 16:08:27 -0700 From: william@bourbon.usc.edu Someone wrote: > It is clear from the specs that for encrypt and decrypt, we need > to print C, D, L, R info only once for the first 8-bytes. What do > we do about encrypt3/decrypt3? Please do *not* output these information to stderr. > Should we print C,D,L,R from all three E-D-E steps for the first > 8-byte block or only for the first E in E-D-E steps for the first > 8-byte block? No! Just the data. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 30 11:43:55 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9UIht4t000794 for ; Tue, 30 Oct 2007 11:43:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9UIYNxv011562 for ; Tue, 30 Oct 2007 11:34:23 -0700 Message-Id: <200710301834.l9UIYNxv011562@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW5 weak keys Date: Tue, 30 Oct 2007 11:34:23 -0700 From: william@bourbon.usc.edu Someone wrote: > How to check for weak, semi weak, palodromic key? Weak and palodromic are the same thing. For semi-weak keys, there are two categories. One set is the anti-palodromic keys and the other set does not have special names. Checks for weak keys and anti-palodromic keys are fairly straightforward. Please see lecture slides. Come to think of it, this "other set" of semi-weak keys can only be detected in pairs! In the grading guidelines, it says: DES other semi-weak keys : -1 point each for each not handling properly (it's okay if each command below is terminated with error message saying that the key is bad or weak, it's also okey if no error is reported; fout2 should be identical to f21 if any output is produced, or it should be empty) So, you should not be able to produce an error for these "other" semi-weak keys (unless you hard-code them). Therefore, I would expect that you would produce output as normal. For the sake of this HW, it's okay to hard-code them and report that the these keys are weak. > Is it like there should not be any repeatition of subkeys such > that if "k1 == k16" that means the key is weak? Yes. > Does key scheduling should produce distinct 16 subkeys, so that > we can call that key as good key? > (sorry about too many questions). No. Please see the definition on lecture slides and in the chapter 7 of the textbook. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 30 10:43:00 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9UHh0o0030159 for ; Tue, 30 Oct 2007 10:43:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9UHXTwh010740 for ; Tue, 30 Oct 2007 10:33:29 -0700 Message-Id: <200710301733.l9UHXTwh010740@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW5 doubt Date: Tue, 30 Oct 2007 10:33:29 -0700 From: william@bourbon.usc.edu Someone wrote: > In encrypt3, we are encoding file f32 (35820 bytes) which is not multiple of > 8 bytes so we will append 4 extra 0's to make it 35824 bytes so it will > match with f34 (size-35824) after decrypt3. > Do you mean we do not need to remove those extra appended 0's while > decryption? Correct! How could you know how many bytes to remove? -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Tuesday, October 30, 2007 8:05 AM Subject: Re: HW5 doubt > Someone wrote: > > > If number of bytes in file are not divisible by 8 then we need to pad > 0. > > This is giving me correct output after running the encrypt3 script but > while > > doing decrypt3, it is showing difference because of those extra 0's > appended > > in encrypt3. > > For the decrypt3 tests in the grading guidelines, the > plaintext file size is a multiple of 8 bytes. So, there > should be no padding when you encrypt and you should get > the plaintext file back when you decrypt. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 30 10:34:53 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9UHYqV1029720 for ; Tue, 30 Oct 2007 10:34:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9UHPLYw010538 for ; Tue, 30 Oct 2007 10:25:21 -0700 Message-Id: <200710301725.l9UHPLYw010538@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW5 Date: Tue, 30 Oct 2007 10:25:21 -0700 From: william@bourbon.usc.edu Someone wrote: > For HW-5 I am getting correct output for the keys and Ci, Di values, and L0 > and R0. I am getting incorrect value for Ri. > > 1) The DES algorithm in page 253 of chapter 7 says S1(011011) yields r=1 and > c=13. Is 011011 supposed to be the first 6 bits of output of E(R XOR K) when > "des.in" is used? (I am getting different values, and my Ri is incorrect. So > wanted to confirm.) Correct. It's denoted as B1 on that page. > 2) Can I get some sample data of binary values generated after each step of > the algorithm so that I can find out the error in my implementation? There is enough data already! Sorry! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 30 08:15:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9UFFNnA022320 for ; Tue, 30 Oct 2007 08:15:23 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9UF5qso007717 for ; Tue, 30 Oct 2007 08:05:52 -0700 Message-Id: <200710301505.l9UF5qso007717@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW5 doubt Date: Tue, 30 Oct 2007 08:05:52 -0700 From: william@bourbon.usc.edu Someone wrote: > If number of bytes in file are not divisible by 8 then we need to pad 0. > This is giving me correct output after running the encrypt3 script but while > doing decrypt3, it is showing difference because of those extra 0's appended > in encrypt3. For the decrypt3 tests in the grading guidelines, the plaintext file size is a multiple of 8 bytes. So, there should be no padding when you encrypt and you should get the plaintext file back when you decrypt. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 29 22:44:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9U5iZXW023900 for ; Mon, 29 Oct 2007 22:44:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9U5Z8CR032156 for ; Mon, 29 Oct 2007 22:35:08 -0700 Message-Id: <200710300535.l9U5Z8CR032156@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw5 grading guidelines Date: Mon, 29 Oct 2007 22:35:08 -0700 From: william@bourbon.usc.edu Someone wrote: > For bad table file, I am exiting the validation check whenever first > error occurs. > Do we need to check the tables in some specific order? like first IP > then E, P, S# .... > or any order is fine like IP then PC2, V ....? Any order is fine. You can quit after you've detected and reported the first error. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 29 08:11:19 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9TFBJON010519 for ; Mon, 29 Oct 2007 08:11:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9TF1vei020245 for ; Mon, 29 Oct 2007 08:01:57 -0700 Message-Id: <200710291501.l9TF1vei020245@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Hw5 query Date: Mon, 29 Oct 2007 08:01:57 -0700 From: william@bourbon.usc.edu Someone wrote: > In triple DES we are using EDE scheme, i have a question that > after first encryption we will take that input and use for > decrypt with second key. So while decrypting are we supposed to > use reverse order of 16 subkeys as per decryption algorithm or do > we have to use subkeys in same order ?? If you use the subkeys in forward order, then it's considered encryption in DES. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 29 08:08:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9TF8qCq010397 for ; Mon, 29 Oct 2007 08:08:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9TExUCC020168 for ; Mon, 29 Oct 2007 07:59:30 -0700 Message-Id: <200710291459.l9TExUCC020168@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt regarding Hw5 Date: Mon, 29 Oct 2007 07:59:30 -0700 From: william@bourbon.usc.edu Someone wrote: > For the first part of hw of checking table files , do we have to > report all the errors found in the table or we can stop as soon > as we find first error. > > eg. there may less entries in IP and wrong data in E > > then is it ok if we report first error that less entries found in > IP and stop or should we also report the second error o wrong > data in E.. You can stop at the first error. (The idea of error reporting is so that the user can fix the input.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 28 20:54:37 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9T3sbU6006432 for ; Sun, 28 Oct 2007 20:54:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9T3jJYU010993 for ; Sun, 28 Oct 2007 20:45:19 -0700 Message-Id: <200710290345.l9T3jJYU010993@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw5 query Date: Sun, 28 Oct 2007 20:45:19 -0700 From: william@bourbon.usc.edu Someone wrote: > Under the grading guidelines, section (c) part 2, which is to > encrypt f22 using various tablefiles, when c2 is computed from > c1, there should be a single left shift operation, whereas in the > output provided by you, c1 is left shift by 2 bits to obtain c2, > which according to the specification is incorrect an so on for > the remaining values. You need to do the circular shifts according to the V array in the tablefile. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 27 16:16:59 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9RNGxjs013328 for ; Sat, 27 Oct 2007 16:16:59 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9RN7oeB031140 for ; Sat, 27 Oct 2007 16:07:50 -0700 Message-Id: <200710272307.l9RN7oeB031140@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw5 semi-weak keys Date: Sat, 27 Oct 2007 16:07:50 -0700 From: william@bourbon.usc.edu Someone wrote: > In the grading guidelines for "DES other semi-weak > keys" I'm confused as to how fout2 can be identical to f21 if > error messages are reported. My program finds that both keys are > semi-weak, prints the keys and exits. Should encryption still be > performed? Looks like the semi-colon in the grading guidelines is placed funny. If you report an error, you do not need to produce data in stdout. But you need to produce the right output in stderr according to the spec. > What is the difference between this situation and the > previous section in the grading guidelines (DES semi-weak > (anti-palindromic) keys)? I think the subkeys that gets output to stderr are different. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 26 23:05:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9R65UOA023092 for ; Fri, 26 Oct 2007 23:05:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9R5uRmn018289 for ; Fri, 26 Oct 2007 22:56:27 -0700 Message-Id: <200710270556.l9R5uRmn018289@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW5 Date: Fri, 26 Oct 2007 22:56:27 -0700 From: william@bourbon.usc.edu Someone wrote: > In case of tablecheck for the table file, can we assume the order > in which the various tables will be listed will be the same as > given in the sample table file or the order is random and they > can be listed in any order. You should not assume that. You should have a bit for each table. WHen you read a line, you should check if the corresponding bit is set. If not, update the bit after you have parsed the line successfully. When you are doing reading the file, make sure all the bits are set. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 25 10:49:48 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9PHnman004889 for ; Thu, 25 Oct 2007 10:49:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9PHev0i021642 for ; Thu, 25 Oct 2007 10:40:57 -0700 Message-Id: <200710251740.l9PHev0i021642@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW5 Date: Thu, 25 Oct 2007 10:40:57 -0700 From: william@bourbon.usc.edu Someone wrote: > 1) Do we have to check the table file for correctness of the initial > characters like IP= or S5= ? Should the following be accepted? > > PP= instead of IP= in a correct table file? Yes. PP is an invalid key, so you should report it. > 2) For bad-tablefile case f16 the guidelines says: > > f16: ( S1) the value 11 in the S1 table did not occur 4 times > > Since we get a 17(which is not between 0 and 15) in S1 in f16, my program > does not scan the file further and see which all values did not occur 4 > times. Because we can produce different error messages, i hope this is fine. Correct! Also, what you are reporting is even better! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 24 10:45:28 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9OHjRkt024400; Wed, 24 Oct 2007 10:45:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9OHaj0u000494; Wed, 24 Oct 2007 10:36:45 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l9OHajpf000493; Wed, 24 Oct 2007 10:36:45 -0700 Date: Wed, 24 Oct 2007 10:36:45 -0700 From: william@bourbon.usc.edu Message-Id: <200710241736.l9OHajpf000493@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Moving tomorrow's office hour to the morning... Hi, I won't be able to stay on campus tomorrow (Thu) afternoon. I'm moving my office hours to 11:00am-noon. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 23 17:22:25 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9O0MPjB031389 for ; Tue, 23 Oct 2007 17:22:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9O0DnGO018804 for ; Tue, 23 Oct 2007 17:13:49 -0700 Message-Id: <200710240013.l9O0DnGO018804@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw5 grading guidelines Date: Tue, 23 Oct 2007 17:13:49 -0700 From: william@bourbon.usc.edu Someone wrote: > Professor, for hw5 I don't think the permissions are set > correctly for f0-f9 for the tablecheck files in the grading > guidelines. I'm unable to open any of them. Oops! Fixed! Thanks for letting me know! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 21:11:10 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9M4B9hd019251 for ; Sun, 21 Oct 2007 21:11:10 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9M42mon013289 for ; Sun, 21 Oct 2007 21:02:48 -0700 Message-Id: <200710220402.l9M42mon013289@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: midterm : question regarding digital signature Date: Sun, 21 Oct 2007 21:02:48 -0700 From: william@bourbon.usc.edu Someone wrote: > In slide Digital Signature from reversible Public-key Encryption, it says > Let S_A to be Dd i.e. s = Dd(m) > V_A (m,s) = True if Ee(s) = m > Here I am not getting which keys are used for Dd and Ee? > Could you please let me know for Dd whose(sender/receiver) > public/private key is used? and for Ee whose(sender/receiver) > public/private key is used? Signature is done with entity A's private key (D_d) and verification is done with entity A's public key (E_e). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 19:58:33 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9M2wXcV015520 for ; Sun, 21 Oct 2007 19:58:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9M2oCYT012488 for ; Sun, 21 Oct 2007 19:50:12 -0700 Message-Id: <200710220250.l9M2oCYT012488@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: doubt Date: Sun, 21 Oct 2007 19:50:12 -0700 From: william@bourbon.usc.edu Someone wrote: > I am confused with the definition of Complexity-theoretic Security.Can you > elloborate as to what it exactly means. It's best to just read the definition from the online textbook! If you have something specific in mind, please feel free to ask me. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 19:56:20 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9M2uK9Q015300 for ; Sun, 21 Oct 2007 19:56:20 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9M2lxrn012414 for ; Sun, 21 Oct 2007 19:47:59 -0700 Message-Id: <200710220247.l9M2lxrn012414@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Question regarding midterm exam Date: Sun, 21 Oct 2007 19:47:59 -0700 From: william@bourbon.usc.edu Someone wrote: > As you mentioned that there will be questions like answer in 'n' words. > If I write answer with some words in bracket () then will those words > counted? > e.g. what is xyz, in 5 words? > Ans: (xyz is) mathematical technique to prove (existence of) pqr. Yes. Every word counts. You need to be careful with the way you answer questions. If I do not ask what is xyz used for, you should not waste your words in answering what it is for! If the question asks what xyz is, you should not tell me where you get it, who gives it to you, etc. because that will get very little partial credit. In general, you do not need to repeat any part of the question (just need to make it clear which part of the question you are answering, if there are multiple parts). You also do not need to answer in full sentenses. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 15:34:51 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9LMYpOt001387 for ; Sun, 21 Oct 2007 15:34:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9LMQWXl008982 for ; Sun, 21 Oct 2007 15:26:32 -0700 Message-Id: <200710212226.l9LMQWXl008982@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Question regarding midterm exam Date: Sun, 21 Oct 2007 15:26:32 -0700 From: william@bourbon.usc.edu Someone wrote: > Do we have to memorize formulas like pdf, cdf, variance, the pdf's of normal > and chi-square distribution (I hope not). Formulas for X1,X2...X5 are fine > since we have implemented them. You don't need to memorize the equation for the normal and chi-square distribution. But you should know the definition of PDF, CDF, and variance. It's probably more important to understand what they mean. -- Bill Cheng // bill.cheng@usc.edu On 10/20/07, william@bourbon.usc.edu wrote: > > Someone wrote: > > > Do I need to memorize all the formulas? (i.e. all random > test > > and index of coincidence) or the question will provide them. > > > For the random tests and index of coincidence, you don't > have to memorize the formulas. > > I don't want to say "all formulas". The reason is that some > people think something is a formulas and some people don't > think it is. For example, the definition of full Vigenere > cipher. I don't consider that a formula because I think if > you understand it, you can write it down. But some people > would consider that a formula. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 15:31:21 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9LMVLXK001169 for ; Sun, 21 Oct 2007 15:31:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9LMN1Kc008919 for ; Sun, 21 Oct 2007 15:23:01 -0700 Message-Id: <200710212223.l9LMN1Kc008919@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt regarding mid-term Date: Sun, 21 Oct 2007 15:23:01 -0700 From: william@bourbon.usc.edu Someone wrote: > A) Unconditional Security says: > > Public key encryption cannot be unconditionally secure. Given a ciphertext > c, the plaintext can in principle be recovered by encrypting all possible > plaintexts until c is obtained. > Cannot do this with secret key schemes because the key is not available. > > My doubt is: > > 1) Even in public key, the private keys are not available right? A send > message to B encrypting it with public key of B and private key of A. The > private key of A is not available to anyone. > > 2) How will be encrypt all possible plaintexts if we dont have the private > key of A (as mentioned in unconditional security) ? Well, you have the public key. So, you can try all possible plaintext and encrypt it with the public key and see which one matches the ciphertext. > B) For symmetric key encryption e=d. Caesar cipher is a symmetric cipher. In > Caesar cipher, e=3, d=-3. So it is |e| = |d| (absolute values of e and d) > right? Sure. But I'm not sure if this is significant. For a shift cipher, the relationship between the encryption key and the decryption key is very simple. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 15:25:16 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9LMPGlG000837 for ; Sun, 21 Oct 2007 15:25:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9LMGvpa008838 for ; Sun, 21 Oct 2007 15:16:57 -0700 Message-Id: <200710212216.l9LMGvpa008838@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: inverse of a (a^-1) Date: Sun, 21 Oct 2007 15:16:57 -0700 From: william@bourbon.usc.edu Someone wrote: > I cannot recognize how to calculate a^-1 in affine cipher. Can you give > me and explanation and examples of it? We have not talked about how to do this yet. You need the Extended Euclidean Algorithm. We will talk about it some time in the next few weeks. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 21 09:12:08 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9LGC806013853 for ; Sun, 21 Oct 2007 09:12:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9LG3po9032538 for ; Sun, 21 Oct 2007 09:03:51 -0700 Message-Id: <200710211603.l9LG3po9032538@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in the Lecture slides Date: Sun, 21 Oct 2007 09:03:51 -0700 From: william@bourbon.usc.edu Someone wrote: > I seem to have a doubt in the lecture 8, slide 7 and slide 10. > > Slide 7 says: TTP can read all messages. > > Slide 10 says: TTP cannot monitor communication. > > Isn't this contradictory or am I inferring it incorrectly? There are 2 types of TTP and some of their characteristics are different (as you have noted above). Slide 7 refers to an "unconditionally trusted TTP" while slide 10 refers to a "functionally trusted TTP". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 20 23:43:39 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9L6hdJc016250 for ; Sat, 20 Oct 2007 23:43:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9L6ZPQd032044 for ; Sat, 20 Oct 2007 23:35:25 -0700 Message-Id: <200710210635.l9L6ZPQd032044@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Multiple Encryption Date: Sat, 20 Oct 2007 23:35:25 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a question about Multiple Encryption needing to be clarified. > Why we have to use EDE? and What is backward compatible with single key > encryption? If k_1=k_2=k_3 for triple encryption, this would be identical to single encryption with key k_1. This way, you can deploy triple encryption and use this compatibility mode if someone has not upgraded to triple encryption. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 20 21:42:02 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9L4g1UQ008583 for ; Sat, 20 Oct 2007 21:42:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9L4XmQj029881 for ; Sat, 20 Oct 2007 21:33:48 -0700 Message-Id: <200710210433.l9L4XmQj029881@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Question regarding midterm exam Date: Sat, 20 Oct 2007 21:33:48 -0700 From: william@bourbon.usc.edu Someone wrote: > Do I need to memorize all the formulas? (i.e. all random test > and index of coincidence) or the question will provide them. For the random tests and index of coincidence, you don't have to memorize the formulas. I don't want to say "all formulas". The reason is that some people think something is a formulas and some people don't think it is. For example, the definition of full Vigenere cipher. I don't consider that a formula because I think if you understand it, you can write it down. But some people would consider that a formula. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 19 19:41:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9K2fZT2016682 for ; Fri, 19 Oct 2007 19:41:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9K2XVrI006535 for ; Fri, 19 Oct 2007 19:33:31 -0700 Message-Id: <200710200233.l9K2XVrI006535@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Regarding Mid-term Date: Fri, 19 Oct 2007 19:33:31 -0700 From: william@bourbon.usc.edu Someone wrote: > 1) You said that we'll get questions in the format "in n words or less > explain XYZ". For example will it be like "in n words or less explain XYZ > crypto" or something like "in n words or less explain why is ABC used in XYZ > crypto" or both? Both are possible. Or "why is ABC more secure than XYZ", or "what is the maximum/minimum number of bits that can be used in XYZ in order to achieve this and that", etc. > I mean will there be theory(defining a crypto or some defination) questions > in the exam? Yes. Something like, "in 30 words or less, please give a definition for XYZ." > 2) Can we get some sample mid-term paper to get an idea of the pattern? Sorry, but I do not give out old exams. > 3) How was your jury duty? I was happy that I didn't get picked for anything! :-) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 17 19:42:15 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9I2gFMT026196; Wed, 17 Oct 2007 19:42:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9I2YR5v029557; Wed, 17 Oct 2007 19:34:27 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l9I2YQCX029556; Wed, 17 Oct 2007 19:34:26 -0700 Date: Wed, 17 Oct 2007 19:34:26 -0700 From: william@bourbon.usc.edu Message-Id: <200710180234.l9I2YQCX029556@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551mw@merlot.usc.edu Subject: Office hour canceled tomorrow (10/18/07)... Hi, They finally got me! I'm on jury duty tomorrow and won't be on campus. So, tomorrow's office hour is canceled. If you have questions, please feel free to send me e-mail! Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 17 16:01:14 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9HN1Edo014403 for ; Wed, 17 Oct 2007 16:01:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9HMrRpm026236 for ; Wed, 17 Oct 2007 15:53:27 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l9HMrRr8026235 for cs531@merlot; Wed, 17 Oct 2007 15:53:27 -0700 Date: Wed, 17 Oct 2007 15:53:27 -0700 From: william@bourbon.usc.edu Message-Id: <200710172253.l9HMrRr8026235@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Midterm exam coverage... Hi, I've mentioned during last lecture that the midterm exam will cover everything from the beginning of the semester till the end of cryptanalysis of classical ciphers (last slide is slide 32 of lecture 14 on 10/15/2007). I have update the class web page with a summary of the topics. Please see: http://merlot.usc.edu/cs531-f07/#news The midterm exam will be held on next Monday (10/22/07) during class. It will be closed book, closed notes, and closed everything (and no "cheat sheet"). Also, no calculators, cell phones, or any electronic gadgets are allowed. Please bring a photo ID. Your ID will be collected at the beginning of the exam and will be returned to you when you turn in your exam. There will be assigned seating. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 16 16:37:37 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9GNbbcm002597 for ; Tue, 16 Oct 2007 16:37:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9GNTw9Y002922 for ; Tue, 16 Oct 2007 16:29:58 -0700 Message-Id: <200710162329.l9GNTw9Y002922@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW4: Report for mystery Date: Tue, 16 Oct 2007 16:29:58 -0700 From: william@bourbon.usc.edu Someone wrote: > The output of the command "hw4 solve....." for both the mystery > files are really huge. So should I copy and paste the entire > result onto the readme file or should I send both the > "msytery*.solve" files along with the .tar.gz and just mention > about the analysis made in the readme file ? Either way is fine. If you use an external file, please make sure that you give the name of the file in your README file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 16 00:43:11 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9G7hBbR014483 for ; Tue, 16 Oct 2007 00:43:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9G7ZbYh018714 for ; Tue, 16 Oct 2007 00:35:37 -0700 Message-Id: <200710160735.l9G7ZbYh018714@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW4: Solve Command Output Date: Tue, 16 Oct 2007 00:35:37 -0700 From: william@bourbon.usc.edu Someone wrote: > For the solve command, in case of average index of coincidence > method, the value of E(IC) that I print contains trailing 0's > upto 9 positions because of which eventhough the value calculated > is exactly the same as that of the sample output file, the diff > command shows it as difference. > for example, > In sample output file it prints, > t=1 , E(IC)=0.0658 > where as in my output file it prints, > t=1 , E(IC)=0.065800000 > > Will this result in deduction of points. Please let me know. Please see item (5) at the top of the grading guidelines. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 15 22:54:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9G5sq7f008822 for ; Mon, 15 Oct 2007 22:54:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9G5lJ8x015438 for ; Mon, 15 Oct 2007 22:47:19 -0700 Message-Id: <200710160547.l9G5lJ8x015438@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW4 kasiski method Date: Mon, 15 Oct 2007 22:47:19 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a very basic ( and may be silly:)) question regarding > kasiski method. > If the input cipher string is > aaaaaaaa > Then how many occurences of "aaaa" output should print for > kasiski method with len = 4 and for "i = 0"? Since the strings cannot overlap, you can only print 1. > for i = 0, it is supposed to print just 2, or 5 occurences of > sub string aaaa? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 15 15:58:48 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9FMwmOD018993; Mon, 15 Oct 2007 15:58:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9FMpHrN010181; Mon, 15 Oct 2007 15:51:17 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l9FMpHQf010180; Mon, 15 Oct 2007 15:51:17 -0700 Date: Mon, 15 Oct 2007 15:51:17 -0700 From: william@bourbon.usc.edu Message-Id: <200710152251.l9FMpHQf010180@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551mw@merlot.usc.edu Subject: Adjusting grading breakdown for midterm and final exams... Hi, I've mentioned in class today that since the midterm won't cover as much as I planned at the beginning of the semester, I've change the grades breakdown so that the midterm exam will account for 25% of the total grade and the final exam will account for 40% of the total grade. I've changed the grading section in the course description web page. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 14 19:45:24 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9F2jOHl018307 for ; Sun, 14 Oct 2007 19:45:24 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9F2c0oW024219 for ; Sun, 14 Oct 2007 19:38:00 -0700 Message-Id: <200710150238.l9F2c0oW024219@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW4 Mystery Date: Sun, 14 Oct 2007 19:38:00 -0700 From: william@bourbon.usc.edu Someone wrote: > I guess I framed the question incorrectly, > > Can I manually inspect the output of the hw4 solve command (which is the > output result of the 3 methods) or do I have to write another code to > inspect the output (of hw4 solve) and give me the period? Manual inspection is perfectly okay. Doing it programmatically can be quite difficult. -- Bill Cheng // bill.cheng@usc.edu On 10/14/07, william@bourbon.usc.edu wrote: > > Someone wrote: > > > For Mystery, can we manually inspect the output and get the period or > do we > > have to write a program to calculate the period? > > You should run hw4 with the "solve" command. The period > *must* come from the result of your "solve" command and you > need to explain how you get the period in your README file. > Otherwise, you won't get the credit for it. This is to > simply prevent you from getting the period from another student! > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 14 08:54:17 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9EFsH04016829 for ; Sun, 14 Oct 2007 08:54:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9EFkvXj016460 for ; Sun, 14 Oct 2007 08:46:57 -0700 Message-Id: <200710141546.l9EFkvXj016460@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW4 Mystery Date: Sun, 14 Oct 2007 08:46:57 -0700 From: william@bourbon.usc.edu Someone wrote: > For Mystery, can we manually inspect the output and get the period or do we > have to write a program to calculate the period? You should run hw4 with the "solve" command. The period *must* come from the result of your "solve" command and you need to explain how you get the period in your README file. Otherwise, you won't get the credit for it. This is to simply prevent you from getting the period from another student! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 14 08:47:13 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9EFlD1V016408 for ; Sun, 14 Oct 2007 08:47:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9EFdrG4016093 for ; Sun, 14 Oct 2007 08:39:53 -0700 Message-Id: <200710141539.l9EFdrG4016093@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Hw3 Grades Date: Sun, 14 Oct 2007 08:39:53 -0700 From: william@bourbon.usc.edu Hi everyone, In the e-mail that I sent out the HW3 grades, I've mentioned that: (The test data in that directory has been changes after the submission deadline. Also, the passphrase for (A) has been changed.) As I've mentioned during the first lecture, for grading, I would often change the test data (but not the grading script) so that you cacnnot hardcode any solution! If your program is doing the right thing, you should produce the correct result for the given data. So, please run through the grading guidelines with the current data in ~csci551b/csac/hw3. If you don't think the solution is correct, please send me your analysis and let me know where you think the bug is. Thanks! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sun, 14 Oct 2007 02:08:46 -0700 From: Roshan Kotian To: William Subject: Hw3 Grades Hi ! Some students have mailed their concerns about the x5 test. Probably it is related to the files for x5 being changed after submission. Could you please send some info out to the class regarding the same. Thanks Roshan Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 10 21:31:40 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9B4Ve0C009563 for ; Wed, 10 Oct 2007 21:31:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9B4Omun019783 for ; Wed, 10 Oct 2007 21:24:48 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l9B4OmZw019782 for cs531@merlot; Wed, 10 Oct 2007 21:24:48 -0700 Date: Wed, 10 Oct 2007 21:24:48 -0700 From: william@bourbon.usc.edu Message-Id: <200710110424.l9B4OmZw019782@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: minor change to the late policy... Hi, Someone suggested that it would be nicer to have a sliding scale for submitting late, especially if you are just late by a little. I think that's quite reasonable. So, I've just changed the late policy for the first 50 minutes after the grace period: [BC: Changed 10/10/2007] Although in the first 50 minutes of this period, you will only lose 1% of your grade every 2 minutes. Therefore, if you are 3 minutes and 50 seconds late, you will get a 2% deduction after grading (instead of 25% under the previous policy). But if you submit 48 minutes and 1 second after the grace period, you will lose 25% as before. And as before, if you submit 24 hours after the grace period, you will receive a score of zero. I hope this policy is "friendlier". :-) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 9 17:15:46 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l9A0FklE013801 for ; Tue, 9 Oct 2007 17:15:46 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l9A094kj029055 for ; Tue, 9 Oct 2007 17:09:04 -0700 Message-Id: <200710100009.l9A094kj029055@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW4 Script E Runtime Date: Tue, 09 Oct 2007 17:09:04 -0700 From: william@bourbon.usc.edu Someone wrote: > When I run scrip E of HW4, for the 5 files, I get a runtime of 4 minutes and > 17 seconds for. I know this is very high but with the file size and max_t > values given, is it acceptable? Seems a bit long! Correctness is more important for our assignments. You will probably lose at most 5 points if your program runs too slow. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 9 16:09:42 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l99N9fGw010338 for ; Tue, 9 Oct 2007 16:09:41 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l99N30NT027744 for ; Tue, 9 Oct 2007 16:03:00 -0700 Message-Id: <200710092303.l99N30NT027744@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW4 Date: Tue, 09 Oct 2007 16:03:00 -0700 From: william@bourbon.usc.edu Someone wrote: > In HW4, for Index of Coincidences, we need kr and kp for calculation E(IC). > What values do we use for kr and kp? > > Do we use kp = 0.0667 and kr = 1/n = 0.0385 as given in the slides? The spec says that k_p should be 0.0658 and I think k_r is a function of the input file (I cann't recall if it's exact what you have above). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Oct 9 07:41:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l99EfaEl024888; Tue, 9 Oct 2007 07:41:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l99EYwd5019646; Tue, 9 Oct 2007 07:34:58 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l99EYwCw019645; Tue, 9 Oct 2007 07:34:58 -0700 Date: Tue, 9 Oct 2007 07:34:58 -0700 From: william@bourbon.usc.edu Message-Id: <200710091434.l99EYwCw019645@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: problem with class moodle Hi all, I accidentally deleted the class moodle! It will probably be later today when I can get it restored. I will not be able to get it restored completely since the backup of it failed last night. I should be able to restore it up to the night before. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 8 11:22:12 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l98IMCbR022555 for ; Mon, 8 Oct 2007 11:22:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l98IFfqK000593 for ; Mon, 8 Oct 2007 11:15:41 -0700 Message-Id: <200710081815.l98IFfqK000593@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw4 histogram output Date: Mon, 08 Oct 2007 11:15:41 -0700 From: william@bourbon.usc.edu Someone wrote: > Professor, for the histogram output does it matter what order > letters that occur the same percentage are outputted? If there is a tie, it does not matter which order you print them out. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 7 23:42:40 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l986geVd018196; Sun, 7 Oct 2007 23:42:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l986aCxC026616; Sun, 7 Oct 2007 23:36:12 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l986aCDq026615; Sun, 7 Oct 2007 23:36:12 -0700 Date: Sun, 7 Oct 2007 23:36:12 -0700 From: william@bourbon.usc.edu Message-Id: <200710080636.l986aCDq026615@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Moving Tuesday office hours to Monday for this week... Hi, I won't be able to come to campus this Tuesday. I'm moving my Tuesday office hours to tomorrow (Monday) between 10:30am and 11:30am. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 7 09:19:22 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l97GJLmi005641 for ; Sun, 7 Oct 2007 09:19:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l97GCxFO018729 for ; Sun, 7 Oct 2007 09:12:59 -0700 Message-Id: <200710071612.l97GCxFO018729@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in the script Date: Sun, 07 Oct 2007 09:12:59 -0700 From: william@bourbon.usc.edu Someone wrote: > I think there is a bug in the decrypt script: > > set srcdir=~csci551b/public/csac/hw4 > /bin/rm -f f?.pt > foreach f (1 2 3 4 5) > cat $srcdir/f$f.ct | ./hw4 crypt -k=$srcdir/f$f.invkeys > f$f.pt > echo "==> $srcdir/f$f.pt" > diff f$f.pt $srcdir/f$f.pt > end > > There is no input file / stdin parameter after the -k switch. If [file] is not specified, you should read from stdin. In this case, stdin is supplied by the "cat" command. If you just read stdin, you should see characters coming in. > Also, while running the crypt script after the last character I encounter a > \n character due to which it prints as a malformed input ( for e.g. hw4 > crypt -k=/tmp/anthem.invkeys /tmp/anthem.ct, the last character in > anthem.ctis \n or is it because Linux by default stores a \n while > creating a new > file?) should I neglect it or prompt the output as malformed input? Every ASCII text line (including the last line) is terminated by "\n". So, everyline is 27 characters (with an invisible '\n' at the end) long and the file is exactly 27*5=135 bytes in size. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 6 22:59:12 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l975xC2h005427 for ; Sat, 6 Oct 2007 22:59:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l975qrfI015653 for ; Sat, 6 Oct 2007 22:52:53 -0700 Message-Id: <200710070552.l975qrfI015653@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: mystery Date: Sat, 06 Oct 2007 22:52:53 -0700 From: william@bourbon.usc.edu Someone wrote: > Sorry to bother you again. For the last question, in mystery part, do I have > to find key that can exactly decrypt the cipher text or I can just get one > that can give me some clue, google it and copy entire answer from the > internet and use not 100% correct key as an answer. > > From what I found on the internet there are newline in text, do I have to > remove them to make the output exactly as the plaintext should be? You need to give the exact key in order to receive full credit! If you have found the right text on the Internet, it should be trivial to figure out what the key it. Then you run the "crypt" command with the inverse key and you should get the plaintext. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 6 21:41:47 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l974flnN001122 for ; Sat, 6 Oct 2007 21:41:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l974ZSTT014773 for ; Sat, 6 Oct 2007 21:35:28 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l974ZS5D014771 for cs531@merlot; Sat, 6 Oct 2007 21:35:28 -0700 Date: Sat, 6 Oct 2007 21:35:28 -0700 From: william@bourbon.usc.edu Message-Id: <200710070435.l974ZS5D014771@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: No memory buffer size limit for HW4! Hi, The HW4 spec says that there is no memory buffer size limit for this HW. You can put the whole input file in a character array if that's easier for you! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 6 16:27:28 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l96NRR5m017093 for ; Sat, 6 Oct 2007 16:27:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l96NLB1j011586 for ; Sat, 6 Oct 2007 16:21:11 -0700 Message-Id: <200710062321.l96NLB1j011586@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CSCI 531: HW4 question Date: Sat, 06 Oct 2007 16:21:11 -0700 From: william@bourbon.usc.edu Someone wrote: > I confuse with HW4 solve. From the spec I read it said that -l mean > max_t but in shell script you provided and the file output you provided > don't have the same max_t value. Such as > > ./hw4 solve -l=10 $srcdir/f1.ct > f1.solve > > But in output file > > ~csci551b/public/csac/hw4/f1.solve > > It seem to be 17 > > Auto-correlation Method > ======================= > t=1, count=44 > t=2, count=42 > t=3, count=36 > t=4, count=38 > t=5, count=48 > t=6, count=42 > t=7, count=45 > t=8, count=33 > t=9, count=33 > t=10, count=35 > t=11, count=78 > t=12, count=52 > t=13, count=39 > t=14, count=48 > t=15, count=59 > t=16, count=44 > t=17, count=47 > > What am I missing? Hmm... Looks like section (E) of the grading guidelines is out of sync with the the "solution files". The commands in (E) should be: ./hw4 solve -l=17 $srcdir/f1.ct > f1.solve ./hw4 solve -l=20 $srcdir/f2.ct > f2.solve ./hw4 solve -l=9 $srcdir/f3.ct > f3.solve ./hw4 solve -l=11 $srcdir/f4.ct > f4.solve ./hw4 solve -l=16 $srcdir/f5.ct > f5.solve I've updated the grading guidelines. Sorry about the mistake. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 4 23:33:26 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l956XQ3j009278 for ; Thu, 4 Oct 2007 23:33:26 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l956RNec014591 for ; Thu, 4 Oct 2007 23:27:23 -0700 Message-Id: <200710050627.l956RNec014591@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CSCI 531: HW4 output question Date: Thu, 04 Oct 2007 23:27:23 -0700 From: william@bourbon.usc.edu Someone wrote: > Is there a required format in terms of number of decimal > digits when printing IC or E(IC) in the "solve"? I can't seem to figure out > how to print no trailing zero, for example E(IC)=0.0658 E(IC)=0.052091148, > while keeping the same 9 decimal digit precision. I can only make it print > E(IC)=0.065800000, which of course will be caught when running 'diff'. May I > ask what function you use to print this in the sample file? Was it printf()? For printf(), please try "%.8g". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Oct 4 19:42:16 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l952gFNX029256 for ; Thu, 4 Oct 2007 19:42:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l952aE5h011136 for ; Thu, 4 Oct 2007 19:36:14 -0700 Message-Id: <200710050236.l952aE5h011136@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW-4 Date: Thu, 04 Oct 2007 19:36:14 -0700 From: william@bourbon.usc.edu Someone wrote: > 1) When we generate keys, and pass it to the checkKeys function, and if it > returns "pass" does it mean that out key is random? The checkKeys program only checks if the key file is *valid*. The grading guidelines says that you need to look at the key file visually and see if it looks random. > Just for testing what output comes out of the function, i printed > > abcdefghijklmnopqrstuvwxyz > abcdefghijklmnopqrstuvwxyz > abcdefghijklmnopqrstuvwxyz > > in file x5.keys > and when i ran $srcdir/checkKeys x5.keys it returned "pass" > > this is not a random key right? What do you think? > 2) Is the missing README really for -25 points or is it a typo? Because > previously it was -1 point. I hope you have read the spec to find out what needs to go into the README file for HW4. Please follow the spec! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Oct 3 11:43:04 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l93Ih4cr020445; Wed, 3 Oct 2007 11:43:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l93IbDoG013448; Wed, 3 Oct 2007 11:37:13 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l93IbDsV013447; Wed, 3 Oct 2007 11:37:13 -0700 Date: Wed, 3 Oct 2007 11:37:13 -0700 From: william@bourbon.usc.edu Message-Id: <200710031837.l93IbDsV013447@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Office hour for 10/4/07 (Thursday) moved! Hi all, Sorry that I have to do this again... I won't be able to stay on campus tomorrow afternoon. I'm moving the office hours to 11:00am-12:00pm. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 1 22:40:05 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l925e5JI029949; Mon, 1 Oct 2007 22:40:05 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l925YRGv010882; Mon, 1 Oct 2007 22:34:27 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l925YReV010881; Mon, 1 Oct 2007 22:34:27 -0700 Date: Mon, 1 Oct 2007 22:34:27 -0700 From: william@bourbon.usc.edu Message-Id: <200710020534.l925YReV010881@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: office hour this Tuesday moved... Hi all, Sorry that I have to do this... As it turns out, I won't be able to stay on campus tomorrow afternoon. I'm moving the office hours to 10:45am-11:45am. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Oct 1 16:08:39 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l91N8dKq008936 for ; Mon, 1 Oct 2007 16:08:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l91N33Ym005455 for ; Mon, 1 Oct 2007 16:03:03 -0700 Message-Id: <200710012303.l91N33Ym005455@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw3 query Date: Mon, 01 Oct 2007 16:03:03 -0700 From: william@bourbon.usc.edu Someone wrote: > According to the grading guidelines point 5, the real values are > allowed to be different. What would be the maximum acceptable > difference in these values? All other things being equal, I get a > maximum difference of 0.01 for values of x5. Is this acceptable? It should be fairly small! I cannot tell you have 0.01 for X5 is acceptable. You should determine for yourself if this is a bug or not! > I am also confused regarding the maximum buffer size requirement. > According to the requirements, 4096 bytes is the maximum allowed > buffer size for file I/O. Does this mean the buffer size is > restricted only for reading and writing into files and otherwise > we could allocate as large a buffer as required? You should limit your buffer size to 4096 bytes for anything related to file I/O. Chances are, if you allocate anything large intentially, you are not doing something properly and points will be take off. Why do you need to allocate anything larger than 4096 bytes? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Sep 29 20:18:12 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8U3ICMA029292 for ; Sat, 29 Sep 2007 20:18:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8U3Cpoa009594 for ; Sat, 29 Sep 2007 20:12:51 -0700 Message-Id: <200709300312.l8U3Cpoa009594@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw3 output Date: Sat, 29 Sep 2007 20:12:51 -0700 From: william@bourbon.usc.edu Someone wrote: > Professor, when testing the output for the X1 command I have the > following differences: > > ==> /home/scf-22/csci551b/public/csac/hw3/f18.x1 > 257,258c257,258 > < n = 2.47069e+06 > < n0 = 1.86128e+06 > --- > > n = 2470688 > > n0 = 1861280 > > Should all numbers that are larger than a certain threshold be > written in scientific notation? Or is this difference ok? > Thanks. For this class, all integers must be printed with all the digits! We will be printing 1024-bit integers later. So, please do not use scientific notation for integers. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 27 20:03:05 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8S335R3005234 for ; Thu, 27 Sep 2007 20:03:05 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8S2w1m9002210 for ; Thu, 27 Sep 2007 19:58:01 -0700 Message-Id: <200709280258.l8S2w1m9002210@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW3 grading guideline Date: Thu, 27 Sep 2007 19:58:01 -0700 From: william@bourbon.usc.edu Someone wrote: > Some of the output values from my program are different from the > ones in the grading guideline. In your f18.x4 the n is 2470688 > and if you calculate e6 by hand you could see e6 should be > 9651.113281, not 9651.121094 as in the file. My x6 also comes out > slightly different but I think it's caused by the difference in > e6. All other values match perfectly. Is it possible that the > values in your file are incorrect? You are right! There was a bug in my solution! It's fixed now. Sorry! If you see more bugs, please let me know! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 25 10:37:57 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8PHbvkI014521 for ; Tue, 25 Sep 2007 10:37:57 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8PHXDJA012926 for ; Tue, 25 Sep 2007 10:33:13 -0700 Message-Id: <200709251733.l8PHXDJA012926@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW 3 Date: Tue, 25 Sep 2007 10:33:13 -0700 From: william@bourbon.usc.edu Someone wrote: > In the Poker test ( X3), the pdf file describing it talks about dividing the > input s into k non-overlapping parts each of length m and > > ceil(n/m) > = 5 * (2m) , k=ceil(n/m) > > Could you please tell me how to choose the value for k and is 'n' the length > of the input s ? The spec says that "m should be as large as possible". Once you have determined n, you can try m from 1 and keep incrementing it until it no longer satisfies the above inequality in order to find largest possible m. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Sep 24 19:25:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8P2PucH029281 for ; Mon, 24 Sep 2007 19:25:56 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8P2LHQM031103 for ; Mon, 24 Sep 2007 19:21:17 -0700 Message-Id: <200709250221.l8P2LHQM031103@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Usage of RC4 OpenSSL Date: Mon, 24 Sep 2007 19:21:17 -0700 From: william@bourbon.usc.edu Someone wrote: > This may/may not have been asked, but are we allowed to use the > RC4 function that is provided in OpenSSL? The spec does not prohibit it. So, it's fine if you want to use it. Please make sure you cite it properly. Also, if there is a disagreement, you need to follow the spec. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 23 22:25:03 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8O5P398027346 for ; Sun, 23 Sep 2007 22:25:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8O5KUdQ015155 for ; Sun, 23 Sep 2007 22:20:30 -0700 Message-Id: <200709240520.l8O5KUdQ015155@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: hw3 query Date: Sun, 23 Sep 2007 22:20:30 -0700 From: william@bourbon.usc.edu Someone wrote: > This is regarding rc4 algorithm. > The command which generates RC4 output is as follows > *hw3* *rc4* *-p=*pphrase [*-l=*len] [*-states*] > here when -state option is not specified then we have to use the length > specified by -l option. Specifications say that len is the number of > bytes to output of RC4 algorithm. > > So my question is > How much bytes key do we need to generate using MD5 algorithm? Is it > same as len specified by -l option? The part about using MD5 is only to generate 256 bytes of key to be used in the key scheduling algorithm of RC4. > If the length of key (generated by MD5 algorithm) is equal to len (as > specified by -l option), > then the value of "l" in the code for key scheduling algorithm will be > same as len. > for i from 0 to 255 > j := (j + S[i] + key[i mod l]) mod 256 > swap(S[i],S[j]) > > If the length of key (generated by MD5 algorithm) is always 256, > then the value of "l" will always be 256 and as "i" goes from 0 to 255 > the value of "i mod l" is always equal to "i". And that means we don't > need to say "i mod l", just key[i] will work. Sorry about the confusion. The code on the RC4 page is the generic RC4 code. For the purpose of HW3, "l" on this page is always 256 and it's not the same as "len" in the commandline. The "len" in the commandline is the number of iteration of the while-loop you need in RC4's output algorithm. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 23 22:11:59 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8O5Bwg6026614 for ; Sun, 23 Sep 2007 22:11:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8O57QHq014985 for ; Sun, 23 Sep 2007 22:07:26 -0700 Message-Id: <200709240507.l8O57QHq014985@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW3 query: internal states not matching Date: Sun, 23 Sep 2007 22:07:26 -0700 From: william@bourbon.usc.edu Someone wrote: > I printed internal state of stream array in my program. It is showing > differences from iteration 10. Till iteration 9, it is matching with what is > given on http://merlot.usc.edu/cs531-f07/homeworks/hw3/states.txt > And on iteration 10, it is showing differences in 3 lines. If at all some > problem with my code, ideally it should show difference in 2 lines since we > are exchanging only 2 places. If my code is swapping x and y and you are swapping x and z, then we will end up with 3 locations having different values. > Can you please confirm that internal states given on website are correct? Yes! It's correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 19 21:00:51 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8K40pEe000846 for ; Wed, 19 Sep 2007 21:00:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8K3uqE9011289 for ; Wed, 19 Sep 2007 20:56:52 -0700 Message-Id: <200709200356.l8K3uqE9011289@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW3 Query: command line options Date: Wed, 19 Sep 2007 20:56:52 -0700 From: william@bourbon.usc.edu Someone wrote: > In hw3 we have the following command: > > hw3 rc4 -p=pphrase [-l=len] [-states] > > And description follows is: > Square bracketed items are optional. You must follow the UNIX > convention that commandline options can come in any order. > > As per the article I read about Unix, options starting with '-' > are optional but here we are changing this convention little bit > by saying that square bracketed items are optional. In our case, > phrase is compulsory but still starts with '-'. I recall differently! Options starting with '-' are called commandline options and things in square brakets are optional. (So, "rc4" here is not a commandline option.) > 1) So if we consider only len and states are optional (as per our > definition of optional parameters) then 3rd param should always > be -p and 4 and 5 can come in any order? > > I mean following commands are not valid: > hw3 rc4 [-l=len] [-states] -p=pphrase > hw3 rc4 [-l=len] -p=pphrase [-states] I would say that they are all valid since "commandline options can come in any order". This should actually make your code easier to write! > 2) Do we also have to consider extra blank spaces entered after = > or before =? For ex > hw3 rc4 -p = pphrase [-l=len] [-states] Blank spaces are *not* allowed around '='. Otherwise, parsing will require a lot more work. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 19 15:50:20 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8JMoJ28017003 for ; Wed, 19 Sep 2007 15:50:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8JMkM3Y007579 for ; Wed, 19 Sep 2007 15:46:22 -0700 Message-Id: <200709192246.l8JMkM3Y007579@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: HW3 RC4 commandline options problem... Date: Wed, 19 Sep 2007 15:46:22 -0700 From: william@bourbon.usc.edu Hi, Someone mentioned to me that the HW3 spec does not mention what to do if neither -l nor -states is specified for the rc4 command. In this case, please treat it as if -states has been specified. I've updated the spec. --Bill Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 18 19:45:38 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8J2jctw016545 for ; Tue, 18 Sep 2007 19:45:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8J2flMG023934 for ; Tue, 18 Sep 2007 19:41:47 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l8J2flNv023933 for cs531@merlot; Tue, 18 Sep 2007 19:41:47 -0700 Date: Tue, 18 Sep 2007 19:41:47 -0700 From: william@bourbon.usc.edu Message-Id: <200709190241.l8J2flNv023933@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: README file in your submission... Hi, For the README file in your submission, please do *not* repeat anything in the spec since we know what the spec is. Below are some examples of what should go into the README file: 1) Special instruction for compiling your program. Anything unusual about your program. 2) What's not working in your program. If your program runs very slow, you should mention it. If you think it's working 100%, please say so. 3) What additional resource you have used. What code from other sources you have used in your program (you should also cite them in your code). 4) Significant design decisions you have made. Your README should at least say something, given the above examples. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 18 13:51:58 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8IKpwU9029977; Tue, 18 Sep 2007 13:51:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8IKmA9Y016119; Tue, 18 Sep 2007 13:48:10 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l8IKmAqM016118; Tue, 18 Sep 2007 13:48:10 -0700 Date: Tue, 18 Sep 2007 13:48:10 -0700 From: william@bourbon.usc.edu Message-Id: <200709182048.l8IKmAqM016118@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Changing my office hours for this semester... Hi, I'm moving my office hours for the rest of the semester to TuTh 1:30-2:30pm. If you cannot make it and still would like to meet me between 11am and noon, I should be in my office most of the time. Although it would be best if you make an appointment and I can make sure to be in the office. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 16 17:21:55 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8H0LtmS011328 for ; Sun, 16 Sep 2007 17:21:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8H0IMoR015324 for ; Sun, 16 Sep 2007 17:18:22 -0700 Message-Id: <200709170018.l8H0IMoR015324@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Fwd: Doubt regarding HW #2 Date: Sun, 16 Sep 2007 17:18:22 -0700 From: william@bourbon.usc.edu Someone wrote: > I am a bit confused and was hoping that you could clear it out for me. The > project specifies that the pbm file be "encrypted" with the stream cipher. > So by encrypting do you intend to mean that we use a one time pad ( e.g.: > xor )? Encryption should be done with "visual cryptography" defined by the HW2 spec. Please read the first section of the HW2 spec and read the related reference if you did not come to class. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 13 12:09:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8DJ9qoL018027; Thu, 13 Sep 2007 12:09:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8DJ6jfY027055; Thu, 13 Sep 2007 12:06:45 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l8DJ6jRV027054; Thu, 13 Sep 2007 12:06:45 -0700 Date: Thu, 13 Sep 2007 12:06:45 -0700 From: william@bourbon.usc.edu Message-Id: <200709131906.l8DJ6jRV027054@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: I will be out of town (with no e-mail) this Friday and Saturday... Hi, Just a reminder that I will have no e-mail access starting Friday morning and won't have e-mail access until Sunday around noon time. I apologize for the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 13 10:03:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8DH3aOU011273 for ; Thu, 13 Sep 2007 10:03:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8DH0Uh0024966 for ; Thu, 13 Sep 2007 10:00:30 -0700 Message-Id: <200709131700.l8DH0Uh0024966@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CS531 HW2 Date: Thu, 13 Sep 2007 10:00:30 -0700 From: william@bourbon.usc.edu Someone wrote: > I have two questions about hw2. > > 1. To encrypt pbm file, does the stream cipher size have to be longer > than image size (without P4 and image size)? Yes. The "small.pbm" example in the spec illustrates this. The "small.pbm" is a 17x17 pixel images. So, the number of data bits is 289. The keystream printed in the example is: cf686d0977103817 aa632cf32cd1740c dd385c5dbb878cea f06f47bc6617b922 3110b66250 The above is 37 bytes of data. 37*8=296. If we use only 36 bytes (or 36*8=288 bits), that's not enough to encrypt 289 bits of data. Therefore, we need 37 bytes of data. This also implies that, using the same example, you should think of the input data as a stream of 289 bits of data and (not 51 bytes of data). So, when you reach the end of the first line of data bits, you need to throw away 7 bits of data (because 17 bits of data takes 3 bytes to store in the PBM file), but you should *not* throw away any key bits there. You should continue to use the key bits for the next row without throwing away any key bits. > 2. When a command for encrypting is entered, how does the program get > the stream cipher? the stream cipher created by the first phrase has to > be store as a temp file and then the second phrase reads the stream > cipher from the temp file to encrypt the image? That's not a good way to go. But if you want to do it that way, please make sure that you create the temporary file in /tmp using something like mkstemp() to generate a filename for you. Another way to do this is to structure your code such that your can return 8 bytes of keystream every time you call the keystream generation function. This way, many parts of your program can use the same function. For the stream command, you just need to call it the right number of times. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 13 00:32:45 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8D7Wjwh013229 for ; Thu, 13 Sep 2007 00:32:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8D7TgQC018450 for ; Thu, 13 Sep 2007 00:29:42 -0700 Message-Id: <200709130729.l8D7TgQC018450@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CS531: hw2 Date: Thu, 13 Sep 2007 00:29:42 -0700 From: william@bourbon.usc.edu Someone wrote: > In the second HW if pbmfile option in the following command > hw2 encrypt -p=pphrase -out=name [pbmfile] > is missing then we are supposed to take the input from stdin. > My question is , are we supposed to assume that the input from > stdin will adhere to PBM file format , > that is, the user will enter P4\n17 17\n ..and so on..?? If not , > then how should we interpret the > input from stdin? The normal way is to do: cat FILE.pbm | ./hw2 encrypt ... So, the input will be a PBM file. Please see the grading guidelines for examples of how the commands will be used in grading. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 12 23:08:10 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8D68A5I008698 for ; Wed, 12 Sep 2007 23:08:10 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8D6589k016871 for ; Wed, 12 Sep 2007 23:05:08 -0700 Message-Id: <200709130605.l8D6589k016871@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW2 Date: Wed, 12 Sep 2007 23:05:08 -0700 From: william@bourbon.usc.edu Someone wrote: > The typecasting is working properly now. Now while compiling it is saying: > > Undefined first referenced > symbol in file > MD5 stream.o > ld: fatal: Symbol referencing errors. No output written to a.out Well, the "ld:" above means that it's a problem during linking and not compiling. > I have included openssl path in my /.login file. > I have also included the header > I compiled using the "*-I/home/scf-22/csci551b/openssl/include*" option > > I am not using any make file now. Just compiling stream.cc file with only > the MD5(pphrase.....) line. Since it's a linking problem, you should use the -L... stuff with -lcrypto. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 12 10:30:03 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8CHU2ue032345 for ; Wed, 12 Sep 2007 10:30:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8CHR4Dl006336 for ; Wed, 12 Sep 2007 10:27:04 -0700 Message-Id: <200709121727.l8CHR4Dl006336@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Doubt in HW2 Date: Wed, 12 Sep 2007 10:27:04 -0700 From: william@bourbon.usc.edu Someone wrote: > In HW2, the stream cipher algo says: > > The idea here is that the buffer whose MD5 checksum is getting computed has > 3 parts. The first part is 16 bytes long and it is the MD5 checksum of the > previous value of the buffer. The 2nd part is an ASCII string of length 2 > that takes on the value from "00" through "99". The 3rd part is the > passphrase. Initially, the first part is the MD5 checksum of the > passphrase. > > For example, if pphrase is "yesnomaybe", The 3 parts of the buffer is, > initially, in hexstring representation, > 69cbe89bfa6370e0ab07df9a6096d3d2, 3030, and 7965736e6f6d61796265. The MD5 > checksum of this buffer is cf686d0977103817538bfefdf271be2f. Therefore, the > first 8 bytes of our simple stream cipher output is cf686d0977103817. > > 1) In this example, "3030" is the for "00", "7965736e6f6d61796265" is for > "yesnomaybe", "cf686d0977103817538bfefdf271be2f" is the MD5 checksum, what > is "69cbe89bfa6370e0ab07df9a6096d3d2" If you do the following, you should see this pattern: echo -n "yesnomaybe" | openssl md5 > 2) The algo computes the values in an infinite loop. We have to calculate > this only once right? You need to increment the middle part and replace the first part and keep doing this until you have output enough bytes. > 3) MD5 needs const unsigned char * while sprintf and fwrite needs char *. i > am getting compilation errors in this. A simple typecast would do. You need to do typcasting often in C/C++ code! Basically, you are telling the compiler that you know what you are doing! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 11 19:20:03 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8C2K3il014944 for ; Tue, 11 Sep 2007 19:20:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8C2HAAG027044 for ; Tue, 11 Sep 2007 19:17:10 -0700 Message-Id: <200709120217.l8C2HAAG027044@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: PBM file format Date: Tue, 11 Sep 2007 19:17:10 -0700 From: william@bourbon.usc.edu Someone wrote: > I am a bit confusedabt the PBM file format. > would both of these below be valid file formats? > In the definition when a whitspace is mentioned , does it imply a > single white space or multiple whitespaces? > > > file 1 > ====================== > P4 100 24 > > ============================= > > file 2 > ========================== > P4 > 100 > 24 > > ================================= Actually, you are correct that after P4 there can be multiple whitespace characters (such as , , , ). The data file you will be using will only have a single whitespace charater and that's all you need to handle for HW2. If you want to write code to handle this general format, that would be fine since it's compatible with what HW2 requires. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 11 15:24:17 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8BMOHh0002658 for ; Tue, 11 Sep 2007 15:24:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8BMLPT9024464 for ; Tue, 11 Sep 2007 15:21:25 -0700 Message-Id: <200709112221.l8BMLPT9024464@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Cannot link Date: Tue, 11 Sep 2007 15:21:25 -0700 From: william@bourbon.usc.edu Someone wrote: > I am trying to write the stream cipher program. But when I link the > libcrypto.a I got this error. > > > gcc -Wall -c -I/home/scf-22/csci551b/openssl/include stream.c > gcc -Wall -c -I/home/scf-22/csci551b/openssl/include hw2.c > gcc -Wall -L/home/scf-22/csci551b/openssl/lib -lcrypto hw2.o stream.o > Undefined first referenced > symbol in file > MD5 stream.o > ld: fatal: Symbol referencing errors. No output written to a.out > collect2: ld returned 1 exit status > *** Error code 1 > make: Fatal error: Command failed for target `hw2' > > I don't know what am I missing. Do you have any clue? I think you need to put the .o files before -lcrypto. Please try: gcc -Wall hw2.o stream.o -L/home/scf-22/csci551b/openssl/lib -lcrypto If this doesn't work, please let me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 11 13:16:40 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8BKGejm028234 for ; Tue, 11 Sep 2007 13:16:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8BKDnYn022055 for ; Tue, 11 Sep 2007 13:13:49 -0700 Message-Id: <200709112013.l8BKDnYn022055@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW2 query Date: Tue, 11 Sep 2007 13:13:49 -0700 From: william@bourbon.usc.edu Someone wrote: > I have downloaded the openssl library for Visual studio on > windows. > I have also added the /bin, /lib and the /include files to the > visual studio paths. > but when i compile , the md5.h header is read. > but during linking , it is not able to find the file containing > the bpdy of MD5 function. > am i missing out on someting? I'm sorry but I cannot help you with anything on Windows! I would recommend downloading and installing cygwin if you have a highspeed connection to the Internet. Then you will at last have something that's pretty much UNIX (with gcc/g++, openssl). For more information about cygwin, please see: http://merlot.usc.edu/cs531-f07/cygwin/ -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Sep 10 21:54:10 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8B4sAwT017842 for ; Mon, 10 Sep 2007 21:54:10 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8B4pO1R009682 for ; Mon, 10 Sep 2007 21:51:24 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l8B4pO4F009681 for cs531@merlot; Mon, 10 Sep 2007 21:51:24 -0700 Date: Mon, 10 Sep 2007 21:51:24 -0700 From: william@bourbon.usc.edu Message-Id: <200709110451.l8B4pO4F009681@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Bistro server problem... Hi all, I needed to reboot bourbon.usc.edu this afternoon around 4pm but forgot to start the Bistro server after the reboot. I have just started the Bistro server. If you had trouble making a submission, I apologize. It should be working now. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Sep 10 09:42:49 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8AGgnGD018720 for ; Mon, 10 Sep 2007 09:42:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8AGe7v7025521 for ; Mon, 10 Sep 2007 09:40:07 -0700 Message-Id: <200709101640.l8AGe7v7025521@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW2 doubt Date: Mon, 10 Sep 2007 09:40:07 -0700 From: william@bourbon.usc.edu Oops! I meant "#include ". Sorry about the typo. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 10 Sep 2007 09:16:36 -0700 From: william@bourbon.usc.edu To: cs531@merlot.usc.edu Subject: Re: HW2 doubt Someone wrote: > For implementing the stream cipher using MD5, which header file > do we have to use? You should do "#include Do we need to install an additional package fr the same?? The spec mentioned that you should look at the following web page: http://merlot.usc.edu/cs531-f07/openssl.html Please read it carefully and follow the instructions there! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Sep 10 09:19:18 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8AGJIWw017653 for ; Mon, 10 Sep 2007 09:19:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8AGGaBw025153 for ; Mon, 10 Sep 2007 09:16:36 -0700 Message-Id: <200709101616.l8AGGaBw025153@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW2 doubt Date: Mon, 10 Sep 2007 09:16:36 -0700 From: william@bourbon.usc.edu Someone wrote: > For implementing the stream cipher using MD5, which header file > do we have to use? You should do "#include Do we need to install an additional package fr the same?? The spec mentioned that you should look at the following web page: http://merlot.usc.edu/cs531-f07/openssl.html Please read it carefully and follow the instructions there! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 9 20:07:17 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8A37Hgb018278 for ; Sun, 9 Sep 2007 20:07:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8A34de5016230 for ; Sun, 9 Sep 2007 20:04:39 -0700 Message-Id: <200709100304.l8A34de5016230@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW1 doubt: not receiving email after submitting Date: Sun, 09 Sep 2007 20:04:39 -0700 From: william@bourbon.usc.edu Someone wrote: > I have submitted hw1 using bsubmit but not yet received an email > (correctly used config option). Since we allow multiple submissions, we do not send e-mail every time you submit. Eventually, when I gather your submissions, I will pick the last on-time submission. When I download them, you will get an e-mail. This usually happens the day after the submission deadline. > Without email confirmation, how > can I verify my submission? Firstly, when you run bsubmit, please exam the output of bsubmit *carefully* and make sure you understand what it's saying. If not, please see: http://merlot.usc.edu/cs531-f07/bsubmit.html Regarding "verifying your submission", please see the bottom of: http://merlot.usc.edu/cs531-f07/submit.html#verify You should follow this to make sure what you have submitted is gradable. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 9 20:01:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8A31NmM018096 for ; Sun, 9 Sep 2007 20:01:23 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8A2wjfa016142 for ; Sun, 9 Sep 2007 19:58:46 -0700 Message-Id: <200709100258.l8A2wjfa016142@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: doubt in HW1 Date: Sun, 09 Sep 2007 19:58:45 -0700 From: william@bourbon.usc.edu Someone wrote: > My hexdump program output uses A,B,C,D,E,F in the ouput for the > hexadecimal notation of input characters. where as the sample > output file uses a,b,c,d,e,f. Is that allowed or do i need to > convert them to smaller case? Please change your code to match the grading guidelines! When we grade, we will use the script and run the diffs. So, your program must produce exactly the same output or you will not get credit for it! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 9 18:48:37 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l8A1mbgY015817 for ; Sun, 9 Sep 2007 18:48:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l8A1k0EI015032 for ; Sun, 9 Sep 2007 18:46:00 -0700 Message-Id: <200709100146.l8A1k0EI015032@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW1 Doubt Date: Sun, 09 Sep 2007 18:46:00 -0700 From: william@bourbon.usc.edu Someone wrote: > In the grading guidelines it is mentioned: > > ./hw1 dec-base64 $srcdir/f202.b64 > /dev/null > (should generate error messages to stderr) > > > Does this mean that the error messages, if produced, should be redirected to > stderr ? Exactly! > Or should this statement produce some error which again should be redirected > to stderr? I don't know how to "redirect output to stderr". The regular data output should go to stdout. This means that all error messages should go to stderr. Otherwise, you may not see the error messages. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Sep 7 22:34:48 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l885Ymue032701 for ; Fri, 7 Sep 2007 22:34:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l885WQxI025543 for ; Fri, 7 Sep 2007 22:32:26 -0700 Message-Id: <200709080532.l885WQxI025543@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW1 script doubt Date: Fri, 07 Sep 2007 22:32:26 -0700 From: william@bourbon.usc.edu Someone wrote: > For hexdump I have tried the script given in the grading guidelines. > It doesnt work as given in then guidelines. The following doesn't recogonise > "foreach" > > set srcdir=~csci551b/public/csac/hw1 > > /bin/rm -f f?.hex > foreach f (0 1 2 3 4 5 6 7 8 9) > echo "===> $srcdir/f$f" > ./hw1 hexdump $srcdir/f$f > f$f.hex > diff $srcdir/f$f.hex f$f.hex > end > > I modified it to the following: (modifications are in red) > > set srcdir=~csci551b/public/csac/hw1 > > /bin/rm -f f?.hex > > for f in 0 1 2 3 4 5 6 7 8 9 > do > echo "===> $srcdir/f$f" > ./hw1 hexdump $srcdir/f$f > f$f.hex > diff $srcdir/f$f.hex f$f.hex > done > > the script now runs properly but it takes the filepath as /f0 instead of > /home/scf-22/....../hw1/f0 > so this shows error message when i try to open the file. > > instead if i modify the script and write the whole path instead of $srcdir > the script runs as expected and the output is according to the grading > guidelines. > > set srcdir=~csci551b/public/csac/hw1 > > /bin/rm -f f?.hex > > for f in 0 1 2 3 4 5 6 7 8 9 > do > echo "===> $srcdir/f$f" > ./hw1 hexdump > /home/scf-22/csci551b/public/csac/hw1/f$f > f$f.hex > diff /home/scf-22/csci551b/public/csac/hw1/f$f.hex > f$f.hex > done > > now with this script my program works as required. > > what should i do? > will this modified script be considered correct? Item (4) at the top of the grading guidelines says: The scripts below are for csh/tcsh. If you use bash, please modify them where necessary. Or, you can do "tcsh" and then run the scripts. Are you using "bash" as your login shell? If you do, please do "tcsh" before you run the scripts! Our grading account runs csh/tcsh, so we will be using the grading script. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 6 10:38:32 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l86HcWY4028950 for ; Thu, 6 Sep 2007 10:38:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l86HaNs2029283 for ; Thu, 6 Sep 2007 10:36:23 -0700 Message-Id: <200709061736.l86HaNs2029283@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query regarding home work 1 Date: Thu, 06 Sep 2007 10:36:23 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a query in homework 1 of CS531 > > My base64 programs run correctly for the files as given in your > grading guidelines. My hexdump program seems to run correctly. > But the diff command always outputs the last line as being > different. Amazingly, it outputs the last line of both the files > and there seems no apparent difference between them. > > I have tried all ways and means possible but haven't been able to > understand the error. I have tried to figure out any extra line > breaks but couldn't find any. > > The output of the diff command is as follows: > > 87c87 > < 000560: 42 60 82 -- -- -- -- -- -- -- -- -- -- -- -- -- B`~ > --- > > 000560: 42 60 82 -- -- -- -- -- -- -- -- -- -- -- -- -- B`~ > nunki.usc.edu(14): > > Could you suggest something? Are the file sizes the same? My guess is that they might be different by 1 byte! Another thing you can do is to compare the hexdump of the hexdump and compare them! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 5 22:59:14 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l865xEO0008215 for ; Wed, 5 Sep 2007 22:59:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l865v9bK020638 for ; Wed, 5 Sep 2007 22:57:09 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l865v8RT020637 for cs531@merlot; Wed, 5 Sep 2007 22:57:08 -0700 Date: Wed, 5 Sep 2007 22:57:08 -0700 From: william@bourbon.usc.edu Message-Id: <200709060557.l865v8RT020637@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Please make sure you run through the grading guidelines! Hi, Just a reminder that it is for your benefit that the grading guidelines for the HW assignments are provided. You should definitely take advantage of it. It would be a very good idea to run your code against it and make sure you got everything right. If you are not sure about commandline syntax, please use the grading guidelines to see how the grader will run your code! If you have misunderstood the spec, you cannot get credit for your code. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 5 22:48:14 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l865mEB1007880; Wed, 5 Sep 2007 22:48:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l865k93h020514; Wed, 5 Sep 2007 22:46:09 -0700 Message-Id: <200709060546.l865k93h020514@bourbon.usc.edu> To: cs551@merlot.usc.edu, cs531@merlot.usc.edu Subject: Re: Office Hour tomorrow (9/6/07) moved ... Date: Wed, 05 Sep 2007 22:46:09 -0700 From: william@bourbon.usc.edu Hi, I'm sorry that I have to do this... But the change of office hour tomorrow is canceled! I will now have to move my office hour next Tuesday, 9/11/07, to 2-3pm. Sorry about the inconvenience! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 5 Sep 2007 11:42:56 -0700 From: william@bourbon.usc.edu To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Office Hour tomorrow (9/6/07) moved ... Hi, For tomorrow only, I need to move my office hour to 2-3pm. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 5 21:45:04 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l864j4CY005527 for ; Wed, 5 Sep 2007 21:45:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l864gxMa019447 for ; Wed, 5 Sep 2007 21:42:59 -0700 Message-Id: <200709060442.l864gxMa019447@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: HW1 question Date: Wed, 05 Sep 2007 21:42:59 -0700 From: william@bourbon.usc.edu Someone wrote: > I am using function setbase (iomanip.h) for hexdump program. > Is it allowed? Sure! This is somewhat like printf() in C. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 5 19:41:14 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l862fD70001834 for ; Wed, 5 Sep 2007 19:41:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l862d9l8017696 for ; Wed, 5 Sep 2007 19:39:09 -0700 Message-Id: <200709060239.l862d9l8017696@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query Regarding CS531-hw1 Date: Wed, 05 Sep 2007 19:39:09 -0700 From: william@bourbon.usc.edu Someone wrote: > One of the point mentioned in Grading Guidelines is > > "Using external library to do base64 encoding/decoding : -30 > points > visually inspect the Makefile and see if the code is linked with > the crypto library or other libraries > > I am not using any crypto library for encoding/decoding. However > I am using a math function pow(x,y) implemented in standard unix > mathematical library. Is it fine to use this function or I need > to write one by myself? It is perfectly fine. > Please let me know so that if required, I can change my code > accordingly. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 5 11:44:58 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l85Iiwe9020283; Wed, 5 Sep 2007 11:44:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l85IguLb013102; Wed, 5 Sep 2007 11:42:56 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l85IguYP013101; Wed, 5 Sep 2007 11:42:56 -0700 Date: Wed, 5 Sep 2007 11:42:56 -0700 From: william@bourbon.usc.edu Message-Id: <200709051842.l85IguYP013101@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Office Hour tomorrow (9/6/07) moved ... Hi, For tomorrow only, I need to move my office hour to 2-3pm. Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 4 20:00:04 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l85304MM024102 for ; Tue, 4 Sep 2007 20:00:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l852w87S002875 for ; Tue, 4 Sep 2007 19:58:08 -0700 Message-Id: <200709050258.l852w87S002875@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CSCI 531: Minor mistake in grading guidline Date: Tue, 04 Sep 2007 19:58:08 -0700 From: william@bourbon.usc.edu Someone wrote: > This is probably insignificant but I thought I will let you > know. In the grading guideline Part (C), > > > > /bin/rm -f f?.dat > > foreach f (100 101) > > echo "===> $srcdir/f$f" > > cat $srcdir/f$f.b64 | ./hw1 dec-base64 > f$f.dat > > diff -c $srcdir/f$f f$f.dat > > end > > > > I assume "/bin/rm -f f?.dat" suppose to delete the files, namely "f100.dat > and f101.dat", that may already exist. If this is correct, then this may not > work since the '?" represents only one character, but in this case we need > three (ie. f???.dat). You are correct. I've changed them to: /bin/rm -f f100.dat f101.dat Thanks for pointing out the bug! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 4 12:32:49 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l84JWnlB010923 for ; Tue, 4 Sep 2007 12:32:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l84JUt5D029259 for ; Tue, 4 Sep 2007 12:30:55 -0700 Message-Id: <200709041930.l84JUt5D029259@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Query regarding the guidelines Date: Tue, 04 Sep 2007 12:30:55 -0700 From: william@bourbon.usc.edu Someone wrote: > I have few questions on the grading guidelines. I have implemented the > enc-base64 / dec-base64 / hexdump as specified. They work as expected. I had > a look at the grading guidelines and wanted to know how to execute the > following: > > set srcdir=~csci551b/public/csac/hw1 > > # > # for the following commands, each correct answer gets 1 point > # > /bin/rm -f f?.hex > foreach f (0 1 2 3 4 5 6 7 8 9) > echo "===> $srcdir/f$f" > ./hw1 hexdump $srcdir/f$f > f$f.hex > diff $srcdir/f$f.hex f$f.hex > end > > # > # for the following commands, each correct answer gets 1 point > # > /bin/rm -f f?.hex > foreach f (0 1 2 3 4) > echo "===> $srcdir/f$f" > cat $srcdir/f$f | ./hw1 hexdump > f$f.hex > diff $srcdir/f$f.hex f$f.hex > end > > To extend the testing I would like to know how to get the above code > working. > > My code works fine if inputted as: ./hw1 hexdump or ./hw1 enc-base64 > or ./hw1 dec-base64 > > Is this how it is supposed to be working or am I missing something? You should just cut and paste into your xterm window and it should work (please do not cut and paste the lines that start with "#"). This is assuming you are running csh/tcsh as your login shell. At the top of the grading guidelines, item 4 states that if you are using something like bash, you should do "tcsh" and then run these scripts under tcsh. If this is not working, please let me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 4 09:59:09 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l84Gx98i006149; Tue, 4 Sep 2007 09:59:09 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l84GnhJt026445; Tue, 4 Sep 2007 09:49:43 -0700 Message-Id: <200709041649.l84GnhJt026445@bourbon.usc.edu> To: cs551@merlot.usc.edu, cs531@merlot.usc.edu Subject: USC Programming Contest Date: Tue, 04 Sep 2007 09:49:43 -0700 From: william@bourbon.usc.edu Dear students, Please see below for an announcement for the USC Programming Contest. If you plan to participate, please note that you need to do this *on your own time*. I'm sorry that I would not give extensions for assignments and you will not be execused for exams if you decide to participate in this. -- Bill Cheng // bill.cheng@usc.edu ---------------------------------- cut here ---------------------------------- USC Programming Contest THE ELIGIBILITY CRITERIA HAVE CHANGED. The contest is open to all undergraduate and graduate USC students, regardless of major, as long as they were born in 1984 or later. Saturday, September 15, 2007 in RTH 105/115 practice (1-2pm) and contest (2-6pm) www.cs.usc.edu/contest organized by David Kempe, Sven Koenig and Upsilon Pi Epsilon Have fun! Extend your resume! Show how smart you are! Impress your friends! Win cash and other prizes! Represent USC at the ACM Programming Contest! Do you like to solve problems like the following ones? To pay your friends a dollar, you can give them, for example, four quarters, or five dimes and ten nickels. Write a program that calculates how many different combinations of coins there are that make up a given amount of money from pennies, nickels, dimes and quarters. You are given the description of a lake as a polygon, as well as your own position in a boat somewhere on the lake. When you throw a rock in the water, the waves travel away from the impact point at a speed of 1 meter per second. Write a program to calculate the earliest time at which a wave will hit the shore. You are given the names of n people, who are to be divided into k alphabetical segments, for instance, to stand in line for registration at USC. An "alphabetical segment" consists of all people whose last name starts with a letter between two given endpoints (for example, D-H). Write a program that finds a division into k alphabetical segments such that each person is in exactly one segment, and the number of people in the largest segment is minimized. Participate in the USC Programming Contest! The contest is open to all undergraduate and graduate USC students, regardless of major, as long as they were born in 1984 or later. We use the USC Programming Contests to pick students that we train for the ACM Regional Programming Contest. Students from USC placed 2nd in the ACM Regional Programming Contest in Fall 2006, ahead of the teams from all participating UC schools, including UC Los Angeles, UC San Diego, UC Irvine and UC Santa Barbara! Find out more by visiting the contest webpage www.cs.usc.edu/contest If you would like to keep updated about the contest, please sign up for our mailing list at groups.yahoo.com/group/usc-programmingcontest Please contact Prof. David Kempe (dkempe@usc.edu) with any questions and to register for the contest. Registration deadline is September 13, 2007. Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Aug 29 21:29:42 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l7U4TfNu024230 for ; Wed, 29 Aug 2007 21:29:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l7U4L1S1010207 for ; Wed, 29 Aug 2007 21:21:01 -0700 Message-Id: <200708300421.l7U4L1S1010207@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: CSCI531: HW1 Date: Wed, 29 Aug 2007 21:21:01 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a few questions regarding HW1. > > 1. When the program takes input from stdin, should it continue > to take input even when Enter is pressed (ie. '\n') and actually start > executing at end-of-file (ie. )? You should always treat the input file as if it's a binary file. Then, '\n' has no significance. I think in the above case, you are trying to handle keyboard input. Please remember that in the case of taking input from stdin, the idea is to pipe something into your program. For example, if you want to do a hexdump of "/bin/ls", you would do: cat /bin/ls | ./hw1 hexdump If you really want to read from the keyboard, then when you press , you should get a '\n' character and that's should be treated as part of the input. WHen you press , the is *not* a character. It will indicate a End-Of-File condition and you can detect this in your code. > 2. For enc-base64, when we have to insert trailing 0, do you > mean ASCII '0' or series of 0 (ie. 00000)? You should read the base64 spec. You should put a zero there. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Aug 29 09:12:08 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l7TGC8CN003023 for ; Wed, 29 Aug 2007 09:12:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l7TG3W0g002677 for ; Wed, 29 Aug 2007 09:03:32 -0700 Message-Id: <200708291603.l7TG3W0g002677@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: Re: Mistake on midterm date... Date: Wed, 29 Aug 2007 09:03:32 -0700 From: william@bourbon.usc.edu Hi everyone, I'm reporting this so that it goes into the class message archive. Again, the midterm date is Monday, 10/22/2007. Thanks! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 27 Aug 2007 22:28:48 -0700 From: william@bourbon.usc.edu To: ... Subject: Mistake on midterm date... Hi, Just realized that I have made a mistake on the midterm exam date! It should be on Monday, 10/22/2007 (and not on Wed, 10/24). Sorry about the mistake. I've fixed it on the class web page. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Aug 13 00:23:50 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.0 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id l7D7NohJ018525 for ; Mon, 13 Aug 2007 00:23:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id l7D7HSsq017634 for ; Mon, 13 Aug 2007 00:17:28 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id l7D7HS59017633 for cs531@merlot; Mon, 13 Aug 2007 00:17:28 -0700 Date: Mon, 13 Aug 2007 00:17:28 -0700 From: william@bourbon.usc.edu Message-Id: <200708130717.l7D7HS59017633@bourbon.usc.edu> To: cs531@merlot.usc.edu Subject: getting on the class mailing list... Hi, If you have not done so, please go to the following page: http://merlot.usc.edu/cs531-f07/mailinglist.html and register with the class mailing list. Register with this list is *required* for this class. Thanks! -- Bill Cheng // bill.cheng@usc.edu