面向对象编程入门_面向父母和孩子的实用和动手的密码和信号入门

面向对象编程入门

家长和教育者简介: (Introduction for Parents and Educators:)

There is much discussion around cyber security skills and talent shortages approaching. However, just like the learn2code effort, teaching STEM to kids is not exactly an easy task. Many concepts and hands-on skills are difficult for adults, let alone kids. Cyber and information security has a vast array of knowledge you must master. Cryptography and Signaling is among these skills. Why teach children these skills as opposed to deploying a firewall first? It’s because these skills are used everyday and we see it in movies. This article will briefly cover the use of ciphers for encrypting plain text and decryption as well as the mechanisms (signaling) on delivering plain or cipher encoded messages. For parents that want to provide this information in an hands-on approach using my PowerShell script, please follow along and refer to my github for a copy of the material. The language used in this article have also been simplified so that children can also read along. The recommended grade level to teach this lesson to is 4th grade or higher. Are you ready to take your child’s STEM skills to the next level? Follow the links as well for complementary reading. Read on!

关于网络安全技能和人才短缺的讨论很多。 但是,就像learn2code的努力一样,向孩子们教授STEM也不是一件容易的事。 对于成年人来说,许多概念和动手技巧都很难,更不用说孩子了。 网络和信息安全具有大量必须掌握的知识。 密码学和信号传输就是这些技能之一。 为什么要教孩子这些技巧,而不是先部署防火墙? 这是因为这些技能每天都在使用,我们在电影中会看到它。 本文将简要介绍使用密码对明文进行加密和解密的方法,以及传递明码或密文编码消息的机制(信号)。 对于希望使用我的PowerShell脚本以动手方式提供此信息的父母,请遵循并参考我的github以获取该材料的副本。 本文中使用的语言也已简化,以便孩子们也可以阅读。 建议将此课程教给的年级为4年级或更高。 您准备好将孩子的STEM技能提升到一个新的水平吗? 也可以通过链接进行补充阅读。 继续阅读!

网络安全/技术专业人员简介: (Introduction for Cyber Security / Technical Professionals:)

Some of these sections are meant for parents to have meaningful activities teaching their kids signaling/ciphers. So there’s theory and the use of PowerShell through a 2D array ingestion of for the word search. You can skip over some of the theory and go straight to my Github and review the comments for more usage and ideas. You can go directly to the signaling sections for ideas on how to communicate in an obfuscated manner that would be difficult for SIGINT analysis while combining linguistic crypto.

这些部分中的某些部分旨在让父母进行有意义的活动,以教导孩子们信号/密码。 因此,通过单词的2D数组摄取有理论和PowerShell的使用。 您可以跳过一些理论,直接进入我的Github,查看评论以获取更多用法和想法。 您可以直接转到信令部分,以获取有关如何以混淆方式进行通信的想法,这在组合语言加密时很难进行SIGINT分析。

什么是密码,为什么要使用它们? (What are Ciphers and why use them?)

Ciphers are functions either through a form of math formulas or some other form of methods that can be repeated through steps. Ciphers are a small part of the world of cryptography where the primary goal is to hide messages or communications from people you don’t want to know what you’re saying. It also means you only want your messages to only be understood by your intended friend. Ciphers also reveal or unlock hidden messages through a key, something only you and your friend know. Someone without he key cannot unlock the hidden message. As illustrated below, you take the method or steps you want to use to hide or encrypt the message and combine it with as secret (your key). Now the message becomes unreadable until your friend uses that same key to unlock or decrypt that the message:

密码是通过一种数学公式或某种其他形式的方法(可以通过步骤重复)的函数。 密码只是密码学领域的一小部分, 密码学的主要目标是隐藏您不想知道自己在说什么的人的消息或通讯。 这也意味着您只希望您的目标朋友能够理解您的消息。 密码还可以通过钥匙来显示或解锁隐藏的消息,只有您和您的朋友才知道。 没有他的钥匙的人无法解锁隐藏的消息。 如下所示,您可以使用要隐藏或加密消息并将其与秘密(您的密钥)结合使用的方法或步骤。 现在,消息变得不可读,直到您的朋友使用相同的密钥来解锁或解密该消息:

To further explain for example, you wish to send your friend a message saying: “Are you online?” but you don’t want your other friends to know. You use a cipher and a secret key to encrypt your message that prevents it from view; equivalent to a lock box. Your other friends can’t open the lock box of containing the real message because they don’t have the key. The friend you sent the message to, will have your same key and then unlock the box to reveal the secret message you have sent. This is known symmetric encryption because you both use the same key to encrypt and decrypt the message.

例如,为了进一步说明,您希望向您的朋友发送一条消息:“您在线吗?” 但您不希望其他朋友知道。 您使用密码和秘密密钥来加密您的邮件,以防止其被查看; 相当于一个锁盒。 您的其他朋友因为没有钥匙,所以无法打开包含真实信息的锁盒。 您发送消息给的朋友,将具有相同的密钥,然后解锁该框以显示您发送的秘密消息。 这就是众所周知的对称加密,因为您都使用相同的密钥来加密和解密消息。

Parents: Ask your child the difference between an encrypted message and a decrypted message?

父母:问您的孩子加密消息和解密消息之间的区别?

Tip: Re-enforce the concept of the message in a lock box concept.

提示:在密码箱概念中加强消息的概念。

什么是信号,如何使用信号? (What is signaling and how are signals used?)

Signals are any representation that “means” something to you or someone. For instance, speaking to someone; the set of noises and gestures you may make with face and hands all form one or more signals to your friend you’re speaking to. When you write a message on a piece of paper and hand it to your friend, you are sending a signal, and your friend is receiving a signal. The signal is the piece of paper that transfers your message to your friend. You could send a different signal for the next message you want to send through by saying your message to your friend. If you write a letter to your friend, that’s one signal. If you want to walk up to your friend and tell your friend something else or the same thing, that’s another signal. Two distinct signals.

信号是对您或某人“意味着”某事的任何表示。 例如,与某人说话; 您可能会用脸和手做出的一系列声音和手势都会向您正在与之交谈的朋友发出一个或多个信号。 当您在纸上写一条消息并将其交给您的朋友时,您正在发送信号,而您的朋友正在接收信号。 信号是将您的信息传递给您的朋友的纸。 您可以通过向朋友说出您想发送的下一条消息来发送不同的信号。 如果您写信给您的朋友,那是一个信号。 如果您想走近朋友,并告诉朋友其他事情或同一件事,那是另一个信号。 两个不同的信号。

Parents: Ask your child to give you a 3rd example of a signal

父母:请您的孩子给您一个信号的第三个例子

A Solution: You can also signal “YES” by nodding your head, or signal “NO” by shaking your head.

解决方案:您也可以点头表示“是”,或摇头表示“否”。

放在一起:使用单词搜索难题进行加密和通信信号 (Putting it together: Using Word Search Puzzles for Crypto and Communicating Signals)

Let’s get hands-on with using ciphers and signals to communicate those hidden messages to our friend(s). Do you remember how a word-search puzzle works? You find words in a scrambled set of letters to reveal the messages someone wants you to solve. The following illustration is an example of a 15x15 square of letters with the followings that I may want to send to my friends! But before you go “solving” the word search puzzle; I want to communicate the phrase “change security” to my friend. But how do I hide it from anyone else seeing it but my friend?

让我们动手使用密码和信号将这些隐藏的消息传达给我们的朋友。 您还记得单词搜索难题的工作原理吗? 您会在一组混乱的字母中找到单词,以揭示某人想要您解决的消息。 下图是一个15x15方形字母的示例,其中可能包含以下内容,我想发送给我的朋友们! 但是在您“解决”单词搜索难题之前; 我想向我的朋友传达“改变安全性”一词。 但是,如何隐藏它,让我的朋友除外?

Image for post

OK I want to send the message “change security” to my friend without it easily been seen by other friends? Well we have to first use a cipher, as series of steps or math that will take “change security” and turn it into something not readable by anyone else but my friend.

确定,我想将“更改安全性”消息发送给我的朋友,而不会被其他朋友轻易看到吗? 好吧,我们必须首先使用一个密码,将其作为采取“更改安全性”的一系列步骤或数学运算,并将其转变为除我的朋友之外其他任何人都无法读取的内容。

Parents: Ask your child what components are needed to encrypt the message “change security” when I send it to my friend?

父母:问您的孩子,当我将其发送给朋友时,需要哪些组件来加密“更改安全性”消息?

Solution: I will need the following components: my plaintext message = “change security”, the cipher (steps to encrypt the message), and the secret key (to unlock the lockbox) for message decryption.

解决方案:我将需要以下组件:我的纯文本消息=“更改安全性”,密码(用于加密消息的步骤)以及用于消息解密的密钥(用于解锁密码箱)。

单词搜索难题的加密密码 (The Encryption Cipher of the Word Search Puzzle)

Great! We have our components identified of what to use to send our message but how do we convert a word search puzzle into a cipher? We don’t. The word search puzzle is an array of 2-dimensions (2D) is actually is the key you’re going to give to your friend so they also have a copy to decode the message. We’re also not going to “solve” the word search puzzle by circling the words. We’re going to use what’s called substitution and transposition as our cipher. Substitution is when you replace a character (letter) or word with something else in its place. A transposition is when you “shift” or “move” a character or word based on a specific offset interval.

大! 我们已经确定了用于发送消息的组件,但是如何将单词搜索难题转换为密码? 我们没有。 搜索难题一词是2维(2D)数组,实际上是您要提供给朋友的密钥,因此他们也有一个副本来对消息进行解码。 我们也不会通过圈出单词来“解决”单词搜索难题。 我们将使用所谓的替换和换位作为密码 。 替代是指您用其他字符代替字符(字母)或单词。 换位是指您根据特定的偏移间隔“移动”或“移动”字符或单词时。

A combined example of substitution and transposition cipher method is when you replace the letter “A” with the number “0” or the letter “B” with the number “1” and “C” with the number “2”. We start with 0 because it’s the offset, or position, of the English alphabet letter (26 letters total, but we start from position 0 that ends at 25). The substitution happens because A is no longer “A”, it’s represented by a number. The transposition happens because we’re basing “A” based on its offset position of “0” because it’s the start of the alphabet. Remember an offset means a start from a position, not the “next step” like we do with counting “1,2,3..etc” This is also known as a variant of the Caesar cipher; our example is specifically (ROT-0) which means rotation of 0. The original Caesar cipher was ROT-13.

替换和转置密码方法的组合示例是将字母“ A”替换为数字“ 0”或将字母“ B”替换为数字“ 1”,将“ C”替换为数字“ 2”。 我们从0开始,因为它是英文字母的偏移量或位置(总共26个字母,但我们从位置0开始,以25结尾)。 发生替换是因为A不再是“ A”,而是由一个数字表示。 发生转置是因为我们基于它的偏移位置“ 0”为其基于“ A”,因为它是字母的开头。 请记住,偏移量是指从某个位置开始,而不是像计算“ 1,2,3..etc”那样的“下一步”。这也称为凯撒密码的一种变体; 我们的示例具体是(ROT-0),它表示旋转0。原始的Caesar密码是ROT-13

我们如何将替代和换位作为密码应用于单词搜索难题? (How do we apply substitution and transposition as a cipher to the word search puzzle?)

If we look at the word search puzzle as a 15x15 square, we can think of it as quadrant (Quadrant 4 specifically) from a math plane and assign each letter within as coordinate pairs. So the first letter in our puzzle, which appears to be “F” we can think of it as the pair, x=0, y=0 (0,0) because it starts at the first position (0 offset) for both the row and the column in the square. This is illustrated below:

如果我们将单词搜索难题看成一个15x15的正方形,我们可以将其视为数学平面上的象限 (特别是象限4),并将其中的每个字母分配为坐标对。 因此,我们难题中的第一个字母似乎是“ F”,我们可以将其视为对,x = 0,y = 0(0,0),因为它从两个字母的第一个位置(0偏移)开始。行和列在正方形中。 如下图所示:

Image for post

Now what would we do if we wanted to encrypt the word “fun” using our word search as the key and our coordinate method (substitution and transposition) as our cipher? Let’s start off with the anywhere letter “F” appears.

现在,如果我们想使用单词搜索作为密钥并以坐标方法(替代和换位)作为密码来加密“有趣”一词,该怎么办? 让我们从出现字母“ F”的任何地方开始。

Parents: Be sure to remind your child that it isn’t important the “solve” the cross word puzzle with specific words, we’re just using it as a shared secret key. If you were to have the child solve the puzzle by just finding words out of it, it defeats the purpose because it provides easy-plaintext readable messages that isn’t obfuscated or encoded. Tip: If your child is wanting to focus on solving the word search, let them solve it. Then when they ask if it’s encrypted or insist that it’s encrypted; you refer back to the prior section on symmetric encryption and explain how another friend or parent could easily read their circled words on the page. Also remind them on the point of encryption (using ciphers) was meant for.

父母:一定要提醒您的孩子,用特定的单词“解决”填字游戏并不重要,我们只是将其用作共享密钥。 如果您希望孩子仅通过从单词中找到单词来解决该难题,那么它就无法达到目的,因为它提供了易于理解的明文信息,且不会被混淆或编码。 提示:如果您的孩子想集中精力解决单词搜索,请让他们解决。 然后,当他们询问是否已加密或坚持要加密时; 您可以参考上一章有关对称加密的部分,并说明另一个朋友或父母如何轻松地阅读页面上的带圆圈的单词。 还提醒他们加密(使用密码)的目的。

So we know one position of the letter “F” is (0,0) at the top left corner. Let’s find and determine a position for the letter “U” and “N”. Pick anywhere you wish!

因此我们知道字母“ F”的一个位置是左上角的(0,0)。 让我们找到并确定字母“ U”和“ N”的位置。 选择您想要的任何地方!

Parents: Count from the (0,0) left position shifting right among the columns to find the column that that contains the letter you’re looking for, “U”. In this case we find that is still on the same row with column offset “9”. Note this. Next, assist your child in determining the row offset, which is still 0 because it’s at the starting line. Ask your child to repeat this themselves for the letter “N” any where on the puzzle. Remember in a coordinate display (X,Y) pair that X= Column, and Y = Row. To help with this concept consider running my powershell script with the appropriate execution privileges to further reinforce and guide your child. Be sure that you have PowerShell v3 or higher installed and set the Set-ExecutionPolicy bypass mode in your console. Note: I elected not to make a GUI program of this script because I believe it’s important that new STEM professionals also become acquainted with CLI and text-only tools.

父母:从(0,0)的左数开始算,在各列之间向右移动,以找到包含您要查找的字母“ U”的列。 在这种情况下,我们发现它仍然在同一行,列偏移为“ 9”。 注意这一点。 接下来,帮助您的孩子确定行偏移量,该行偏移量仍为0,因为它位于起始行。 要求您的孩子在拼图的任何位置重复输入字母“ N”。 请记住,在坐标显示(X,Y)对中,X =列,Y =行。 为了帮助实现这一概念,请考虑以适当的执行特权运行我的powershell脚本 ,以进一步加强和指导您的孩子。 确保已安装PowerShell v3或更高版本,并在控制台中设置Set-ExecutionPolicy旁路模式。 注意:我选择不制作此脚本的GUI程序,因为我相信新的STEM专业人员也必须熟悉CLI和纯文本工具,这一点很重要。

Image for post

When running the PowerShell script ensure you enter the full path to the word search puzzle or put the PowerShell script in the same directly as example1.txt. Use a CAPITAL “U” when entering in the letter that you wish to help your child find appropriate coordinates. When you see “-1” in the column, it means there is no match based on the letter you’re looking for. Ensure you explain this to your child carefully that this is how the computer displays a “false” or a “non-match” on your screen.

运行PowerShell脚本时,请确保输入单词搜索难题的完整路径,或者将PowerShell脚本直接与example1.txt放在同一目录中。 输入您希望帮助孩子找到适当坐标的字母时,请使用大写字母“ U”。 当您在栏中看到“ -1”时,表示您所寻找的字母不匹配。 确保您仔细地向孩子解释这是计算机在屏幕上显示“假”或“不匹配”的方式。

Tip and Solution Example: So after going through the word search array exercise of coordinate hunting you should have all 3 characters “fun” properly mapped to (x,y) coordinate pairs. Remember that column = x, and row = y. One solution is: F=(0,0), U=(2,2) and N=(5,4). If your child didn’t find a similar result or understand why it was “one off” based on offset. Review the previous section and look for the keyword “offset.”

提示和解决方案示例:因此,在进行了坐标搜索的单词搜索数组练习之后,您应该将所有3个字符“有趣”正确映射到(x,y)坐标对。 请记住,列= x,行= y。 一种解决方案是:F =(0,0),U =(2,2)和N =(5,4)。 如果您的孩子找不到类似的结果,或者根据偏移量了解为什么它是“一次过”。 查看上一节,并寻找关键字“ offset”。

Parents: Have your child describe the components of the message “fun” using the word search puzzle encryption method.

父母:让您的孩子使用单词搜索难题加密方法来描述“有趣”消息的组成部分。

Solution: Plaintext=”fun” , Key=the word search puzzle itself, cipher to encrypt= finding the coordinate pairs of the letter we want to use. cipher to decrypt= matching the coordinate pair back to the word search puzzle as the key.

解决方案:Plaintext =“ fun”,Key =单词搜索难题本身,要加密的密码=查找我们要使用的字母的坐标对。 要解密的密码=将坐标对匹配回作为关键字的单词搜索难题。

Parents: Now that we have successfully encrypted the plain text message “fun” how would we go about decoding (decrypting) the message using our key? Walk through with your child the components of the encryption process in reverse. Remember that the word search puzzle is the “shared secret” key. The cipher is the steps/methods of encryption and decryption. In our case, it is matching letters to coordinate pairs and back. Reinforce this concept to your child by asking them would someone who doesn’t know the secret key and cipher be able to “decode” the message without telling them? (The answer should be: No, or Not Easily).

家长:现在我们已经成功地加密了纯文本消息“ fun”,我们将如何使用密钥对消息进行解码(解密)? 与您的孩子一起逐步完成加密过程的各个组成部分。 请记住,单词搜索难题是“共享秘密”的关键。 密码是加密和解密的步骤/方法。 在我们的情况下,它是匹配字母以协调坐标对并返回。 通过询问孩子,一个不知道秘密密钥和密码的人是否可以在不告诉孩子的情况下“解码”消息,从而增强了这个概念? (答案应该是:不,或者不容易)。

扩展的信令和密码概念*推荐用于7级以上 (Extended Signaling and Cipher Concepts *Recommended for Grades 7 and above)

By now you should have been able to successfully use symmetric crypto methods for encrypting and decrypting basic communications using a cipher, key, and plain text. We also discussed the idea of signaling which could include different mediums or channels by which your plain text, key, or encrypted text could be passed to a friend. What if you wanted to add on to this concept and further add complexity to your signaling. In a word-search puzzle, couldn’t the shape be something other than a square? Couldn’t it be a circle or triangle? When you utilize encrypted communications typically there are rotations that happen where the the friends communicating could change any of the following:

到现在为止,您应该已经能够成功使用对称加密方法来使用密码,密钥和纯文本对基本通信进行加密和解密。 我们还讨论了发信号的想法,发信号可以包括不同的媒介或渠道,您可以通过这些媒介或渠道将纯文本,密钥或加密文本传递给朋友。 如果您想添加此概念并进一步增加信号发送的复杂度,该怎么办。 在单词搜索难题中,形状不是正方形吗? 不能是圆形或三角形吗? 当您使用加密的通信时,通常会发生轮换,在这种情况下,交流的朋友可能会更改以下任何一项:

  • The signal (e.g. voice, hand signs, winking, etc.)

    信号(例如声音,手势,眨眼等)
  • Cipher for encryption/decryption routines: (e.g. instead 1–1 coordinate matching to letters, what if you added a function of 2x+k where X is the plain text value substituted as an number (remember our discussion on Caesar ciphers?) and K is the key, where you could use any number). The output would be encrypted numbers that correspond to letters. For decryption you would use the inverse which would be the inverse function (k — x / 2) .

    加密/解密例程的密码:(例如,与字母进行1-1坐标匹配,如果添加了2x + k函数,其中X是替换为数字的纯文本值(还记得我们对Caesar密码的讨论吗?)和K是关键,您可以在其中使用任何数字)。 输出将是对应于字母的加密数字。 对于解密,您可以使用逆函数,逆函数 (k — x / 2)。

  • The key or shared secret (e.g. Changing the size of the key, shape and selecting coordinates or letters)

    密钥或共享机密(例如,更改密钥的大小,形状并选择坐标或字母)

We have multiple components we can change to make it more difficult for outsiders to determine what you would tell your friend in an encrypted form. If we change the key, we usually can change the contents of the key or the size. In our previous examples, we used the word-search puzzle of a 15 x 15 square. To change the key means that I can use a completely different word search puzzle and character set all together. I can also change the size of the key space to be even bigger, 30 x 30. Overall, as long another friend or outsider does not know all 3 parts (signal, cipher, and key) of my secret communication or message; they cannot easily determine a message that I will send to my friend.

我们可以更改多个组件,以使外部人员更难确定您将以加密形式告诉朋友的内容。 如果更改密钥,通常可以更改密钥的内容或大小。 在前面的示例中,我们使用了15 x 15平方的单词搜索难题。 更改键意味着我可以一起使用完全不同的单词搜索难题和字符集。 我还可以将密钥空间的大小更改为更大的大小,例如30 x30。总的来说,只要另一个朋友或局外人不知道我的秘密通信或消息的所有三个部分(信号,密码和密钥); 他们无法轻松确定我将发送给我的朋友的消息。

Parents: Ask your child how might changing the size of a key make it harder or easier for an outside party to determine the original message? Also ask your child if someone were to find out some or all of your communication parts, would they change any components of the secret communication, and why?

父母:问您的孩子,改变钥匙的大小如何使外界人士更难或更容易确定原始信息? 还询问您的孩子,是否有人会发现您的部分或全部通信内容,他们会更改秘密通信的任何内容,为什么?

Solution: A change of the key size by growing the key makes the key space vast and require an outsider to look at more data to determine how the key is used (in our case a word search puzzle) and what messages are actually inside the key (again, in our case, a word search puzzle for 1–1 substitution and transposition US English alpha bet cipher). When you make the key smaller in our case, it narrows the total number of possibilities the decrypted or plain-text message could be. If one or more of your components within the secret communication is compromised (signaling, cipher, and key) it’s best to change all 3 mechanisms so that the outside party snooping on your communication can’t re-use any past knowledge to determine your new secret communication and messaging.

解决方案:通过增加密钥来更改密钥大小会扩大密钥空间,并要求局外人查看更多数据以确定密钥的使用方式(在我们的情况下为单词搜索难题)以及密钥内实际上包含哪些消息(同样,在我们的案例中,是用于1-1替换和换位美国英语alpha赌注密码的单词搜索难题)。 在本例中,当您将密钥减小时,它会缩小解密或纯文本消息的可能性总数。 如果秘密通信中的一个或多个组件受到破坏(信号,密码和密钥),则最好更改所有这三种机制,以使外界窥探您的通信不会再利用任何以往的知识来确定您的新消息。秘密通信和消息传递。

替代信令和主要变更 (Alternative Signaling and Key Changes)

The previous section(s) are about using common dialog that friends and people generally interact with each other. Signals can be sent over different mediums and meanings in more obfuscated ways. Have you ever thought about how radio and sound work? Sound travels in varying waves and frequencies. Different representations such as sine vs. square “wave” changes in sound and shape. In our example, we can apply a change in our signal representation to tell someone that the next key is going to be in the shape of a 15 x 15 square without actually speaking it in words. Your friend would already have to know the signal protocol which are a set of known “rules” for you both to communicate. You wouldn’t necessarily communicate whole encrypted text messages to each other, but you will establish symbolic meaning using signals to share with each other the components of your secure communication (key, cipher, and encrypted text).

前面的部分是关于使用常见的对话,朋友和人们通常会相互交流。 信号可以以更加混乱的方式通过不同的媒体和含义发送。 您是否考虑过广播和声音的工作方式? 声音以变化的波和频率传播。 正弦与方形 “波”的不同表示形式会改变声音和形状。 在我们的示例中,我们可以对信号表示进行更改,以告知某人下一个按键将采用15 x 15正方形的形状,而无需用语言实际说出来。 您的朋友已经必须知道信号协议 ,这是一组供大家交流的已知“规则”。 您不一定会相互交流整个加密的文本消息,但是您将使用信号来建立符号含义,以彼此共享安全通信的各个组成部分(密钥,密码和加密文本)。

Let’s go back to our original example of using a 15 x 15 square word search as our key. We already know that our cipher is based on a coordinate system on Plane 4 of a geometric 2D grid/array. Let’s pretend that I want to tell my friend how the key will look like and what the key is. Rather than openly in plain-text communication tell them the exact key (such as handing them a copy of my word search or saying it out loud); why don’t I use alternate signaling? One way might be sound and to utilize the Google Music Lab’s song maker to construct a 15 x 15 square as illustrated below:

让我们回到使用15 x 15平方字搜索作为关键字的原始示例。 我们已经知道我们的密码基于几何2D网格/阵列的平面4上的坐标系。 假设我要告诉我的朋友钥匙的外观和钥匙是什么。 与其公开地以纯文本形式交流而不是告诉他们确切的密钥(例如,向他们提供我的单词搜索副本或大声说出来); 为什么不使用备用信令? 一种方法可能是声音,并利用Google音乐实验室的歌曲制作工具来构建15 x 15的正方形,如下所示:

Image for post

I’ve highlighted the the notes that should be played based on the frames in a 15 x 15 pattern. My friend, who already knows my signal protocol would take the URL that I would send them that goes to my saved signal which represents the key space and shape that I will be using. If I had access to advanced technologies, I could also create a tool or device that takes the audio from the Song Maker here and re-illustrate it back as a square pattern representation visually.

我已经根据15 x 15模式的帧突出显示了应该演奏的音符。 我的朋友已经知道我的信号协议,他将使用我发送给他们的URL进入保存的信号,该信号代表了我将要使用的键空间和形状。 如果我可以使用先进的技术,那么我也可以创建一个工具或设备,从这里的Song Maker中获取音频,然后将其重新显示为正方形图案。

To set up this 15 x 15 square, I need to ensure that the configuration of the song maker is set up for 3 octaves and enough bars to occupy the space as illustrated below:

要设置15 x 15的正方形,我需要确保将歌曲制作器的配置设置为3个八度,并且有足够的小节来占据空间,如下所示:

Image for post
Image for post

After completing my ‘saved’ signal I can share it with my friend as a URL directly from the Google Music Lab . Now my friend can receive the URL that represents my signal that this is how my secure communication key should be represented as.

完成“保存”信号后,我可以直接从Google音乐实验室与我的朋友分享它作为URL。 现在,我的朋友可以接收代表我的信号的URL,这就是我的安全通信密钥应如何表示的。

You may be wondering what is the point of sending the “outline” of the key shape and space when you can’t send the actual content of the key using our method from before. In this manner, you would augment the signal protocol’s rule to also state “if sender bob sends a google music lab link to receiver jill, then also look at xyz location for the content of the key.”

您可能想知道如果无法使用以前的方法发送按键的实际内容,那么发送按键形状和空间的“轮廓”有什么意义? 以这种方式,您将扩大信号协议的规则,使其也声明“如果发件人鲍勃将Google音乐实验室链接发送到接收者吉尔,然后还查看xyz位置中的密钥内容。”

Such a rule would trigger the receiving friend to also go look at a second source, maybe a public one, for the actual content of the key. The person knows that the key is in the 2D array shape form of a square and is 15 x 15 according to our protocol. Let’s say that the signal protocol directs the receiver to look at the weekly or daily word search puzzle as the key’s contents. Now the sender and the receiver have established a shared secret key using public means and encoded signaling communications. The remaining piece of our secure communication is now the cipher that would be used. This cipher would either have to be communicated prior to secure communication out in the public or it would need to be communicated by adding more rules to the signaling protocol which also must be communicated between myself and my friend prior to our secure communication attempt.

这样的规则将触发接收者的朋友也去寻找第二个来源,也许是公开的,以获取密钥的实际内容。 该人员知道密钥是正方形的2D阵列形状,根据我们的协议,密钥为15 x 15。 假设信号协议指示接收方将每周或每天的单词搜索难题视为密钥的内容。 现在,发送者和接收者已经使用公共手段和编码的信令通信建立了共享密钥。 现在,我们安全通信的其余部分就是将要使用的密码。 此密码要么必须在安全地公开进行通信之前进行公开, 要么需要通过向信令协议添加更多规则来进行通信,在我们进行安全通信尝试之前,还必须在我和我的朋友之间进行通信。

Parents: Ask your child how using a word search puzzle as a key that changes daily or weekly might add extra work for both the outside parties trying to snoop or break the communication AND the sender and receivers of the secure communication? Ask your child how they could extend the signal protocol to incorporate and share their cipher steps using signaling as part of their pre-shared communication before attempting to establish a secure encrypted communication?

父母:问您的孩子如何将单词搜索难题用作每天或每周更改的关键字,这可能会给试图监听或中断通信的外部各方以及安全通信的发送者和接收者增加额外的工作量? 问您的孩子,在尝试建立安全的加密通信之前,他们如何扩展信号协议以使用信令作为预共享通信的一部分来合并和共享密码步骤?

Tip: Changing any component the symmetric encryption communication adds extra overhead to the senders and receivers by having to constantly “switch gears” and change their routines for secure communication. A weakness of symmetric encryption methods it that both sender and receiver must already know all aspects and components of the secure communication (signal, cipher, and key) to start with. Changing any component of the communication also increases the work an outside party has to to do essentially ‘break’ the encrypted text you’re sending into something easily understood. That means they must know at minimum your signal, cipher, and key. The signal protocol can be extended by augmenting additional rules that describe (at least in our example) sounds, tones, or shapes that wouldn’t represent the keyspace, but it would represent the key’s content or a list of places to look for the key’s content. This would be a form of substitution; however the distinction between signal and crypto substitution is that signaling is only substitution and always a 1–1 meaning (e.g. traffic lights, red, yellow, and green have the same meaning each time no matter what position they’re in)

提示:更改任何组件时,对称加密通信都必须不断“切换”齿轮并更改其例程以进行安全通信,从而给发送方和接收方增加了额外的开销。 对称加密方法的一个缺点是,发送者和接收者都必须已经知道安全通信的所有方面和组成部分(信号,密码和密钥)。 更改通信的任何组成部分还增加了外部组织必须将要发送的加密文本“破坏”为易于理解的内容的工作。 这意味着他们必须至少知道您的信号,密码和密钥。 可以通过增加其他规则来扩展信号协议,这些规则描述(至少在我们的示例中)描述不代表键空间的声音,音调或形状,但是代表键的内容或查找键的位置的列表内容。 这将是一种替代形式; 但是,信号替换与加密替换之间的区别在于,信号仅是替换,并且始终为1–1的含义(例如,无论交通信号灯,红色,黄色和绿色处于什么位置,它们都具有相同的含义)

更改密码功能 (Changing the Cipher Function)

In our previous examples, we have utilized the coordinate presentation as our system or steps to be our cipher for encryption and decryption routines in our secure communication. We can also easily implement substitution only cipher in the same symmetric key method. Our last method focused entirely on representing a geometric shape and the positions of each letter based on row and column. We can also use a simple math formula of (2x+k) which would be our encrypting cipher function and (k-x/2). X is our plain-text letter that represents a substituted character in the alphabet (could be 1–26) and K is our key.

在前面的示例中,我们已将坐标表示用作我们的系统或步骤,成为安全通信中加密和解密例程的密码。 我们还可以轻松地在相同的对称密钥方法中实现仅替换密码。 我们的最后一种方法完全专注于根据行和列表示几何形状和每个字母的位置。 我们还可以使用一个简单的数学公式(2x + k),它将作为我们的加密密码函数和(kx / 2)。 X是我们的纯文本字母,代表字母中的替换字符(可以是1–26),而K是我们的密钥。

Image for post

In the table above, we see that the offsets of letters A-Z range from offset 0–25. But unlike our previous example the offsets are not based on the 2D array which is our key (the square of 15 x 15 letters). Instead we utilize essentially ROT-0 as previously discussed where each letter corresponds to a 1–1 offset value. Now let’s say we use a single constant of “10” to be our key instead. When plotting the graph function of (2x+10) we get the following:

在上表中,我们看到字母AZ的偏移量介于偏移量0-25之间。 但是与前面的示例不同,偏移量不是基于二维数组,而二维数组是我们的关键(15 x 15个字母的平方)。 取而代之的是,我们基本上如前所述利用了ROT-0,其中每个字母对应一个1-1偏移值。 现在假设我们使用单个常量“ 10”作为我们的密钥。 绘制(2x + 10)的图形函数时,我们得到以下信息:

Image for post

Notice that that our encryption cipher function is (2x+k, where k=10) which translates to Y=2x+10. So what do we enter for X? X is our English alphabet offset number. So if I wanted to “encrypted” the word “fun” I would have to run the encryption routine 3 times:(2*(5)+10), 2*(20)+10), (2*(13)+10) which gives respective encrypted ciphertext representation of “fun” as [20, 50, 46]. To decrypt you would pass the inverse function the encrypted characters as the following: (20–10/2), (50–10/2), (46–10-/2) which returns you back to the offset mappings 5, 20, 13 which translate back to “fun.” The signal used here are the string of numbers that matches as the English alphabet letters from the previous table. The cipher are the math formulas used to encrypt and decrypt the word “fun.” The key we used was an integer constant of “10.”

请注意,我们的加密密码函数为(2x + k,其中k = 10),它转换为Y = 2x + 10。 那么我们为X输入什么? X是我们的英文字母偏移号。 因此,如果要“加密”单词“ fun”,则必须运行加密例程3次:(2 *(5)+10),2 *(20)+10),(2 *(13)+ 10)给出“ fun”的相应加密密文表示为[20、50、46]。 要解密,您可以通过以下函数传递逆函数:(20–10 / 2),(50–10 / 2),(46–10- / 2),这将使您返回到偏移映射5、20 ,13转换回“有趣”。 此处使用的信号是与上表中的英语字母匹配的数字字符串。 密码是用于加密和解密单词“ fun”的数学公式。 我们使用的密钥是整数常量“ 10”。

Parents: Try to experiment with different functions, something as easy as (x+k) where x is your alphabet offset and k is your key number and having your child use it to encrypt, followed by the reverse function to decrypt. Stop to ask your child what is the cipher for encrypt, cipher for decrypt, and what the key is.

父母:尝试使用不同的功能,就像(x + k)一样简单,其中x是您的字母偏移量,k是您的密钥号,并让您的孩子使用它进行加密,然后使用反向函数进行解密。 停止询问您的孩子什么是加密密码,什么解密密码以及密钥是什么。

总结额外的学习和挑战 (Wrap-Up Extra Learning and Challenges)

I hope this was a fun and exciting way for parents to actively be a part of their child’s learning within STEM. We have gone over some basic core concepts on what are signals, ciphers, and how to apply them using multi-dimensional arrays. For those of you with older children, the extended section reinforces the concepts of cipher use by changing components within the secure communication. Using symmetric key encryption methods, individuals can utilized pre-shared protocols, ciphers, and keys to create their own custom secure communication. We also learned that when you rotate or change any component of the secure communication that there is overhead on outside parties attempting to break or crack your secure communication.

我希望这是父母在STEM中积极参与孩子学习的一种有趣而激动的方式。 我们已经讨论了一些基本的核心概念,包括什么是信号,密码以及如何使用多维数组应用它们。 对于那些有大孩子的人,扩展部分通过更改安全通信中的组件来加强密码使用的概念。 使用对称密钥加密方法,个人可以利用预共享的协议,密码和密钥来创建自己的自定义安全通信。 我们还了解到,当您轮换或更改安全通信的任何组成部分时,外部各方都在尝试破坏或破坏安全通信时会有开销。

额外挑战: (Extra Challenge:)

Using any combination of the above methods, can you think of a completely different signal, cipher, and key representation combination that could be used to established secure communications? Perhaps using 3-dimensional key spaces or a different signal protocol? Don’t forget to try making your own word search puzzles for additional practice found at the Discovery Education Channel site.

使用以上方法的任意组合,您能想到可以用于建立安全通信的完全不同的信号,密码和密钥表示组合吗? 也许使用3维键空间或其他信号协议? 不要忘了尝试制作自己的单词搜索难题,以寻求发现教育频道网站上的其他练习。

反馈: (Feedback:)

I’m very much open to feedback if this or did not work for helping your child learn crypto and signaling. Please feel free to share or comment on how it helped or didn’t help you. For those of you interested in cyber security and need services or products for your company or home, feel free to drop us a line at www.scissecurity.com We provide full cyber security stack solutions and utilize our own STEM skills to incorporate machine learning and other predictive analytics in hunting for threats within your environment.

如果这对帮助您的孩子学习加密和信令不起作用,我非常愿意提供反馈。 请随时分享或评论它对您有何帮助。 对于那些对网络安全感兴趣并需要为公司或家庭提供服务或产品的人,请随时与我们联系, 网址www.scissecurity.com。我们提供完整的网络安全堆栈解决方案,并利用我们自己的STEM技能结合机器学习和寻找环境中威胁的其他预测分析。

翻译自: https://medium.com/swlh/a-practical-and-hands-on-intro-to-ciphers-and-signals-for-parents-and-kids-c767302d84a

面向对象编程入门

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值