55 Matching Annotations
  1. Last 7 days
    1. One important fact to observe is that the frequencies don't change in a transposition, so there's just as many e's here as there are here, and that would be true for the entire transposition cipher so we can use frequency analysis to determine which method was used in encrypting a message. So, for example, here's two messages one was encrypted using a substitution cipher and one was encrypting using a transposition Cipher. Use this letter counter app to help you figure out which is which method

    2. So far, we've just looked at a couple of substitution ciphers where the way you create the ciphertext is you substitute a letter from the cipher alphabet for a letter from the plain alphabet. Well, there's another type of encryption known as transposition. In that case, you don't substitute letters. You just rearrange the letters in the original message, and there's lots of rearrangements. So, for example, if you have a message with 100 letters who's basically a hundred factorial ways that those could be rearranged, so this is quite a good way to encrypt text. And, for example, if we take the the message hello world, this is a transposed message and transpose it. You would see something like this. Can you see the transposition rule? You can see it from the first word. I'm simply reversing every five letter sequence in the original message. So, hello becomes this world becomes this, and so on.

      So far we've been talking about substitution ciphers, where ciphertext letters are substituted for plaintext letters. A transposition cipher is one where the letters in the message are rearranged -- the alphabet is unchanged. 。 Plaintext: hello world this is a transposed message • Transposed: olleh dlrow isiht artas sopsn semde egas

    3. So is this simple substitution Cipher uncrackable? Well, let's wait a minute here. It's not, for example, one of the pieces of information we can use in analyzing simple substitution is the letter frequencies of the English language or any language If you looked at a histogram of English letter frequencies, you'd see that e is the most frequent letter just above 12 percent, T is the second most frequent at somewhere around nine percent, a is very frequent at more than eight percent and so forth, so you would see this familiar pattern in any text that you encrypted. For example, if you encrypted it using the simple substitution Cipher, you might get this pattern, but you'd still see a peak where the letter that was substituted for e occurs. And maybe this is the peak for T, and maybe this is the peak for a. By analyzing those peaks and valleys, you can determine how the message was encrypted, can figure out the key. But, wait a minute… frequency analysis works!<br /> Slide 21, 22 chart

      E.G. If you sorted by frequencies. Now, you can see this very clearly if you sort the two histograms, they're practically identical, and that's what lets the analyst with some effort, of course, figure out the key and break the message so you can break simple substitution cipher using frequency analysis. That makes Eve happy, Alice and Bob are not very happy about that. Eve wins … you don’t need brute force. Frequency analysis will break simple substitution. slide 23, 24 chart

    4. The last question how many keys would you have to try in order to perform a Brute Force attack on simple substitution? Let's look at that question again. The answer is an enormous number 26 factorial Keys. That's the number of ways you could shuffle the plain text alphabet of 26 letters. So that's way too hard. And that fact makes Alice and Bob happy and Eve not very happy.

    5. Simple Substitution Cipher

      Key: Randomly mix up the plain alphabet to get a cipher alphabet.

      So the key basically tells what to do with getting a cipher alphabet to be able to encrypt either the key consisting of a number for shifting each letter or a keyword to put in beginning as a way of scrambling

      Algorithm: Substitute plain letters with shuffled letters.

      This tells how to encrypt the message using to cipher alphabet

    6. Well, let's look at a slightly more complex Cipher, another example, of what's called a simple substitution Cipher, which means generally that you randomly mix up the alphabet to get a cipher alphabet and then you substitute plain letters with shuffled letters, so we're gonna use a little trick here that we're going to have a keyword that'll help us (one way to) construct our Cipher alphabet, which is our actual key by putting the keyword at the beginning and then putting all the letters that aren't in the word, zebrafish following it in alphabetical order. Now, obviously, there are lots of ways we could do this, but that gives us an easy way to transmit the key between Alice and Bob. Alice just tells Bob zebrafish and he knows how to construct this alphabet. But if they wanted, Alice could simply create a permutation or shuffling of this alphabet, not using the keyword and pass that along to Bob. Once you've created the cipher alphabet, encrypting and decrypting, in simple substitution cipher works the same as it did in Caesar Cypher. For each letter in the plane text message, you replace it with the corresponding letter from the cipher alphabet. Of course, you have many more possible Cipher alphabets because the alphabets aren't merely a shifting of the original plain alphabet. chart

    7. How do you crack a Caesar Cipher? In other words, how does Eve break these messages? Well, the one question you might ask is, well, how many different keys would Eve have to try to do what's called a Brute Force attack? That means try every possible key. As you've probably discovered, the answer is 25 Keys. That's way too easy, so Eve is very happy about that because she can easily break Caesar Cypher. chart

    1. Okay, so let's continue our discussion of how the internet works. The next important concept is that protocols that manage the internet are govern. The Internet organized into distraction levels. Here's one representation of this model. This is called a TCP IP model, so you see, there's four layers in this model application layer, transport layer, Internet layer, and link layer each plays a distinct role, and each has its Associated protocols that manage traffic and manage processing of data at that layer. Here's an example well, well, first of all, an important

    2. This connection is the impression that is given by the technology you're using, which makes it look that way. Let's now look at another network utility called Trace route that lets us Trace how packets are routed through the internet. You can also get to this through the network tools site, and this time you want to select the trace tool and suppose I want to trace packets as they travel between Network tools and MIT. I put in MIT, I click go MIT.edu, and it shows me MIT's, IP address.

    3. Is packet switching like a landline telephone connection between A and B? One misconception that frequently found about the internet is when you're browsing a website or sending an email or talking on the phone through your smartphone. It might seem to you like, you have a channel between the between you and your destination. Well, that's not the case package switching is not like what's called circuit switching, which is the kind of switching that was done when we used land lines to communicate in circuit switching. You actually do have a channel that remains constant throughout the call between the receiver and the caller. That's a dedicated channel. Only this caller and receiver are on that channel in a packet switch Network. There is no such sustained connection, and each individual packet each little voice packet. When you're talking on, the phone is being shipped through the internet along multiple routes. What seems to you to be a continuous connection is the impression that is given by the technology you're using, which makes it look that way. Include packet vs. circuit switching picture

    4. This sort of design and in this redundancy that you get by being able to have multiple paths through the network. It leads to a network that can withstand various kinds of outages and disasters, so for example, compare a centralized network where all the messages have to go through a central server or central router. What happens if that router gets knocked out, well, you can no longer communicate on that network. You've broken the entire network. Compare that to a decentralized network, such as this one, one path between A and B, is shown in red here. Now, if nodes get knocked out, you can still find a path from A to B. This redundant routing capability gives the network a robustness that you don't have with a centralized network. Include the centralized vs. decentralized network comparison under decentralization and redundancy

    5. Why is this protocol used? Well, the story goes back to the Cold War in the 50s. When we were worried about nuclear attacks from enemies like the Soviet Union and the desire was to create a network architecture that withstands that. The idea was that to come up for a decentralized network with multiple paths between any two points A and B, and then you would simply divide the message into small packets and route them independently, where each router along the path simply forwards the packets to another router along the path.

    6. how data travels through the internet. It uses a protocol called packet switching and imagine you're sending an email to your friend and it's a long email. Your email application is going to hand that off to a protocol that's going to break that message into fixed size, relatively small packets. So, those are P1, P2, P3. Here, those packets are going to be sent through the internet to the destination. So, this is the source your computer, let's say, and this is your friends. Can take different routes through the network when they arrive at their destination. Of course, they have to be gathered together there and then then reassembled, and there s no guarantee they re going to arrive in the order P1, P2, P3, but they have to be reassembled in that order in order for you to read them. Include email packet switching example

    7. the Ping activity, which we learned about in a previous lesson to try reaching some hosts on the internet. Here's an example of a utility called Network tools.com that we can use the picture shown here is demonstrating how we use it to do ping. So, as you notice, Network tools has a bunch of tools that you can select here. The one you want to select for this activity is the Ping utility. Basically, you put in the domain name of the computer you're trying to reach or the host you're trying to reach and click the go button, and it will display this information. And then it shows you that it has sent a number of packets to this IP address, and it's reporting on the round trip time it takes for a packet to reach that host, and then for the host to reply back, that it's received it, and it then shows you here what the average latency for the round trip was for that particular ping. Include image in the ping activity

    8. The internet uses a basic end-to-end architecture. Messages are sent from, say, a host A to host B, but messages have to travel through one or more routers, depending on where these two hosts are are located, and hosts are simply computers that are connected to the internet, so that could mean your laptop or your smartphone or tablet and hosts are given IP addresses or Internet. Hosts are reachable either by means of their IP address or by their domain name. For example, the host trincall.edu, the main computer for Trinity College, has this domain name and this IP address: 157.252.10.123. We're going to learn a lot more about how that works in a subsequent lesson. Routers compared to hosts are dedicated computers that transmit data between networks within the internet. Include diagram of hosts and routers

    9. As you might recall, the Internet is really a network of disparate networks signified here by the different colored local networks. The different colored dots are the host computers on the network and they're connected by routers, which are special purpose computers that deliver messages through the internet. Include the diff. networks and routers diagram

    10. In this lesson, we're going to talk about the internet's architecture and some of the protocols. As you might recall, we talked about the internet back in unit 2, where we learned that the internet and the World Wide Web were distinct things. One way to think about that is the internet is the hardware that runs applications like the World Wide Web, which is software. In this lesson, we're going to talk about basic internet architecture, Packet Switching. Packet switching, which is how information is routed through the internet. The tcpip protocol, which manages the traffic through the internet, as well as how the internet is organized into different abstraction layers. Let's

    11. This presentation covers the following topics: ⚫ ° Basic Internet architecture ° Packet switching ° TCP/IP Internet Protocol Suite Internet abstraction layers

    1. What is the digital divide? What are some ways to reduce the effects of the digital divide?

      The digital divide is the divide on the access of the digital world of technology through the networks and the hardware where people have access to it and the Internet while some don't. Some ways to reduce the effects of the digital divide are to have places on hand where people can go for Internet and technology access, lend people with the hardware and internet access such as from schools, and provide funding to earn money for those who don't have enough to get the Wi-fi and hardware.

    2. What do you think affects the differences in bandwidth globally as well as in different locations in the U.S.?

      A main thing that directly affects the bandwidth and is so different across locations globally is access to the Internet and strength of the connectivity of the Internet, fastness, which is then affected by the location you're in or how much money one has to afford it.

    3. Why is it a useful measure?

      Bandwidth: Once measured, It tells us maximum capacity In which the data is transferred over one’s network

      Latency: Allows us to know if there is a lag to then fix

    4. As a recap, bandwidth and latency are two measures of internet performance. Bandwidth is the throughput or how much data per second can be transferred in terms of uploading and downloading. Data in latency refers to the amount of time it takes a piece of data to reach its destination

    5. So, an example of what you might see in the results table, you can see ttl (time to live (# of hops to get to destination)), a count of how many times they did it the number of hops that it took in order to get there. And then, rtt (round trip time (time to destination + time get reply)) is the routing time or the time it took for that signal to be sent and then for us to get an acknowledgment back that they received the signal. And you can see the average time in terms of milliseconds, so there was on average 20 milliseconds for us to ping the MIT.edu server

    6. Another term related to the internet performance is latency, so we just talked about bandwidth, which is the throughput or the speed that you can upload and download information latency, then, is a measure of the time. It takes a piece of data to reach its destination. So, it's typically measured in milliseconds or thousandths of a second. A ping activity, which will measure the latency of your network. So, ping is a networking utility used by Network administrators to measure the administrators to measure the latency on the internet. So, what you can do is, you can go to a website and use their ping utility to test the reachability of certain hosts.

    7. Broadband Access definitely an issue in terms of thinking about if you have access to the internet, but you don't have Broadband access where broadband referring to high-speed internet service. Then, that means that you may not be able to use the web as effectively, or use the resources that are on the web as effectively. So, if you have Broadband, that usually means that you have it through a cable or DSL modem in a DSL, digital subscriber line, one that's connected via your home telephone Network. You can see here, there's about 72 percent Broadband penetration in its member. So, within the OECD (The Organization for Economic Co-operation and Development) countries, and you can see some of them listed there. You'll notice that a couple of them Finland, Australia, Japan, Sweden, Denmark, create even the United States. It's just barely over that 100 percent mark. So, what that means is that there is more than one Broadband connection for every person. So, for example, I have a connection. I have multiple connections, including my cable network here at home. I have an internet service plan for one of my tablets, and I also have cellular data plans, you know, for each of the phones that are in our house. So, if you start to think about the different plans you have four different devices. You can see how we're now getting over a hundred percent penetration, but to notice that many countries, like if you go down to the last one, they're on the list. Mexico doesn't even have 25 penetration for Broadband yet, so that means that they're using something, means if they have internet access, because more than 25 of Mexico's population has internet access. They are using something slower than Broadband access.

    8. Let's take a look at what bandwidth is on a global scale. So, bandwidth speeds vary across the globe, depending on where you're at and what kind of internet access you have. The current Global average is about 18.4 megabit speed download. Korea leads the world with 52.4 megabits per second and in the US. The average is about 24.4 megabits per second. The higher the number is especially with the units, the faster it is.

    9. Bandwidth or throughput is the rate at which data is downloaded or uploaded in a network, and it can be measured in bits per second, kilobits per second (thousands), megabits per second (millions). Usually you see it either in kilobits or megabits per second. There are websites for a test that you can use to measure your download speed.

    10. Just to refresh your memory. We're looking at the differences between the internet and the World Wide Web in terms of the World Wide Web being an application that runs on top of the internet, which is a network of networks. And in that worldwide web. A lot of times, you are transferring data back and forth. You are transferring web pages and images so that you can view them in your browser. So, the question of Internet performance is really about how fast your web pages load and what goes into figuring that out.

    11. So, let's look at how that transaction takes place. Let's suppose you're visiting a web page in your browser, and there's a link on it. www.host.edu/page.html, now your browser is viewing a document that is coded in the Hypertext Markup Language, which is the language used to code web pages. So, when you click on that link, your browser knows to send a request over the Internet for that page that you've requested to a web server at host.edu at this location www.host.edu that URI corresponds to an IP address. The IP protocol knows how to route that request to a particular server at host.edu, and that server is constantly listening on Port 80 (A port is a memory location in the server's RAM that is connected to software that listens for incoming requests.) for incoming HTTP requests. When it gets the request it needs to access the page that you requested page.html, so it goes to its disk drive, retrieves the page.html with all of its included resources. In this case, there's a picture smiley.png, and it then sends it back encoded as an HTML document, of course, to the browser that requested it. The browser then renders the page, and it appears the way you'd expect it to. So those are the seven parts of the transaction seen from a high level. We'll look in some detail later on. Another example is bring up an app in App Inventor like paint pot.

      Include HTTP ans HTML model picture.

    12. A client computer, client software request services from a server located on the internet. For example, a client makes a request to a server over the Internet to respond to the request. So, for example, (EG: Gmail stores messages on Google's servers and processes requests to send/retrieve messages.) suppose you're running Gmail in your Firefox browser on your computer when you request that it refresh your email list. A request goes out from your browser to Google's Gmail server, and it responds by sending you an updated list of your emails (INCLUDE PICTURE OF THIS EXAMPLE)

    13. Web resources are hosted by Web servers which respond to HTTP requests. The resources themselves are stored or hosted on computers designed with software to manage those resources. These are called web servers. They are the ones that respond to the HTTP requests that you make in the client server model,

    14. What happens when accessing web pages using the HTTP protocol? Hypertext transfer protocol is the protocol that manages the World Wide Web. Use it in that protocol resources on the web, whether they be images or web pages or files are accessed by means of their Uniform Resource Identifiers or their Uris. For example, here's a URI for Wikipedia's English language site: http://en.wikipedia.org/index.html. Resources are accessed by means of browsers like Firefox, Chrome, Safari, IE, …

  2. Nov 2025
    1. When the modulus of 2 (the remainder when dividing by 2) = 0, then it is even

      When the modulus of 2 (the remainder when dividing by 2) = 1, then it is odd

    2. So to sum up, a PRNG is a computational 'model' of randomness, as such, it's an abstraction, its a simplification of true randomness. Whenever you have a model of something, you can always ask,

      "Well, is it a good model?" What would that mean in this case? Well, it would mean... * How does it do when you ask it to generate a number in the range 1 to 100? Does it give us a good distribution of numbers? * If you use it to simulate a coin flip, is it going to give us a good distribution of heads and tails? Equally likely to generate “Heads” or “Tails”? 50/50? * What about drawing a card out of a deck? What are the odds gonna be 1 and 52? Is it equally likely to draw any card out of a shuffled deck of 52 cards?

      So those are some of the questions that you could ask

    3. LCGs are not the only type of PRNGs. They have some good qualities, they have pretty good randomness qualities, they're fast, and they don't require much memory, but they're not good enough for certain computing operations, such as cryptography or encryption, and certain types of simulation problems, and for those applications, stronger PRNGs are used

    4. Going back to our Pseudo Random Number Generator random integer function or block from App Inventor, here's how things work then, whenever you say: give me a random number, and a random integer between 1 and 2, the App Inventor block will call on the PRNG to give it the next number; now remember, the PRNG is generating a huge long sequence of numbers that are very big numbers like this, so what App Inventor block does is it takes them, and depending on what you tell it here, it performs it's own mod operation on this number, to generate like 1 or 2, and what you see when you call on this block with 1 and 2 as the arguments, is a sequence of 1s and 2s as in this example

      https://docs.google.com/presentation/d/1VWdfhZcI20fjG9koi6hkJnW5eiA85vnoeO6RVJGD9j4/edit?pli=1&slide=id.g38f2384d0_2175#slide=id.g38f2384d0_2175

    5. PRNGs are an actively important research area in mathematics and computer science. This type of PRNG is called a linear congruential generator (LCG) because it uses a linear function.

      The goal of the research is to find for a, c, and m, the multiplier the number we add to the result, plus the modulus. For example, the PRNG used in the Java programming language or in some implementations of it uses this big number for a, uses 11 for c, and 2 to the 48th for m, which means that you're gonna have very long sequences of numbers, very big numbers, before the numbers repeat themselves

    6. Let’s add mod to our formula. But we’ll use mod 13 (instead of mod 12).

      For example, if we had a PRNG doing X sub i is 10, then X sub i plus 1 is 10 times 2 plus 1 is 21, then mod 13 gives us 8. If X sub i is 8, X sub i times 2 plus 1 is 17 mod 13 is 4. If we take 4 as our input, we get 9 and then 6 and then 0, so forth, so if we continue in this way, we will produce another sequence of numbers.

      The numbers jump around seemingly randomly between 0 and 11. But notice that the sequence repeats when it hits 10, so it repeats after a very short time. And, it can’t generate a 12. It just wouldn't be a very good PRNG.

    7. We need a formula that calculates the next number in a sequence, given the current number.

      For example, if we had a PRNG with the number 10 as the current number, it might produce the number 21. Here's the formula that will give us that result, so for example, if x1 is 10, then 10 times 2 plus 1 gives us 21, which is x2. That's the kind of formula we need. Let's generalize our formula a little bit. We'll make the notation more abstract, will let X sub i stand for the current number, and X sub i plus one stand for the next number. If X sub i is 10, then X sub i plus 1 is 10 times 2 plus 1 is 21. If X sub i is 21, X sub i plus 1 is 43. If X sub i is 43, X sub i times 2 plus 1 is 87, and so forth, so if we continue in this way, we will produce the sequence of numbers.

      Now, this formula is a very simple formula we've got that produces a sequence that isn't really very random-looking. For example, the numbers keep getting larger, as you can tell from this formula. They're going to just keep getting larger, so that's not a very random-looking sequence

    8. Modular arithmetic is doing simple mathematics of operations, in the end, division, and repeating it enough to get a remainder, reaching a certain number.

    9. Mathematicians call this modular arithmetic. It’s called the modulo (or mod) operation. We repeatedly subtract 12, our modulus, until we get a number between 1 and 12. Or 0 and 11 (0 is the same as 12).

    10. Clock Arithmetic

      In a 12 hour clock (not 24 hour clock)

      9:00 o’clock + 4 hours = 1:00 o’clock (not 13 o’clock)

      9 + 4 = 13 - 12 = 1

      11:00 o’clock + 5 hours = 4:00 o’clock (not 16 o’clock)

      11 + 5 = 16 - 12 = 4

      In a 12 hour clock (not 24 hour clock)

      11:00 o’clock + 20 hours = ?

      11 + 20 = 31 31 - 12 = 19, but no 19 o’clock, so 19 - 12 = 7

    11. In App Inventor, the Random Integer Block that we use, as you've seen, will give us a random number in a range, so if we say from 1 to 100, it will give us a number such as 50, and it does so by calling on the built-in PRNG in App Inventor

    12. Typically, you would give the PRNG a seed that would start a sequence of numbers, and then it contains a formula to go from the current number and produce the next number. Each time you say give me the next number, it will produce another number in the sequence

    13. True Randomness

      • Flipping a coin, rolling a pair of dice, drawing a card from a well-shuffled deck.
      • Radioactive decay, weather.

      • Hard to do on a computer.

  3. Oct 2025
    1. A parity bit is flipped when an error occurs during transmission, causing the total number of 1s in the data to change, and the receiver detects an error because the received parity doesn't match the original parity rules