parent
be18e6807c
commit
960443264d
@ -0,0 +1,14 @@
|
||||
---
|
||||
author: tait
|
||||
title: "RSA: what is it?"
|
||||
layout: post
|
||||
---
|
||||
In this article I will explain what RSA is, and where it is used at a high level. The next parts to this will focus more on what RSA is at a technical level: how it uses numbers to store secrets in the open. Here, I plan to explain simple the idea.
|
||||
|
||||
Let's imagine we have two people. Bob, and Alice. Bob wants to send Alice a love letter. But Eve, the sneaky wreetch, wants to listen in on Alice and Bob's conversation. How can we avoid sending messeges between Alice and Bob like postcards would be sent in the mail: the postman, sorters, and the delivery man can all read it?
|
||||
|
||||
We could, in theory, use a Ceaser Cipher to do this. So Alice can send a messege with a key like A=B, meaning that all A's get converted to B's, B's to C's, C's to D's, et cetera. However, this solution fails when we realize that Bob and Alice would have to agree on some key to make this work. Either A=B, or 1, meaning shift the letters by one character. How can we get them to share this key without meeting in person, where Alice could just tell Bob in person, removing he need for a key.
|
||||
|
||||
Well, what if we used something called asymetric encryption? This would mean we have two keys. A and B, A can decrypt any messeges encrypted with B, and B can decreypy any messeges encrypted with A. But A cannot decrypt its own messeges, and neither can B. You choose one of these keys, it doesn't matter which one, to be your "public key" (although it acts more like a lock), and one to be your private key. The key that you do not share anywhere. You give anyone your lock. You put it on your email signatue, you put it on your blog. You share this! Then anyone who wants to send a secret messege to you can send you a messege and use your public lock (key) to encrypt the messege.
|
||||
|
||||
In this scenario, we could get Alice to have one set of these keys, and Bob to have one set of these keys. They can exchange public keys, allowing Bob to communicate with Alice and vice-versa. Now Alice can send "Bob, I ove you!" over the wire! It will look like "iU0oo--!@EFb` z" or some such other nonesense to anyone else, and Eve especially, listening in.
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
author: tait
|
||||
title: "RSA: what is it?"
|
||||
layout: post
|
||||
---
|
||||
Scary sounding title isn't it? I promise it is not as scary as it sounds. In this article I will explain the basic premis behind RSA encryption, why we need it, how it is vulnerable, and to what extent we can mitigate these vulnerabilities.
|
@ -0,0 +1,32 @@
|
||||
---
|
||||
layout: post
|
||||
author: tait
|
||||
title: Padding And Margin
|
||||
---
|
||||
Many people have expressed confusion over how padding and margins work in HTML/CSS. I have been one of those people. In this short article I will explain what the differences are between the two, and how it may affect the functionality of your site.
|
||||
|
||||
Here is an image from the World Wide Web Consortium (W3C) who sets the standards for the web.
|
||||
|
||||
![The W3C standard for padding, margin, borders and width. Width encompases the inner element + padding; the border then encompases it. The margin is the space beyond the border and in between other elements.](/assets/img/w3c-padding-margin.png "W3C border, padding, margin standard.")
|
||||
|
||||
Now although this image shows all the different types of spacing as equal, the majority of the time these will mostly be padding (inner) and margin (outer). Padding is the inner space between the element and its border; margin is the outer space between two different elements.
|
||||
|
||||
Within the margin the user is unable to press any links or execute any javascript code. It is *empty* space. If each `<link>` on your navigation bar has 10 pixels of margin, then there would be 20 pixels in between each `<link>` that would *not* be clickable by the user.
|
||||
|
||||
If you have `<link>`s on your navigation bar with *padding* set to 20 pixels, however, then there will be 20 pixels on each side of the `<link>` text where the user *is* able to click.
|
||||
|
||||
If that part is confusing, try thinking about it in terms of whether `background-color` would apply.
|
||||
|
||||
Attribute | **Padding** | **Margin**
|
||||
--- | --- | ---
|
||||
Spacing | within element | between elements
|
||||
`background-color` applies | Yes | No
|
||||
|
||||
|
||||
In summary:
|
||||
* **Padding**: the space within a tag which is still part of the same tag. `background-color` applies.
|
||||
* **Margin**: the space in between two seperate tags. `background-color` does not apply; it is empty space.
|
||||
* **Border**: the space in between the two; it surrounds the padding, but is not the margin. It looks nice somtimes, but it has no non-visual function. `background-color` does not apply.
|
||||
|
||||
I hope this covers the basics of margin and padding! Happy coding!
|
||||
|
@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Padding And Margin</title>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<nav>
|
||||
|
||||
<a href="/" >Home</a>
|
||||
|
||||
<a href="/blog.html" >Blog</a>
|
||||
|
||||
<a href="/podcast.html" >Podcast</a>
|
||||
|
||||
<a href="https://github.com/TTWNO/" >Code</a>
|
||||
|
||||
</nav>
|
||||
|
||||
<h1>Padding And Margin</h1>
|
||||
<h4 class="post-date line-under">Wednesday, January 22 2020</h4>
|
||||
|
||||
<div class="article">
|
||||
<p>Many people have expressed confusion over how padding and margins work in HTML/CSS. I have been one of those people. In this short article I will explain what the differences are between the two, and how it may affect the functionality of your site.</p>
|
||||
|
||||
<p>Here is an image from the World Wide Web Consortium (W3C) who sets the standards for the web.</p>
|
||||
|
||||
<p><img src="/assets/img/w3c-padding-margin.png" alt="The W3C standard for padding, margin, borders and width. Width encompases the inner element + padding; the border then encompases it. The margin is the space beyond the border and in between other elements." title="W3C border, padding, margin standard." /></p>
|
||||
|
||||
<p>Now although this image shows all the different types of spacing as equal, the majority of the time these will mostly be padding (inner) and margin (outer). Padding is the inner space between the element and its border; margin is the outer space between two different elements.</p>
|
||||
|
||||
<p>Within the margin the user is unable to press any links or execute any javascript code. It is <em>empty</em> space. If each <code class="highlighter-rouge"><link></code> on your navigation bar has 10 pixels of margin, then there would be 20 pixels in between each <code class="highlighter-rouge"><link></code> that would <em>not</em> be clickable by the user.</p>
|
||||
|
||||
<p>If you have <code class="highlighter-rouge"><link></code>s on your navigation bar with <em>padding</em> set to 20 pixels, however, then there will be 20 pixels on each side of the <code class="highlighter-rouge"><link></code> text where the user <em>is</em> able to click.</p>
|
||||
|
||||
<p>If that part is confusing, try thinking about it in terms of whether <code class="highlighter-rouge">background-color</code> would apply.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th><strong>Padding</strong></th>
|
||||
<th><strong>Margin</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Spacing</td>
|
||||
<td>within element</td>
|
||||
<td>between elements</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="highlighter-rouge">background-color</code> applies</td>
|
||||
<td>Yes</td>
|
||||
<td>No</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>In summary:</p>
|
||||
<ul>
|
||||
<li><strong>Padding</strong>: the space within a tag which is still part of the same tag. <code class="highlighter-rouge">background-color</code> applies.</li>
|
||||
<li><strong>Margin</strong>: the space in between two seperate tags. <code class="highlighter-rouge">background-color</code> does not apply; it is empty space.</li>
|
||||
<li><strong>Border</strong>: the space in between the two; it surrounds the padding, but is not the margin. It looks nice somtimes, but it has no non-visual function. <code class="highlighter-rouge">background-color</code> does not apply.</li>
|
||||
</ul>
|
||||
|
||||
<p>I hope this covers the basics of margin and padding! Happy coding!</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 53 KiB |
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<nav>
|
||||
|
||||
<a href="/" >Home</a>
|
||||
|
||||
<a href="/blog.html" >Blog</a>
|
||||
|
||||
<a href="/podcast.html" class="on-page">Podcast</a>
|
||||
|
||||
<a href="https://github.com/TTWNO/" >Code</a>
|
||||
|
||||
</nav>
|
||||
|
||||
<p>This is not ready yet. Come back February 2020.</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 53 KiB |
@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<p>This is not ready yet. Come back February 2020.</p>
|
Loading…
Reference in new issue