diff options
| author | Christian Cleberg <[email protected]> | 2025-11-11 19:42:10 -0600 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2025-11-11 19:42:10 -0600 |
| commit | f1f35bd4070c7dd0d232c5a3f2f7373511475565 (patch) | |
| tree | 8d44604b7a27a1f6f4a5fd4fb8df8894a92aa8e5 | |
| parent | ceb109db053608774d340fa820615bd9c04fa436 (diff) | |
| download | cleberg.net-f1f35bd4070c7dd0d232c5a3f2f7373511475565.tar.gz cleberg.net-f1f35bd4070c7dd0d232c5a3f2f7373511475565.tar.bz2 cleberg.net-f1f35bd4070c7dd0d232c5a3f2f7373511475565.zip | |
fix grammar in 2018 posts
| -rw-r--r-- | content/blog/2018-11-28-aes-encryption.org | 89 | ||||
| -rw-r--r-- | content/blog/2018-11-28-cpp-compiler.org | 46 |
2 files changed, 69 insertions, 66 deletions
diff --git a/content/blog/2018-11-28-aes-encryption.org b/content/blog/2018-11-28-aes-encryption.org index 403b157..236fb92 100644 --- a/content/blog/2018-11-28-aes-encryption.org +++ b/content/blog/2018-11-28-aes-encryption.org @@ -6,15 +6,15 @@ * Basic AES If you're not familiar with encryption techniques, [[https://en.wikipedia.org/wiki/Advanced_Encryption_Standard][AES]] is the *Advanced -Encryption Standard*. This specification was established by the National -Institute of Standards and Technology, sub-selected from the Rijndael family of -ciphers (128, 192, and 256 bits) in 2001. Furthering its popularity and status, -the US government chose AES as their default encryption method for top-secret -data, removing the previous standard which had been in place since 1977. +Encryption Standard*. The National Institute of Standards and Technology +established this specification, sub-selected from the Rijndael family of ciphers +(128, 192, and 256 bits) in 2001. Furthering its popularity and status, the US +government chose AES as their default encryption method for top-secret data, +removing the previous standard which had been in place since 1977. -AES has proven to be an extremely safe encryption method, with 7-round and -8-round attacks making no material improvements since the release of this -encryption standard almost two decades ago. +AES has proven to be a safe encryption method, with 7-round and 8-round attacks +making no material improvements since the release of this encryption standard +almost two decades ago. #+begin_quote Though many papers have been published on the cryptanalysis of AES, the fastest @@ -26,12 +26,13 @@ slightly more powerful than those proposed 10 years ago [23,24]. * How Secure is AES? -In theory, AES-256 is non-crackable due to the massive number of combinations -that can be produced. However, AES-128 is no longer recommended as a viable -implementation to protect important data. +In theory, AES-256 (AES using a 256-bit key) is non-crackable due to the massive +number of combinations that can the encryption process can produce. However, +AES-128 is no longer recommended as a viable implementation to protect important +data due the 128-bit key's short length. A semi-short [[http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html][comic strip]] from Moserware quickly explains AES for the public to -understand. Basically AES encrypts the data by obscuring the relationship +understand. Basically, AES encrypts the data by obscuring the relationship between the data and the encrypted data. Additionally, this method spreads the message out. Lastly, the key produced by AES is the secret to decrypting it. Someone may know the method of AES, but without the key, they are powerless. @@ -40,8 +41,8 @@ To obscure and spread the data out, AES creates a substitution-permutation network. Wikipedia has a wonderful [[https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/SubstitutionPermutationNetwork2.png/468px-SubstitutionPermutationNetwork2.png][example of an SP network]] available. This network sends the data through a set of S boxes (using the unique key) to substitute the bits with another block of bits. Then, a P box will permutate, or -rearrange, the bits. This is done over and over, with the key being derived from -the last round. For AES, the key size specifies the number of transformation +rearrange, the bits. This is performed numerous times, with the last round +deriving the key. For AES, the key size specifies the number of transformation rounds: 10, 12, and 14 rounds for 128-bit, 192-bit, and 256-bit keys, respectively. @@ -49,13 +50,13 @@ respectively. 1. *KeyExpansion*: Using [[https://en.m.wikipedia.org/wiki/Advanced_Encryption_Standard][Rijndael's key schedule]], the keys are dynamically generated. -2. *AddRoundKey*: Each byte of the data is combined with this key using bitwise - xor. -3. *SubBytes*: This is followed by the substitution of each byte of data. -4. *ShiftRows*: Then, the final three rows are shifted a certain number of - steps, dictated by the cipher. -5. *MixColumns*: After the rows have been shifted, the columns are mixed and - combined. +2. *AddRoundKey*: The process combines each byte of the data with the generated + key(s) using bitwise xor. +3. *SubBytes*: Next, the process substitutes each byte of data. +4. *ShiftRows*: Then, the process shifts the final three rows a specific number + of steps, dictated by the cipher. +5. *MixColumns*: Finally, the process mixes and combines the columns into the + final data for this round of processing. This process does not necessarily stop after one full round. Steps 2 through 5 will repeat for the number of rounds specified by the key. However, the final @@ -66,42 +67,42 @@ weakness). According to research done by Bogdanov et al., it would take billions of years to brute force a 126-bit key with current hardware. Additionally, this brute -force attack would require storing 2^{88} bits of data! However, there are a few -different attacks that have been used to show vulnerabilities with the use of -this technology. Side-channel attacks use inadvertent leaks of data from the -hardware or software, which can allow attackers to obtain the key or run -programs on a user's hardware. +force attack would require storing 2^{88} bits of data! However, people have +shown different attacks displaying vulnerabilities with the use of this +technology. Side-channel attacks use inadvertent leaks of data from the hardware +or software, which can allow attackers to obtain the key or run programs on a +user's hardware. Please note that this is not something you should run out and try to implement -in your =Hello, World!= app after only a few hours of research. While AES -(basically all encryption methods) is extremely efficient in what it does, it -takes a lot of time and patience to understand. If you're looking for something -which currently implements AES, check out the [[https://www.bouncycastle.org/documentation.html][Legion of the Bouncy Castle]] for -Java implementations of cryptographic algorithms. +in your =Hello, World!= application after only hours of research. While AES +(basically all encryption methods) is efficient in what it does, it takes a lot +of time and patience to understand. If you're looking for something which +currently implements AES, check out the [[https://www.bouncycastle.org/documentation.html][Legion of the Bouncy Castle]] for Java +implementations of cryptographic algorithms. * Why Does Encryption Matter? There are limitless reasons to enable encryption at-rest or in-transit for -various aspects of your digital life. You can research specific examples, such -as [[https://arstechnica.com/tech-policy/2018/12/australia-passes-new-law-to-thwart-strong-encryption/][Australia passes new law to thwart strong encryption]]. However, I will simply -list a few basic reasons to always enable encryption, where feasible: +aspects of your digital life. You can research specific examples, such as +[[https://arstechnica.com/tech-policy/2018/12/australia-passes-new-law-to-thwart-strong-encryption/][Australia passes new law to thwart strong encryption]]. However, I will simply +list basic reasons to always enable encryption, where feasible: -1. Privacy is a human right and is recognized as a national right in some - countries (e.g., [[https://www.law.cornell.edu/wex/fourth_amendment][US Fourth Amendment]]). +1. Privacy is a human right and some countries recognize it as a national right + (e.g., [[https://www.law.cornell.edu/wex/fourth_amendment][US Fourth Amendment]]). 2. "Why not?" Encryption rarely affects performance or speed, so there's usually not a reason to avoid it in the first place. 3. Your digital identity and activity (texts, emails, phone calls, online - accounts, etc.) are extremely valuable and can result in terrible - consequences, such as identity theft, if leaked to other parties. Encrypting - this data prevents such leaks from ruining lives. + accounts, etc.) are valuable and can result in consequences, such as identity + theft, if leaked to other parties. Encrypting this data prevents such leaks + from ruining lives. 4. Wiping or factory-resetting does not actually wipe all data from the storage device. There are methods to read data from the physical disks/boards inside devices. -5. Corporations, governments, and other nefarious groups/individuals are - actively looking for ways to collect personal information about anyone they - can. If someone's data is unencrypted, that person may become a target due to - the ease of data collection. +5. Corporations, governments, and other groups or individuals are actively + looking for ways to collect personal information about anyone they can. If + someone's data is not encrypted, that person may become a target due to the + ease of data collection. -*Read More:* +* Read More - [[http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197.pdf][Federal Information Processing Standards Publication 197]] diff --git a/content/blog/2018-11-28-cpp-compiler.org b/content/blog/2018-11-28-cpp-compiler.org index 6507f4e..817b32e 100644 --- a/content/blog/2018-11-28-cpp-compiler.org +++ b/content/blog/2018-11-28-cpp-compiler.org @@ -8,10 +8,10 @@ [[https://en.wikipedia.org/wiki/C%2B%2B][C++]] is a general-purpose programming language with object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation. -The source code, shown in the snippet below, must be compiled before it can be -executed. There are many steps and intricacies to the compilation process, and -this post was a personal exercise to learn and remember as much information as I -can. +A developer must compile source code, such as the example shown in the snippet +below, before they can execute the compiled program. There are numerous steps +and intricacies to the compilation process, and this post was a personal +exercise to learn and remember as much information as I can. #+begin_src cpp #include <iostream> @@ -36,9 +36,10 @@ is not the only compiled language. Check out [[https://en.wikipedia.org/wiki/Com languages]] for more examples of compiled languages. I'll start with a wonderful, graphical way to conceptualize the C++ compiler. -View [[https://web.archive.org/web/20190419035048/http://faculty.cs.niu.edu/~mcmahon/CS241/Notes/compile.html][The C++ Compilation Process]] by Kurt MacMahon, an NIU professor, to see the -graphic and an explanation. The goal of the compilation process is to take the -C++ code and produce a shared library, dynamic library, or an executable file. +View [[https://web.archive.org/web/20190419035048/http://faculty.cs.niu.edu/~mcmahon/CS241/Notes/compile.html][The C++ Compilation Process]] by Kurt MacMahon, a Northern Illinois +University (NIU) professor, to see the graphic and an explanation. The goal of +the compilation process is to take the C++ code and produce a shared library, +dynamic library, or an executable file. ** Compilation Phases @@ -61,10 +62,11 @@ the expanded code. *** Step 2 -After the code is expanded, the compiler comes into play. The compiler takes the -C++ code and converts this code into the assembly language, understood by the -platform. You can see this in action if you head over to the [[https://godbolt.org][GodBolt Compiler -Explorer]], which shows C++ being converted into assembly dynamically. +After the compiler expands the code, the compiler comes into play. The compiler +takes the C++ code and converts this code into the assembly language, understood +by the platform. You can see this in action if you head over to the [[https://godbolt.org][GodBolt +Compiler Explorer]], which shows the compiled converting C++ into assembly +dynamically. For example, the =Hello, world!= code snippet above compiles into the following assembly code: @@ -113,17 +115,17 @@ _GLOBAL__sub_I_main: *** Step 3 -Third, the assembly code generated by the compiler is assembled into the object -code for the platform. Essentially, this is when the compiler takes the assembly -code and assembles it into machine code in a binary format. After researching -this online, I figured out that a lot of compilers will allow you to stop -compilation at this step. This would be useful for compiling each source code -file separately. This saves time later if a single file changes; only that file -needs to be recompiled. +Third, the compiled assembles the assembly code into the object code for the +platform. Essentially, this is when the compiler takes the assembly code and +assembles it into machine code in a binary format. After researching this +online, I figured out that a lot of compilers will allow you to stop compilation +at this step. This would be useful for compiling each source code file +separately. This saves time later if a single file changes, since the developer +will only need to re-compile single file. *** Step 4 -Finally, the object code file generated by the assembler is linked together with -the object code files for any library functions used to produce a shared -library, dynamic library, or an executable file. It replaces all references to -undefined symbols with the correct addresses. +Finally, the compiler links the object code file generated by the assembler +together with the object code files for any library functions used to produce a +shared library, dynamic library, or an executable file. It replaces all +references to undefined symbols with the correct addresses. |
