[VicPiMakers Projects] Jim's Challenge - Output 10 (caesar cipher)

Patrick McMorris patrick at mcmorris.ca
Sun Oct 11 11:34:44 EDT 2020


I agree it's not that clear.

If the goal to be able to simply run the existing code on new input bytes
then yes, "BIOPSY" is always the decrypted word since the byte array is the
only given input. If the word changes, that hasn't been specified where
that input would come from. So, either it doesn't change or the description
of the second input is missing.

But using a hard-coded word doesn't sound terribly interesting to code up.
You could still write your key finding function to accept two strings of
equal length and output the required caesar key. Then for question #10,
call it with the word you extract from the input array and the hard-coded
target word and write the output key. Then the problem is hard-coded but
your code is more generic.


Patrick

On Sun., Oct. 11, 2020, 8:01 a.m. Greg H, <greg.horie at gmail.com> wrote:

> For me, the confusion is that we're intended to write code to derive the
> cipher key value. I did this and came up with an answer, but this key is
> only relevant "HOUVYE" / "BIOPSY".
>
> So should I take this key and make it a constant for future inputs /
> encryptions? That's what I ended up doing with my final code submission.
>
> I took out the code that solved the problem because unused code seems like
> lint to me, but maybe I should put it back to show how I did it.
>
>
> On Sat, 10 Oct 2020 at 17:45, James Briante <briantej at gmail.com> wrote:
>
>> Hi Patrick,
>>  Yes, you can look at only the first character of the string and use it
>> to get the key. Comparing all characters as the advantage of catching
>> errors in encryption/decryption. The code is just as short using
>> "compare strings"  of your particular language.
>>
>> In C int strcmp (const char* str1, const char* str2);, in C++ *int*
>> *CompareText*(*const* AnsiString *S1*, *const* AnsiString *S2*); Pascal
>> ( Delphi) *function* *CompareText*(*const* *S1*: *string*; *const* *S2*:
>> *string*): Integer;
>>
>> Aside: The purpose of the final test data is to see if your outputs are
>> correct when you run your code with the new data. It should work the first
>> time with no changes in the actual code.
>> Jim
>>
>> On Sat, Oct 10, 2020 at 4:46 PM George Bowden <gtbowdeng at gmail.com>
>> wrote:
>>
>>> Hi Michelle
>>> If you are on a laptop or computer using chrome, you can hold down the
>>> CTRL key and tap the letter u .  There are things further back than that
>>> but its a start.  As for ink marks showing through, we try to avoid that
>>> because it usually reveals security holes that the bad people exploit.
>>>
>>> On Sat, Oct 10, 2020 at 1:23 PM Michelle Wiboltt <
>>> michellewiboltt at outlook.com> wrote:
>>>
>>>> Please help:)
>>>> Here’s where my crazy comes in, see this image...
>>>> [image: Image.jpeg]
>>>> Ok.
>>>>
>>>> Now, if u could think in terms of front back / embroidery and its front
>>>> back...
>>>> So, above is a code interface? But where is the back front and back?
>>>> Front would be the website, right? So, when I do online shopping, that’s
>>>> the front. Where is the back view of the front of the website?
>>>>
>>>> Another example, when writing in ink it can show through the backside
>>>> when held to the light, kind of thing is what I’m trying to understand?
>>>> Where’s that on the internet?
>>>>
>>>> Thx
>>>> m
>>>>
>>>> Michelle Wiboltt
>>>> www.elb1b69.net
>>>> 604-612-2505
>>>>
>>>> ------------------------------
>>>> *From:* Projects <projects-bounces at vicpimakers.ca> on behalf of Greg H
>>>> <greg.horie at gmail.com>
>>>> *Sent:* Saturday, October 10, 2020 8:56:49 AM
>>>> *To:* projects at vicpimakers.ca <projects at vicpimakers.ca>
>>>> *Subject:* [VicPiMakers Projects] Jim's Challenge - Output 10 (caesar
>>>> cipher)
>>>>
>>>> I'm looking for clarification on output 10 - caesar cipher problem.
>>>>
>>>> Is the intent to calculate the caesar cipher key value OR is the intent
>>>> to encrypt the string with a pre-determined key? Initially I thought the
>>>> question was to discover the cipher key value, but on reflection this seems
>>>> fragile.
>>>>
>>>> Reasoning:
>>>> - "BIOPSY" will work for the 12 integer input that leads to "HOUVYE",
>>>> but it will not work for any 12 random integers.
>>>> - You'd have to reverse engineer your integers starting from "BIOPSY"
>>>> to get a valid set of 12 integers.
>>>>
>>>> I solved it both ways, but posted only the 2nd solution to github
>>>> because only the 2nd solution will work for a random set of 12 integers.
>>>>
>>>> I'm curious how other folks solved this one.
>>>>
>>>> --
>>>> Projects mailing list
>>>> Projects at vicpimakers.ca
>>>> http://vicpimakers.ca/mailman/listinfo/projects_vicpimakers.ca
>>>>
>>>
>>>
>>> --
>>> George Bowden, vice president, Victoria Computer Club
>>> gtbowdeng at gmail.com
>>> --
>>> Projects mailing list
>>> Projects at vicpimakers.ca
>>> http://vicpimakers.ca/mailman/listinfo/projects_vicpimakers.ca
>>>
>> --
>> Projects mailing list
>> Projects at vicpimakers.ca
>> http://vicpimakers.ca/mailman/listinfo/projects_vicpimakers.ca
>>
> --
> Projects mailing list
> Projects at vicpimakers.ca
> http://vicpimakers.ca/mailman/listinfo/projects_vicpimakers.ca
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vicpimakers.ca/pipermail/projects_vicpimakers.ca/attachments/20201011/a9e257c6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image.jpeg
Type: image/jpeg
Size: 2402854 bytes
Desc: not available
URL: <http://vicpimakers.ca/pipermail/projects_vicpimakers.ca/attachments/20201011/a9e257c6/attachment.jpeg>


More information about the Projects mailing list