Monday, December 19, 2016

Cyber Crime Rapid Research Reflection

Based on your conversations with other groups, what cybercrimes did you learn and hear about?

I learned about Russian hacking in Britain and the U.S.


How were these attacks done?

They were done by hacking and fake news.


Had you heard about these cybercrimes prior to today's discussion? 

I've heard about Russian hacks interfering with the election.


List at least 6 steps you would recommend to avoid the cypercrimes you researched as well as the cybercrimes your group researched.

Don't download suspicious attachments
Don't blindly trust emails you receive
Get a antivirus
Update your computer regularly
Don't visit suspicious websites
Have good passwords

Wednesday, December 14, 2016

Navajo Code Talkers Reflection

1. What was the article about?
Navajo code talkers.

2. Identify at least 3 key ideas you learned from this article
The U.S. used the Navajo language to send messages.

Navajo code was stronger and faster than conventional encryption methods.

Each marine battalion had 2 code talkers, one to receive messages and one to encrypt and send them.

Most effective for short messages

3. How does this article relate to encryption, keys, passwords, etc?  What is the connection between what you learned in this article and our current discussion?

The article was about encrypting messages using languages. It somewhat relates to our discussions in class because we have been discussing encryption, but this type of encryption is much different then what we have been doing. 


4. What is the impact of  what you learned in this article?

The impact from the article was that Navajo code talkers were able to create a unbreakable encryption for the U.S, and were able to improve conditions on reservations and awareness of Native Americans as a reward for their service.

Combination Cipher Research

  1.  As detailed information as possible on its algorithm.
  2. The history of this cipher
  3. What you would have to do to crack the cipher
  4. Provide an example of this cipher
  5. Describe the process you follow to crack the code
A combination cipher is a key based cipher that uses a polybius square. The website section for combination ciphers did not exist, so I focused on the ADFGX cipher..

first, the message is put through a mixed alphabet 5x5 polybius square

    A D F G X
A b  t   a  l   p 
D d  h  o  z  k
F q  f   v  s  n
G g  j  c  u  x
X m r  e w  y

 I and J get combined to make the whole alphabet fit. Once the message is converted into a fractioned form using the square, it is put through a columnar transposition cipher. The message is written out in rows under the transposition key. The columns are then sorted by alphabetic order of the key, then sent in columns. ADFGVX is the same thing, just with a 6x6 polybius square allowing for 36 characters. 

The ADFGVX cipher was first used by the germans in World War 1. The cipher was broken by french lieutenant Georges Painvin in 1918. One trick he used was to find messages with stereotyped beginnings. These messages would fractionate the same and form similar patterns in the cipher text which corresponds to column headings in the transposition table. He also used repeating sections of ciphertext to determine the likely length of the key. Using frequency analysis, he could find pairings of letters and then with the proper pairings use frequency analysis to find the plain text. The plain text was transposed, but could easily be unscrambled.

Example:
plain text: attack at once

conversion through polybius square:
AF AD AD AF GF DX AF AD DF FX GF XF

Columnar transport using cargo as the key:

C A R G O
_________
A F A D A
D A F G F
D X A F A
D D F F X
G F X F

Sort letters:

A C G O R
_________
F A  D A A 
A D G F F
X D F A A
D D F X F
F G F     X

Collapse columns:
FAXDF ADDG DGFFF AFAX AFAFX

Computationally hard reflection

  • 1) Describe what it means for a problem to be “computationally hard.”
A problem is computationally hard if a computer cannot solve it within a reasonable time
  • 2) What strategies do people use to solve large computationally hard problems?
One strategy is to brute force the problem, testing every possible solution until it finds the best one.
  • 3) Why are computationally hard problems important in encryption strategies?
Computationally hard problems are important because you don't want your encryption to be easily cracked. If it is computationally hard, the computer cannot decrypt it in a reasonable amount of time, making it safe.

Monday, December 12, 2016

Hotspot Reflection

  1. What was the smallest set of hot spots they were able to find?
5
  1. What types of heuristics did you employ to find your solution? (e.g., pick the most connected corners first)
I looked at the corners first, then moved towards the center.
  1. Use this opportunity to recall this vocabulary from the previous lesson. A heuristic is just a strategy for arriving at a “pretty good” solution when there’s no obvious way to get a perfect one.

  1. Are you sure this is the actual smallest? How could you be certain?
I'm pretty sure its the smallest. I haven't found any other combinations. 

Encryption Reflection 2

  1. How much easier is it to crack a Caesar cipher than a random substitution cipher? Can you put a number on it?
A lot easier. All you need to do is shift the alphabet until the letters make words.
  1. Was it difficult to crack a Random Substitution cipher? Did it take longer than you thought? shorter? Why?
It's difficult to crack because it requires a lot of manual analysis. It took a lot longer to crack than I thought because you had to guess what each letter is depending on the frequency. 
  1. Any encryption cipher is an algorithm for transforming plaintext into ciphertext. What about the other way around? Can you write out an algorithm for cracking a Caesar cipher? What about a random substitution cipher?
You could easily create a algorithm to crack a Caesar cipher and probably a algorithm to crack a random substitution cipher with a bit more work.

  1. Recall that in RFC 3271, “The Internet is for Everyone” Vint Cerf wrote the following. What did he mean by “cryptographic technology?” What does it mean to you now?
That access to encryption technology should be free to access for everyone.

Friday, December 9, 2016

Vigenere Cipher Reflection

“From what you’ve seen what are the properties of the Vigenere Cipher that make it harder to crack? In other words, if you had to crack a vigenere cipher what would you do?

It's harder to crack because it requires a key. Keys make it so you can't just switch around the letters to find out the original message. No part of the original message should exist in the vigenere cipher's encryption unless the key is weak.

To crack a vigenere cipher, I would need to try and figure out the secret key, probably through brute forcing many different keys until I found the right one.

Thursday, December 8, 2016

Day 3 Stage 4 Reflection

  1. “In your daily life what things do you or other people rely on keeping a secret? Who are these secrets being kept from? How are these things kept secret?“
I rely on my passwords, credit cards, and personal information being secret from anyone who wants to use them for a malicious purpose. They are kept secret by passwords, security, and encryption. 

Secret message decrypted: free pizza in the cafeteria

Wednesday, December 7, 2016

WSJ Reflection

  • “This lesson is entitled The Cost of ‘Free.’ What does that mean to you now?”
In economics we learned that there is no such thing as a free lunch. It may seem free, but it has hidden costs. Everything is done for profit, including “free” things.
  • “How would you explain The Cost of ‘Free’ to a family member, or person you just met, if you had only 60 seconds?”
It is free to use, but it costs you personal information.

Reflect on your reading the Wall street Journal below  the reading
  • “Right now, which way are you leaning? Too little privacy? Right amount?“
I think I am leaning towards too little privacy. Free apps are starting to want access to information that has no relevance to making a better experience for the user. For example, miss Stark’s flashlight application wanting location data. I’m fine with apps wanting some of my data as long as it is secure, and relevant.
  • “Are you willing to give up some privacy (and potentially some security) to have free access to modern innovative tools - do you trust companies to be good stewards of your data?“
I am willing to give up privacy to have free access to tools. I already do by using google applications. I trust that companies will take good care of the data, but I don’t give them any sensitive data incase they fail to.
  • “Are you concerned? Do you think too much of your data is out of your control? Do you think too much personally identifiable data is given over to someone else?”


Tuesday, December 6, 2016

Blown to bits ch 2 reflection

The implications are that almost any data can be used to identify you, even if it is de-identified. Using only your birthday and zip code, people can find out who you are, and possibly other things such as medical records.

    What information can you find about people here?  Provide at least 4 examples of how this information could be used in a manner that could compromise someone's privacy and have a negative impact on their lives.

The information about discharge data is sold, which could lead to someone being able to connect that info to you given enough information. They could find out about your medical history.

Your insurance company could be breached, leading to somebody getting their hands on your medical info, and social security numbers.

The company you work at could be hacked, and the hackers could get access to your insurance information and social security numbers.


A accreditation company could be breached, leaving people vulnerable to identity theft, and huge amounts of personal data.

Monday, December 5, 2016

Research yourself sheet

Unit 4 Lesson 03
Name(s)_______________________________________________ Period ______ Date ___________________


Activity Guide - Research Yourself

Your Digital Self

You may already be aware of information about you that is freely available online, but you probably haven’t thought about it from the standpoint of research. Suppose someone were to research you online. What would they be able to find? What connections could they make from the existing data out there to learn even more about you?

Conducting Your Research

You should look through any publicly available pieces of information online. Start by simply looking up your name in a search engine but then refine your results by adding more specific information, like the place you live. Don’t forget social networks, your school website, or any other websites you frequently use.

Record Your Findings

In the space below record the information you find about yourself. If you know something is available online but can’t get to it now, record it anyway. If you need more space, you can record your findings on the back of this sheet as well.

Information
Where you found it
Ap comp sci blog
Google +
Google
Google

Now connect the dots.  If someone really wanted to find out about you online, given the information above, what would they know about you?

That I’m a male who takes ap computer science



Of the pieces of information you found above, which do you think poses the biggest threat to your security or privacy? Why do you think so?

The AP comp sci blog is the biggest threat. They possibly could try to find what school
I go to based on my blogs.



Thursday, December 1, 2016

Big data and Moore's law predictions

What is big data:

Big data is any large amount of data.

Moore's law: Moore's law states that every X years, the amount of microprocessors on a chip is doubled

Wednesday, November 30, 2016

Space Ship Scene Reflection



  1. The purpose of the code is to create a scene in space. It works by calling multiple functions that create objects such as spaceships and planets. The most important features are randomized planets with craters, a ufo, a black hole, and a spaceship with animated fire.

  1. The most difficult part for me was the fire for the spaceship. It had to be animated, and look like fire. I achieved the fiery look by making the fire made out of 2 curves, one to the left and one to the right. I then turned the turtle 180 degrees and repeated it, so it got to the original start position of the flame. I then took a stored variable of the distance away from the center of the ship, and had it return to the center. To animate the flames, I had the draw flames loop for infinity, which made new flames constantly, making it animated.

  1. An abstraction I used was to split up the main function of drawing the spaceship into smaller sub functions. I had a simple main function that was split up into smaller more complex functions. The main function called functions to draw the body of the ship, the top, the rocket, and the flames. The main function also had a parameter to rotate the ship. Functions with parameters are a type of abstraction.


  1. We used collaboration to split up the tasks into manageable chunks. We each had sections of code we chose to make. Collaboration was also used for feedback. Before putting everything in the main code, we shared our result and our team mates gave their feedback on it so it could be improved.

CODE:
function drawShip(angle) {
  hide();
  turnTo(angle);
  drawBody();
  drawTop();
  drawRocket();
  drawFlames();
}
function drawBody() {
  penDown();
  penColor("#FA6323");
  penWidth(20);
  turnLeft(90);
  moveForward(15);
  for (var i = 0; i < 3; i++) {
    turnRight(90);
    moveForward(30);
  }
  turnRight(90);
  moveForward(15);
  turnRight(90);
  moveForward(15);
  dot(21);
  penColor("black");
  dot(15);
  penColor("#FACF23");
  dot(13);
}
function drawTop() {
  penUp();
  penColor("#7A7A7A");
  moveForward(40);
  dot(15);
  moveBackward(10);
  turnRight(90);
  moveForward(15);
  turnLeft(90);
  penDown();
  turnLeft(30);
  for (var i = 0; i < 2; i++) {
    moveForward(30);
    turnLeft(120);
  }
  moveForward(30);
  penUp();
  moveBackward(15);
  turnLeft(90);
  moveBackward(22);
}
function drawRocket() {
  penUp();
  moveBackward(40);
  penColor("#4A4A4A");
  penDown();
  penWidth(15);
  turnLeft(90);
  moveForward(5);
  turnLeft(30);
  moveForward(15);
  turnLeft(150);
  moveForward(30);
  turnLeft(150);
  moveForward(15);
  turnRight(60);
  penUp();
  turnLeft(90);
  moveForward(3);
  turnLeft(90);
}
function drawFlames() {
moveForward(15);
speed(100);
var originalDist;
var arcDist;
for (var i = 0; i < 1; i) {
  turnRight(90);
  penRGB(255, randomNumber(104, 175), 17, 1);
  penWidth(randomNumber(2, 6));
  penDown();
  originalDist = randomNumber(-20, -2);
  arcDist = randomNumber(15,40);
  moveForward(originalDist);
  turnLeft(90);
  arcRight(30, arcDist);
  arcLeft(30, arcDist);
  turnRight(180);
  arcLeft(30, arcDist);
  arcRight(30, arcDist);
  turnRight(180);
  arcLeft(30, arcDist);
  arcRight(30, arcDist);
  turnRight(180);
  arcRight(30, arcDist);
  arcLeft(30, arcDist);
  turnRight(90);
  moveForward(originalDist);
  turnRight(90);
}
}
drawShip(0);

Wednesday, November 23, 2016

Smiley Face

https://studio.code.org/projects/applab/U_jdUmHE-fs-h2KCsjBu8w

https://studio.code.org/projects/applab/gZij3sn3oweRYoALNHxD9A

Monday, November 21, 2016

Functions with parameters

Prompt: 1.  Develop a rule for deciding when to create a function with a parameter rather than a normal function. Below your rule write a couple sentences justifying your rule.
Whenever you have a function that needs an input, use parameters. For example, if you had a function that took 2 numbers and added them, then multiplied them together, you would want a parameter for the input.

Prompt 2. When do you need a function with a parameter?
Whenever you need a outside input to the function.

Iteration

Define and provide examples of iteration:
Iteration: loops, repeating something.

examples: loops in code. for loops, while loops, and do while.

Friday, November 18, 2016

Smiley code reflection


Copy and paste your code to create your smiley face.  

penColor("lightgreen");
dot(500);
penUp();
penColor("purple");
penWidth(5);
move(0, -175);
penDown();
move(0, 50);
penUp();
move(0, 50);
turnRight(45);
penColor("red");
penDown();
arcRight(180, 25);
moveForward(50);
penUp();
moveTo(160, 165);
turnTo(-45);
penDown();
arcLeft(180, 25);
moveForward(50);
penColor("purple");
penUp();
moveTo(140, 300);
penDown();
turnTo(-90);
arcLeft(180, 25);
penUp();
moveForward(40);
penDown();
moveForward(10);
arcLeft(180, 12.5);
arcRight(180, 12.5);
moveForward(10);



What challenges did you face in this lab?
The biggest challenge was finding where to put all of the dots/curves

How did you solve these challenges?  
I figured out the center of the coordinate grid by guess and check, then offset the dots a equal distance from the center.

Did you collaborate with others in class?
no

Did you get or provide help to other "programmers" in class?  With what?  What documentation did you use for this lab today?  
I used the documentation from code.org

Provide examples of other libraries you are familiar with in other programming languages.

I’m familiar with a lot of the libraries in Java, such as the input, and the math librarys.

Wednesday, November 16, 2016

Unit 3 stage 5 reflection

function drawStep(){
 moveForward();
 turnLeft();
 moveForward();
 right();
}

function right(){
 turnLeft();
 turnLeft();
 turnLeft();
}
function drawSide() {
 drawStep();
 drawStep();
 drawStep();
 moveForward();
 right();
}
function drawDiamond() {
 drawSide();
 drawSide();
 drawSide();
 drawSide();
}
drawDiamond();

1. Prompt: “List the benefits of being able to define and call functions in a program. Who specifically gets to enjoy those benefits?”
Everyone enjoys the benefits of functions. It makes programmer’s lives easier, and also makes the code easier to read and understand. It organizes code, saves you from writing repeating code, and makes the code easier to read.

2. Prompt: “How is the use of a function an example of abstraction?”
Functions are an example of abstraction because it can make parts of your code reduced to essential commands. It reduces large chunks of code into nicely named functions, which give only the essential data. Within the function, only the relevant data is passed into it, making it simplified.

3. Prompt:  Explain more than one reason why programming languages have functions.

Functions are useful tools to split up code and make it look logical, while also being able to reuse sections of code. For example, if I had a section of code that calculated (number A x number B - 52)/5, or something that took out a section of a string, instead of rewriting that code, I could just use a function, and call that function inputting the numbers. They also organize code. Instead of having a large chunk of code that does a complicated math function, you could send it to a function, which might be named takeDerivative(). That way you know it takes the derivative of the function, without seeing the large chunk of code.

Monday, November 14, 2016

Ch 3 Stage 4 reflections

Define efficiency in programming.
When we are trying to be "efficient" in our programming what are some (valuable) resources we might be concerned with?  Why does it matter?

I think efficiency in programming is using the minimum amount of code to run a program with the minimum amount of resources needed. The resources we might be concerned with is storage space, amount of ram used, and how much computing power your program requires. It matters because if your computer uses too many of one of these resources, it will slow down the program and any other program being used on the user's computer. This will end up with frustration from the user, and drive them away from your program.


Thought Prompt: What is the “most efficient” way to program the solution for the 3x3 grid?
I know for sure that my solution was not the most efficient, but I think that the most efficient would be a program that minimizes right turns. Right turns take up 3 commands, and cutting down on those would be the easiest way to cut down on code.


  • What surprised you about programming with such a small set of basic commands?
I was surprised there  was no right turn.

  • Were you able to be creative with such a limited set of tools?

I was not very creative, but looking back, if I started out the second program with a right turn, and made the box the opposite direction, it would create 3 left turns  and a right, instead of 4 right turns, which is 12 left turns.

  • What was most frustrating about this activity? If you could add one additional simple command, what would it be, and why?
It was frustrating not having a right turn. I would add a right turn command, because it would cut down on a lot of left turn commands needed.

  • Draw (on paper) the simplest image you can that we would be unable to create with our “building block” commands, and explain why it would be impossible to create.
One simple image would be a triangle. The program is unable to create angled lines.



  • Draw a second image we would be unable to create with the given simple commands, but for a different limiting reason than you cited in the first drawing
One other image would be a circle. The program is unable to draw curved lines.

Thursday, November 10, 2016

Sorting Algorithm Reflection

Write a human machine language program that: Repeatedly shifts the left hand to the right until it finds a 5 or 6 The program should stop when the left hand is at (or past) the end of the list, or it finds a 5, or it finds a 6.

1
Shift LH right
2
if LHCard EQ 5, jump to line 6
3
if LHCard EQ 6, jump to line 6
4
if LHPosition EQ 7, jump to line 6
5
jump to line 1
6
stop



Find min:


1
jump to line 3 if RHand LT LHand
2
shift RHand right
3
move LHand to RHand if RHand LT LHhand
4
jump to line 1 if RHPos NE 7
5
Stop

When working with your partner in class, what challenges did you face in writing your algorithm? Were you able to solve it? If yes, then How did you solve it?  

     One challenge we had to solve was when our partition algorithm got stuck in a infinite loop. It would keep going through the lower value cards with no stop point. To fix this, we made it so the cards don't go to position 0 if they were smaller than the initial card value, and instead stayed in their original position. That way, we could end the "program" when the left hand reached the card at position 0.

Make connections with our algorithms and previous coding experience we have:
What programming statements have you used in the past that you would use in writing your algorithms?  Have you written similiar programs?  If yes write the programs that you remember writing.(you are not giving me the code just making connections here and remembering what you have done)

     Some statements I would use are if, >, <, =, and while loop. I think I have written a program in the past to sort numbers.