It's UWAweek 47

help3007

This forum is provided to promote discussion amongst students enrolled in CITS3007 Secure Coding. If posting a question, it's suggested you check first whether your question is answered in the unit Frequently Asked Questions (FAQ) list, and use the search box (on the right) to see if an answer to your question has already been posted.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Note that any posts must comply with the UWA Code of Conduct and the UWA Academic Conduct Policy. That means you should (a) treat everyone with respect and courtesy, and (b) not post your solutions to an assessment that's in progress.

If asking a programming question, it's recommended you read How do I ask a good question? If reporting or troubleshooting a bug in software used in the unit, it's recommend you read How to report bugs effectively.
Displaying the 8 articles in this topic
Showing 8 of 170 articles.
Currently 21 other people reading this forum.


 UWA week 18 (1st semester, week 9) ↓
SVG not supported

Login to reply

👍?
helpful
10:54am Fri 3rd May, ANONYMOUS

Hi, Are we able to assume that the given range does not apply to the output of an encrypt function call or do we need to fit the output of the function to match this range? For example, if encrypting from 'A' to 'Z', can the cipher text go outside these bounds and contain punctuation? The project only mentions that the plain text must be between this range. Thank you


SVG not supported

Login to reply

👍?
helpful
1:37pm Fri 3rd May, Arran S.

Hi,

Can you clarify, what part of the spec or code are you referring to, when you say "The project only mentions that the plain text must be between this range"? I can't spot anything in the spec which imposes such a requirement.

Amongst other things, the spec says (in section 3.1.1):

characters in plain_text that fall within the range range_low to range_high are encrypted, but everything outside that range is not -- it is simply copied directly into ciphertext.

If there were a requirement that the plaintext fall within the range, it wouldn't make any sense to talk about "everything outside that range".

Cheers

Arran

ANONYMOUS wrote:

Hi,

Are we able to assume that the given range does not apply to the output of an encrypt function call or do we need to fit the output of the function to match this range?

For example, if encrypting from 'A' to 'Z', can the cipher text go outside these bounds and contain punctuation? The project only mentions that the plain text must be between this range.

Thank you


SVG not supported

Login to reply

👍?
helpful
1:43pm Fri 3rd May, ANONYMOUS

Hi again,

Yes, sorry for not clarifying, the section that you mentioned is what I was referring to. My understanding is that we should encrypt and decrypt according to those range_low and range_high values, incorporating wraparound. I have since had a closer look at the brief and this seems to be the case.

Thank you


SVG not supported

Login to reply

👍?
helpful
2:44pm Fri 3rd May, Arran S.

No worries. Just to explain why it's done this way: often, example presentations of e.g. the Caesar cipher will operate only on uppercase alphabetic characters, and everything else is "passed through". But sometimes you might want to treat, say, punctuation or lowercase letters as being part of the "alphabet" the cipher uses. So the spec allows you to specify which characters will be encrypted and which won't.

cheers

Arran

Hi again,

Yes, sorry for not clarifying, the section that you mentioned is what I was referring to. My understanding is that we should encrypt and decrypt according to those range_low and range_high values, incorporating wraparound. I have since had a closer look at the brief and this seems to be the case.

Thank you


SVG not supported

Login to reply

👍?
helpful
11:42am Sat 4th May, ANONYMOUS

Hi Arran, does this mean we are free to decide whether our function encrypts lower case alphabets and punctuation characters?


SVG not supported

Login to reply

👍?
helpful
2:19pm Sat 4th May, ANONYMOUS

Hi, I don't understand what the function call would look like if we were including punctuation within the range. Would you be able to provide an example of this? Thanks.


 UWA week 19 (1st semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
12:42pm Mon 6th May, Arran S.

Hi,

I think you may have a fairly major misunderstanding of the project specification and the header file you're provided with. My first suggestion would be to first make sure you've read through the whole of the specification and the provided header file. My next suggestion would be to discuss it in your lab with the lab facilitation staff.

If that doesn't help, then perhaps post again, saying what you currently understand, and what you're still unclear about.

cheers,

Arran

ANONYMOUS wrote:

Hi Arran, does this mean we are free to decide whether our function encrypts lower case alphabets and punctuation characters?


SVG not supported

Login to reply

👍?
helpful
12:43pm Mon 6th May, Arran S.

Hi,

As a first step, I'd suggest you show what you think it might look like - presumably you can make some guesses?

Cheers

Arran

Hi,

I don't understand what the function call would look like if we were including punctuation within the range. Would you be able to provide an example of this?

Thanks.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy