Add files for blog post 3 of INTP; add .terminal CSS class. The blog post dates are a lie.

master
Tait Hoyem 4 years ago
parent ffc03e95e6
commit b89928b433

315
2

@ -0,0 +1,315 @@
---
title: How To Encrypt Your Own Documents Using gpg
layout: post
author: tait
---
If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you!
It should be noted that in some circles the tools used are more common than in others.
These are the everyday tools of many privacy advocates and computer nerds.
If you have never used Linux however, then the method of doing this will be rather unfamiliar.
This tutorial will be done on an [Arch Linux](https://archlinux.org/) machine,
but it should be the same on Ubuntu, Fedora, CentOS, Debian,
OpenBSD, FreeBSD, MacOSX, etc.
The only operating system that does not include these tools by default (or easily accessible) is Windows.
*Let us...begin!*
## Glossary
* [**ASCII armour**](https://en.wikipedia.org/wiki/Binary-to-text_encoding#ASCII_armor) --- A way to encode **OpenPGP** documents so they are readable by humans. These files end in .asc
* **(Open)PGP** --- An open standard for encoding pulbic keys and encrypted documents.
* **GPG** --- GNUPrivacyGaurd is an implementation of **OpenPGP**. It is installed by default on most Linux distrobutions.
## Step 0: Setup
We will be using the utility `gpg` for this tutorial.
The other thing to note: The character '$' (dollar sign) is usually not typed when shown in a command.
It simply indicates that you do not need administrative privilages to run these commands.
Test to see if you get this output in your terminal.
<pre class="terminal">
$ gpg --version
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
...
</pre>
If this is not successful look into how to install these tools on your system.
## Step 1: Get/Create A Public Key!
### Get Somebody Else's
Step one is having somebody to send your encrypted message to. Maybe this is a friend, a journalist, or a whistleblower.
To encrypt a document with somebody's public key, you need to first obtain it.
My public key is available [at this link](/public-key.asc), and you can use it to send me encrypted stuff.
If you are on a linux terminal, you can use the `curl` or `wget` command to download it.
wget:
<pre class="terminal">
$ wget https://tait.tech/public-key.asc
</pre>
Curl:
<pre class="terminal">
$ curl https://tait.tech/public-key.asc -o public-key.asc
</pre>
### Make Your Own (optional)
The following section is quite long,
so if you don't want to create your own keypair,
then feel free to skip to [Step #2](#step-2-import-public-key).
If you want to encrypt your own documents,
or you want others to be able to send you encrypted messages,
then you can create your own public/private key pair.
You can use these to encrypt your documents,
and you can send our public key to others so that they can securely communicate with yourself.
Run the following command in your terminal, and follow the steps I outline to get you started.
<pre class="terminal">
$ gpg --full-gen-key
</pre>
This will produce the following dialog:
<pre class="terminal">
gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection?
</pre>
Select the option `1`. You want two keys, both RSA.
Next we will select the key size:
<pre class="terminal">
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
</pre>
Type the number 2048.
Next it will ask you how long you want the key to be valid.
<pre class="terminal">
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
&lt;n&gt; = key expires in n days
&lt;n&gt;w = key expires in n weeks
&lt;n&gt;m = key expires in n months
&lt;n&gt;y = key expires in n years
Key is valid for? (0)
</pre>
Type the number 1. This will enable you time to test it,
but it will make the key expire within 24 hours so that if you accidentally
share your private key, or delete your VM and no longer have access to it, you will be fine.
It will ask your if you are sure about the expiry date.
<pre class="terminal">
Key expires at Tue Apr 7 02:24:23 2020 UTC
Is this correct? (y/N)
</pre>
Type `y` to confirm your choice.
Now `gpg` is going to ask you to create a user id to indetify this key.
Use some test data for now.
User input is in bold, feel free to follow along or to put your own test data in.
Once you are more comfortable with the tools,
then you can create a public/private keypair that you will keep for some time.
<pre class="terminal">
GnuPG needs to construct a user ID to identify your key.
Real name: <b>Mr. Tester</b>
Email address: <b>test@test.org</b>
Comment: <b>for testing only</b>
You selected this USER-ID:
"Mr. Tester (for testing only) <test@test.org>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <b>O</b>
</pre>
It will then ask you for a password.
If you are simply using this for test purposes,
then you can feel free to set it to something like "test".
When create a long-term use pulbic key make sure to make the password *very* secure.
During the process of creating your key, `gpg` may warn you with this message:
<pre class="terminal">
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
</pre>
If this happens, feel free to smash your keyboard (lightly),
watch a YouTube video on the machine,
browse the web with [w3m](http://w3m.sourceforge.net/),
etc. until the key is generated.
You will know it is done when you see this message (or something similar):
<pre class="terminal">
gpg: key EACCC490291EA7CE marked as ultimately trusted
gpg: revocation certificate stored as '/home/tait/.config/gnupg/openpgp-revocs.d/FFA7D7525C6546983F1152D8EACCC490291EA7CE.rev'
public and secret key created and signed.
pub rsa2048 2020-04-06 [SC] [expires: 2020-04-07]
FFA7D7525C6546983F1152D8EACCC490291EA7CE
uid Mr. Tester (for testing only) <test@test.org>
sub rsa2048 2020-04-06 [E] [expires: 2020-04-07]
</pre>
Tada! You have your own public/private keypair!
Sharing a keypair that will expire soon is not a good idea,
however, if you are ready, then you can use this command to generate a public key file to share with others.
Feel free to substitute "Mr. Tester" for any other identifying part of your key.
Remember that to use the email, you must enclose it in &lt; and &gt;.
<pre class="terminal">
$ gpg --export --armour "Mr. Tester" > public-key.asc
</pre>
To use the email as the identifier:
<pre class="terminal">
$ gpg --export --armour "<test@test.org>" > public-key.asc
</pre>
## Step 2: Import Public Key
This list of keys that `gpg` keeps on tap so to speak, is called our "keyring".
Your will need to import a new public key to encrypt files with `gpg`.
If you already created your own public key, then this step is not necessary unless you want to also encrypt something for me :)
<figure>
<img src="/assets/img/keyring.jpg" alt="A keyring holding eight allen keys.">
<figcaption>
A keyring holding eight allen keys.
</figcaption>
</figure>
To import a public key to use for encrypting files, use the `--import` option of `gpg`. Like so:
<pre class="terminal">
$ gpg --import public-key.asc
gpg: key 64FB4E386953BEAD: public key "Tait Hoyem <tait.hoyem@protonmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
</pre>
Now that we have imported a public key, we can make a message to send!
## Step 3: Have A Message To Encrypt
We can make a new file which holds some important, secret data.
Feel free to use a graphical editor if you have one, if not, `nano` works alright too.
Feel free to encrypt this and send it to me to see if it works!
<pre class="terminal">
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
</pre>
Save this file as something like `test-pgp.txt`, and we'll use that name later :)
## Step 4: Encrypt A Message
Now that we have a message to send and person to send to,
all we have to do is encrypt this message and it'll be on its merry way!
To do so, we must specify two new options to `gpg`.
The first is `--recipient`.
This tells `gpg` to encrypt using a certina public key that we have in our keyring.
We can use the person's name, email address, or the key's uid.
The second is `--encrypt`.
Put the file name after this option.
We will also specify the `--armour` option to use ASCII armoured files.
### On With It!
Ok, yes!
Let's encrypt our document now.
We will be using my name to identify the key.
In the very strange case you have two keys in your keyring named after me, this will fail...
But at that point I have other questions.
This is the big one!
<pre class="terminal">
$ gpg --recipient "Tait Hoyem" --encrypt --armour test-gpg.txt
</pre>
"But there is no output!" you might say!
Yes, that is because our new (encrypted) file has already been saved.
Let's look at it with cat.
<pre class="terminal">
$ cat test-gpg.txt.asc
-----BEGIN PGP MESSAGE-----
hQIMA2mJuYb8vkIlAQ/9FDmXJgW2vI7p9sznKvHhQk7uTZvoWC3hCeqHoO3BSElP
XR1BNAkJ+bykB30M+9u+XDyRtTwazjvNPmYfQnIh0Q+BQZigDWbEd1R47jbzm7Tu
0eZKKapgEidfecULtaECX1sR3qPt1m9oZjyUR1rzNd8tezZlCu2pjdNZrkta2Bdm
Hh1xDS43Bw7PMQqraJsHwqr0M1GLDbMzPes2ZU5y4jEmXZ0PZdJ7kgjR8dvhLBfi
MU+4kYnnemQEztXBOjKidhyOntKiLjenvD00tVHrOuQoWuWCHGiqR24qSwVjeb9G
079gqH1VWi3fk2cwFA9f3TLvJqUwatyE0Hcba0U1d2Voz/C9JEQjT6FHuaCqQL6b
p7B7m2DwpywFGJpAn6ksrEYqHaLVWiEGmdMmHYuHxMw8+cqoSwbYymCZTwMBAuJe
Pr1VO9uNo+Vj5r8IX7ACcSsrjf0XkVzfX6ySsPbyOlGXnwzWSOM3Dk2Z9MqDORbj
0/7vJTnDctPuc91Rlp3YnJlZKWMcNfPMKMtvpljd2XuVwub+C4vGWXa9XLbRXmJo
cnEFT6SB11AKjytE2Urt62CCrYjJPBneabxbCztnBs+vQSx7Fj0LK6v4Euik/Xm/
9aKmZZW8306c9Zwgpp9glWjLMCDNxJRGdKRjZsnkt9hOEYsP1irTegystK6u4eHS
mwHX931ENOJsnPfQZCZ9b41Q9doZQ/N/WHstQO8MtA3HIN1sW3wYkGzOLKj4gJfm
bqR/TzQmXyLT1xZa+/yTscaV0P4OlI4vcii/k4DgeSeQVWp9o9DbZFxSCsdYVvPu
jaDMzZnIKoax1GFz/coUAHFQub2rLzaQ5DDbvrkX++UrAjuUtRcSFH0TKhahZmCF
nv117moLfK22Mst/
=bw8T
-----END PGP MESSAGE-----
</pre>
## Step 5: Finale!
Ladies and gentleman, we have done it!
We have encrypted our very own document.
Feel free to send it to [my email (tait@tait.tech)](mailto:tait@tait.tech).
I am happy to verify if it worked.
For more information on this subject, check out [gnugp.org's guide](https://www.gnupg.org/gph/en/manual/c14.html) on using GPG.
They are the ones that make these tools available,
and the [GNU Project](https://www.gnu.org/) has been instrumental in creating the open-source world as it exists today.

@ -0,0 +1,2 @@
<footer>
</footer>

@ -7,3 +7,5 @@ layout: default
<div class="article">
{{ content }}
</div>
{% include footer.html %}

@ -0,0 +1,146 @@
---
title: "How Asymetric Encryption Works"
layout: post
author: tait
---
In a few previous articles I have explained [why encryption may be important to you](/2020/01/26/rsa1.html) and [how the theory behind encryption works](/2020/02/19/rsa2.html). I did not yet explain the system of asymetric cryptography, however. That is what this article is for.
Previously, we talked about how *symetric* encryption works. This is by having a shared key that both parties use to simultaniously encrypt, and decrypt the data. (See Ceasar Cipher for example).
## Public-key, or Asymetric Encryption
Asymetric encryption is based on the idea of having multiple keys instead of only one shared key.
For example: instead of encrypting with one key, and decrypting with that same key (like our ROT ciphers we talked about previously), we can use one key to *encrypt* the information, and a different key to *decrypt* the information.
<figure>
<img src="/assets/img/alice-to-bob.png" alt="Alice sending her message to Bob using Bob's public key. Bob decrypts the message with his private key.">
<figcaption>
Alice sending her message to Bob using Bob's public key. Bob decrypts the message with his private key.
</figcaption>
</figure>
In the picture above, see how Alice uses Bob's public key to encrypt some data,
then sends it to Bob for him to decrypt with his private key?
That is the essense of public-key encryption.
The great thing about public-key encryption is that your public key is *public*! There is no need to be afraid of sending this everywhere!
You can attach it at the end of all your emails, the end of your forum posts, [a link to it on your low-power webserver](/public-key.asc) (wink).
There are even things called [keyservers](http://keys.gnupg.net/) that will save your public key on them for retrival in case somebody wants to verify your public key.
Anything encrypted with your public key can only be decrypted with your private key.
Provided you never, *NEVER* share your private key with anyone ever, we can assume that all messages sent to you encrypted with your public key will never be read by anyone else.
Asymetric encryption, however, often contains four keys instead of two. Why is this?
#### Verification of Author
One interesting thing about keys pairs is that not only can the private key decrypt anything the public key encrypts,
but the public key can decrypt anything the private key encrypts.
Now why would one want to encrypt a message that can be decrypted by anyone?
<figure>
<img src="/assets/img/alice-sign-to-bob.png" alt="Alice sending a message to bob which is 'signed' with her private key. This allows Bob to know only Alice could have sent it!">
<figcaption>
Alice sending a message to bob which is 'signed' with her private key. This allows Bob to know only Alice could have sent it!
<br>
<br>
Note: Although the picture shows otherwise, the text is not sent in the plain. It is encrypted with Alice's private key.
</figcaption>
</figure>
This is how you can verify that the person who says they wrote the message really did indeed write the message!
If their private key was never shared with anyone else, then the message must have come from them!
For maximum security, these methods are often layered.
First, signing with the sender's private key,
ensuring only they could have sent it---
then encrypted with the recipient's pulbic key,
making sure only the reciever can read it.
Note that both sides must first have eachother's public keys to do this.
This is easy if they communicate often, but when first contacting somebody,
people will generally send their encrypted message along with the their own pulbic key attached in a seperate file.
### What This Means
Notice neither Alice nor Bob had to share any comprimsing information over the network?
This is why public-key encryption is so powerful!
Alice and Bob can both safely send their public keys in the open.
They can even send them over the insecure HTTP, or FTP protocols.
Whilst not sending any encryption-breaking messages,
Alice and Bob now have a way to communicate securely.
If you trust nothing and no one, this is your perfered method of security.
Check out this [Computerphile video](https://www.youtube.com/watch?v=GSIDS_lvRv4) if you want the simplified explaination.
### The Algorithms
The two biggest "implementations" of public-key cryptography vary only in the mathamatical equations used to generate the numbers,
and how the numbers are ["trapdoored"](https://en.wikipedia.org/wiki/Trapdoor_function) to decrypt if you have the correct key.
I will discuss the differences in approach here.
If you want to skip to the next article where I show you how to encrypt your own documents using RSA, see [this link](/2020/04/06/rsa4.html).
### RSA
The mathamatic center of the RSA system was developed over the course of a year or so.
Three men were involved. Ron Rivest, Adi Shamir, and Leonard Aldeman.
They worked as a kind of "team": Each idea by Rivest and Shamir were critisized by the mathamatician on their team: Mr. Aldeman.
One night, after consuming
["liberal quantities of Manischewitz wine"](https://www.math.uchicago.edu/~may/VIGRE/VIGRE2007/REUPapers/FINALAPP/Calderbank.pdf)
Rivest had trouble sleeping.
After taking long gazes into the abyss of his math textbook, he came up with an idea which would change cryptography forever.
By the next morning, an academic mathamatical paper was nearly finished.
He named it after himself and the two others that had been helping him along this whole time. *Rivest, Shamir, Aldeman*.
Key sizes of RSA range from 1024-bit to 4096-bit.
1024-bit keys are considered somewhat insecure.
However,
it should be noted that every bit doubles the complexity of the key,
so 2048 is [2^1024](https://www.wolframalpha.com/input/?i=2%5E1024) times more complex than 1024.
### Eliptic-Curve (EC)
Eliptic-Curve (EC) is a family of algorithms that use the [Eliptic curve](https://en.wikipedia.org/wiki/Elliptic_curve) mathamatical structure to generate the numbers for the keys.
EC can effectivly provide the security of an RSA key [one order of magnitude larger](https://www.youtube.com/watch?v=NF1pwjL9-DE) than an RSA key.
<figure>
<img src="/assets/img/ec.png" alt="A picture of an eliptic curve." class="small-image">
<figcaption>
An eliptic curve structure.
</figcaption>
</figure>
It's fast; it's secure! Perfect right?
Of course not!
One problem is that due to the smaller key size,
it can more easily be broken by brute-force.
This is why EC is mostly used for temporary communication (like HTTPS), not permenant communication (like having an encrypted email conversation with a journalist).
The other problem is that a certain EC algrorithm called P-256 is suspected to be introduced with malice to National Institute of Standards and Technology (NIST)
[by the NSA](https://www.schneier.com/essays/archives/2007/11/did_nsa_put_a_secret.html).
Supposedly, the NSA is able to crack anything encrypted with this algorithm.
I will let the experts argure about that.
Other well-known EC algorithms that are more-or-less trusted as secure do exist though.
The premeire one being Curve25519.
The reference implementation of [this algrorithm](https://cr.yp.to/ecdh.html) is also [public-domain](https://fairuse.stanford.edu/overview/public-domain/welcome/),
so it is easy for devlopers to work into their own applications without worrying about copywrite.
## Conslusion
In this article we went over some basic points:
1. Public-key encryption enables secure communication over insecure networks.
2. RSA is considered the standard for extra-seure communication.
3. EC is a newer, faster, more transient encryption method.
To learn how to use RSA keys to encrypt your own communications, check out [this other aritcle I wrote](/2020/04/06/rsa4.html).

@ -0,0 +1,345 @@
---
title: How To Encrypt Your Own Documents Using gpg
layout: post
author: tait
---
If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you!
It should be noted that in some circles the tools used are more common than in others.
These are the everyday tools of many privacy advocates and computer nerds.
If you have never used Linux however, then the method of doing this will be rather unfamiliar.
This tutorial will be done on an [Arch Linux](https://archlinux.org/) machine,
but it should be the same on Ubuntu, Fedora, CentOS, Debian,
OpenBSD, FreeBSD, MacOSX, etc.
The only operating system that does not include these tools by default (or easily accessible) is Windows.
This tutorial makes heavy use of the terminal.
You have been warned.
*Let us...begin!*
## Glossary
* [**ASCII armour**](https://en.wikipedia.org/wiki/Binary-to-text_encoding#ASCII_armor) --- A way to encode **OpenPGP** documents so they are readable by humans. These files end in .asc
* **(Open)PGP** --- An open standard for encoding pulbic keys and encrypted documents.
* **GPG** --- GNUPrivacyGaurd is an implementation of **OpenPGP**. It is installed by default on most Linux distrobutions.
## Step 0: Setup
We will be using the utility `gpg` for this tutorial.
The other thing to note: The character '$' (dollar sign) is usually not typed when shown in a command.
It simply indicates that you do not need administrative privilages to run these commands.
Test to see if you get this output in your terminal.
<pre class="terminal">
$ gpg --version
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
...
</pre>
If this is not successful look into how to install these tools on your system.
## Step 1: Get/Create A Public Key!
### Get Somebody Else's
Step one is having somebody to send your encrypted message to. Maybe this is a friend, a journalist, or a whistleblower.
To encrypt a document with somebody's public key, you need to first obtain it.
My public key is available [at this link](/public-key.asc), and you can use it to send me encrypted stuff.
If you are on a linux terminal, you can use the `curl` or `wget` command to download it.
wget:
<pre class="terminal">
$ wget https://tait.tech/public-key.asc
</pre>
Curl:
<pre class="terminal">
$ curl https://tait.tech/public-key.asc -o public-key.asc
</pre>
### Make Your Own (optional)
The following section is quite long,
so if you don't want to create your own keypair,
then feel free to skip to [Step #2](#step-2-import-public-key).
If you want to encrypt your own documents,
or you want others to be able to send you encrypted messages,
then you can create your own public/private key pair.
You can use these to encrypt your documents,
and you can send our public key to others so that they can securely communicate with yourself.
Run the following command in your terminal, and follow the steps I outline to get you started.
<pre class="terminal">
$ gpg --full-gen-key
</pre>
This will produce the following dialog:
<pre class="terminal">
gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection?
</pre>
Select the option `1`. You want two keys, both RSA.
Next we will select the key size:
<pre class="terminal">
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
</pre>
Type the number 2048.
Next it will ask you how long you want the key to be valid.
<pre class="terminal">
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
&lt;n&gt; = key expires in n days
&lt;n&gt;w = key expires in n weeks
&lt;n&gt;m = key expires in n months
&lt;n&gt;y = key expires in n years
Key is valid for? (0)
</pre>
Type the number 1. This will enable you time to test it,
but it will make the key expire within 24 hours so that if you accidentally
share your private key, or delete your VM and no longer have access to it, you will be fine.
It will ask your if you are sure about the expiry date.
<pre class="terminal">
Key expires at Tue Apr 7 02:24:23 2020 UTC
Is this correct? (y/N)
</pre>
Type `y` to confirm your choice.
Now `gpg` is going to ask you to create a user id to indetify this key.
Use some test data for now.
User input is in bold, feel free to follow along or to put your own test data in.
Once you are more comfortable with the tools,
then you can create a public/private keypair that you will keep for some time.
<pre class="terminal">
GnuPG needs to construct a user ID to identify your key.
Real name: <b>Mr. Tester</b>
Email address: <b>test@test.org</b>
Comment: <b>for testing only</b>
You selected this USER-ID:
"Mr. Tester (for testing only) <test@test.org>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <b>O</b>
</pre>
It will then ask you for a password.
If you are simply using this for test purposes,
then you can feel free to set it to something like "test".
When create a long-term use pulbic key make sure to make the password *very* secure.
During the process of creating your key, `gpg` may warn you with this message:
<pre class="terminal">
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
</pre>
If this happens, feel free to smash your keyboard (lightly),
watch a YouTube video on the machine,
browse the web with [w3m](http://w3m.sourceforge.net/),
etc. until the key is generated.
You will know it is done when you see this message (or something similar):
<pre class="terminal">
gpg: key EACCC490291EA7CE marked as ultimately trusted
gpg: revocation certificate stored as '/home/tait/.config/gnupg/openpgp-revocs.d/FFA7D7525C6546983F1152D8EACCC490291EA7CE.rev'
public and secret key created and signed.
pub rsa2048 2020-04-06 [SC] [expires: 2020-04-07]
FFA7D7525C6546983F1152D8EACCC490291EA7CE
uid Mr. Tester (for testing only) <test@test.org>
sub rsa2048 2020-04-06 [E] [expires: 2020-04-07]
</pre>
Tada! You have your own public/private keypair!
Sharing a keypair that will expire soon is not a good idea,
however, if you are ready, then you can use this command to generate a public key file to share with others.
Feel free to substitute "Mr. Tester" for any other identifying part of your key.
Remember that to use the email, you must enclose it in &lt; and &gt;.
<pre class="terminal">
$ gpg --export --armour "Mr. Tester" > public-key.asc
</pre>
To use the email as the identifier:
<pre class="terminal">
$ gpg --export --armour "<test@test.org>" > public-key.asc
</pre>
## Step 2: Import Public Key
This list of keys that `gpg` keeps on tap so to speak, is called our "keyring".
Your will need to import a new public key to encrypt files with `gpg`.
If you already created your own public key, then this step is not necessary unless you want to also encrypt something for me :)
<figure>
<img src="/assets/img/keyring.jpg" alt="A keyring holding eight allen keys.">
<figcaption>
A keyring holding eight allen keys.
</figcaption>
</figure>
To import a public key to use for encrypting files, use the `--import` option of `gpg`. Like so:
<pre class="terminal">
$ gpg --import public-key.asc
gpg: key 64FB4E386953BEAD: public key "Tait Hoyem <tait.hoyem@protonmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
</pre>
Now that we have imported a public key, we can make a message to send!
## Step 3: Have A Message To Encrypt
You can make a new file which holds some important, secret data.
Feel free to use a graphical editor if you have one, if not, `nano` works alright too.
<pre class="terminal">
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
</pre>
Save this file as something like `test-pgp.txt`, and we'll use that name later.
## Step 4: Encrypt A Message
Now that we have a message to send and person to send to,
all we have to do is encrypt this message and it'll be on its merry way!
To do so, we must specify two new options to `gpg`.
The first is `--recipient`.
This tells `gpg` to encrypt using a certin public key that we have in our keyring.
You can use the person's name, email address, or the key's uid.
The second is `--encrypt`.
You will also specify the `--armour` option to use ASCII armoured files. Put this option after `--encrypt`, and put the file name after `--armour`. See below.
You can either use your own public key name to encrypt a document (allowng only you to decrypt it),
or you can use my public key that we imported earlier (allowing only me to decrypt it).
Either way works fine.
This is the big one!
<pre class="terminal">
$ gpg --recipient "Tait Hoyem" --encrypt --armour test-gpg.txt
</pre>
"But there is no output!" you might say!
Yes, that is because our new (encrypted) file has already been saved.
Let's look at it with cat.
<pre class="terminal">
$ cat test-gpg.txt.asc
-----BEGIN PGP MESSAGE-----
hQIMA2mJuYb8vkIlAQ/9FDmXJgW2vI7p9sznKvHhQk7uTZvoWC3hCeqHoO3BSElP
XR1BNAkJ+bykB30M+9u+XDyRtTwazjvNPmYfQnIh0Q+BQZigDWbEd1R47jbzm7Tu
0eZKKapgEidfecULtaECX1sR3qPt1m9oZjyUR1rzNd8tezZlCu2pjdNZrkta2Bdm
Hh1xDS43Bw7PMQqraJsHwqr0M1GLDbMzPes2ZU5y4jEmXZ0PZdJ7kgjR8dvhLBfi
MU+4kYnnemQEztXBOjKidhyOntKiLjenvD00tVHrOuQoWuWCHGiqR24qSwVjeb9G
079gqH1VWi3fk2cwFA9f3TLvJqUwatyE0Hcba0U1d2Voz/C9JEQjT6FHuaCqQL6b
p7B7m2DwpywFGJpAn6ksrEYqHaLVWiEGmdMmHYuHxMw8+cqoSwbYymCZTwMBAuJe
Pr1VO9uNo+Vj5r8IX7ACcSsrjf0XkVzfX6ySsPbyOlGXnwzWSOM3Dk2Z9MqDORbj
0/7vJTnDctPuc91Rlp3YnJlZKWMcNfPMKMtvpljd2XuVwub+C4vGWXa9XLbRXmJo
cnEFT6SB11AKjytE2Urt62CCrYjJPBneabxbCztnBs+vQSx7Fj0LK6v4Euik/Xm/
9aKmZZW8306c9Zwgpp9glWjLMCDNxJRGdKRjZsnkt9hOEYsP1irTegystK6u4eHS
mwHX931ENOJsnPfQZCZ9b41Q9doZQ/N/WHstQO8MtA3HIN1sW3wYkGzOLKj4gJfm
bqR/TzQmXyLT1xZa+/yTscaV0P4OlI4vcii/k4DgeSeQVWp9o9DbZFxSCsdYVvPu
jaDMzZnIKoax1GFz/coUAHFQub2rLzaQ5DDbvrkX++UrAjuUtRcSFH0TKhahZmCF
nv117moLfK22Mst/
=bw8T
-----END PGP MESSAGE-----
</pre>
## Step 5: Decryption (optional)
If you created your own public/private keypair in step 1,
and you encryped using `--recipient "Your Test Name"`,
then you can decrypt your document as well!
You will need to specify `--decrypt`, and that's all folks!
<pre class="terminal">
$ gpg --decrypt test-gpg.txt.asc
</pre>
A password dialog will then come up asking for your previously created password.
As long as you remember your password from before and enter it correctly: voila!
<pre class="terminal">
gpg: encrypted with 4096-bit RSA key, ID 6989B986FCBE4225, created 2020-01-02
"Tait Hoyem <tait.hoyem@protonmail.com>"
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
</pre>
## Step 6: Finale!
Ladies and gentleman, you have done it!
You have encrypted our very own document.
(And maybe even decrypted it yourself too :)
If you encrypted using my public key,
feel free to send it to [my email](mailto:tait@tait.tech).
I am happy to verify if it worked.
For more information on this subject, check out [gnugp.org's guide](https://www.gnupg.org/gph/en/manual/c14.html) on using GPG.
They are the ones that make these tools available,
and the [GNU Project](https://www.gnu.org/) has been instrumental in creating the open-source world as it exists today.
Give 'em some love, eh!
Thank you so much for sticking through this whole thing!
Let me know if there is anything that doesn't make sense.
I am happy to improve this guide as time goes on if that is necessary.
Happy hacking :)

@ -209,3 +209,21 @@ figcaption {
font-size: .8em;
text-decoration: italic;
}
footer {
border-top: $line-under;
margin-bottom: 100px;
}
.terminal {
line-height: 1em;
overflow: scroll;
padding: 10px;
color: #00FF41;
margin: 0px;
background-color: #151515;
}
.small-image {
width: 100%;
}

@ -0,0 +1,349 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>How To Encrypt Your Own Documents Using gpg</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>
<input type="checkbox" id="menu">
<label for="menu">&#9776;</label>
<div class="menu-content">
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Code</a>
<a href="/links/" class="nav-link" >Links</a>
</div>
</nav>
<h1>How To Encrypt Your Own Documents Using gpg</h1>
<h4 class="post-date line-under"></h4>
<div class="article">
If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you!
It should be noted that in some circles the tools used are more common than in others.
These are the everyday tools of many privacy advocates and computer nerds.
If you have never used Linux however, then the method of doing this will be rather unfamiliar.
This tutorial will be done on an [Arch Linux](https://archlinux.org/) machine,
but it should be the same on Ubuntu, Fedora, CentOS, Debian,
OpenBSD, FreeBSD, MacOSX, etc.
The only operating system that does not include these tools by default (or easily accessible) is Windows.
*Let us...begin!*
## Glossary
* [**ASCII armour**](https://en.wikipedia.org/wiki/Binary-to-text_encoding#ASCII_armor) --- A way to encode **OpenPGP** documents so they are readable by humans. These files end in .asc
* **(Open)PGP** --- An open standard for encoding pulbic keys and encrypted documents.
* **GPG** --- GNUPrivacyGaurd is an implementation of **OpenPGP**. It is installed by default on most Linux distrobutions.
## Step 0: Setup
We will be using the utility `gpg` for this tutorial.
The other thing to note: The character '$' (dollar sign) is usually not typed when shown in a command.
It simply indicates that you do not need administrative privilages to run these commands.
Test to see if you get this output in your terminal.
<pre class="terminal">
$ gpg --version
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
...
</pre>
If this is not successful look into how to install these tools on your system.
## Step 1: Get/Create A Public Key!
### Get Somebody Else's
Step one is having somebody to send your encrypted message to. Maybe this is a friend, a journalist, or a whistleblower.
To encrypt a document with somebody's public key, you need to first obtain it.
My public key is available [at this link](/public-key.asc), and you can use it to send me encrypted stuff.
If you are on a linux terminal, you can use the `curl` or `wget` command to download it.
wget:
<pre class="terminal">
$ wget https://tait.tech/public-key.asc
</pre>
Curl:
<pre class="terminal">
$ curl https://tait.tech/public-key.asc -o public-key.asc
</pre>
### Make Your Own (optional)
The following section is quite long,
so if you don't want to create your own keypair,
then feel free to skip to [Step #2](#step-2-import-public-key).
If you want to encrypt your own documents,
or you want others to be able to send you encrypted messages,
then you can create your own public/private key pair.
You can use these to encrypt your documents,
and you can send our public key to others so that they can securely communicate with yourself.
Run the following command in your terminal, and follow the steps I outline to get you started.
<pre class="terminal">
$ gpg --full-gen-key
</pre>
This will produce the following dialog:
<pre class="terminal">
gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection?
</pre>
Select the option `1`. You want two keys, both RSA.
Next we will select the key size:
<pre class="terminal">
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
</pre>
Type the number 2048.
Next it will ask you how long you want the key to be valid.
<pre class="terminal">
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
&lt;n&gt; = key expires in n days
&lt;n&gt;w = key expires in n weeks
&lt;n&gt;m = key expires in n months
&lt;n&gt;y = key expires in n years
Key is valid for? (0)
</pre>
Type the number 1. This will enable you time to test it,
but it will make the key expire within 24 hours so that if you accidentally
share your private key, or delete your VM and no longer have access to it, you will be fine.
It will ask your if you are sure about the expiry date.
<pre class="terminal">
Key expires at Tue Apr 7 02:24:23 2020 UTC
Is this correct? (y/N)
</pre>
Type `y` to confirm your choice.
Now `gpg` is going to ask you to create a user id to indetify this key.
Use some test data for now.
User input is in bold, feel free to follow along or to put your own test data in.
Once you are more comfortable with the tools,
then you can create a public/private keypair that you will keep for some time.
<pre class="terminal">
GnuPG needs to construct a user ID to identify your key.
Real name: <b>Mr. Tester</b>
Email address: <b>test@test.org</b>
Comment: <b>for testing only</b>
You selected this USER-ID:
"Mr. Tester (for testing only) <test@test.org>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <b>O</b>
</pre>
It will then ask you for a password.
If you are simply using this for test purposes,
then you can feel free to set it to something like "test".
When create a long-term use pulbic key make sure to make the password *very* secure.
During the process of creating your key, `gpg` may warn you with this message:
<pre class="terminal">
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
</pre>
If this happens, feel free to smash your keyboard (lightly),
watch a YouTube video on the machine,
browse the web with [w3m](http://w3m.sourceforge.net/),
etc. until the key is generated.
You will know it is done when you see this message (or something similar):
<pre class="terminal">
gpg: key EACCC490291EA7CE marked as ultimately trusted
gpg: revocation certificate stored as '/home/tait/.config/gnupg/openpgp-revocs.d/FFA7D7525C6546983F1152D8EACCC490291EA7CE.rev'
public and secret key created and signed.
pub rsa2048 2020-04-06 [SC] [expires: 2020-04-07]
FFA7D7525C6546983F1152D8EACCC490291EA7CE
uid Mr. Tester (for testing only) <test@test.org>
sub rsa2048 2020-04-06 [E] [expires: 2020-04-07]
</pre>
Tada! You have your own public/private keypair!
Sharing a keypair that will expire soon is not a good idea,
however, if you are ready, then you can use this command to generate a public key file to share with others.
Feel free to substitute "Mr. Tester" for any other identifying part of your key.
Remember that to use the email, you must enclose it in &lt; and &gt;.
<pre class="terminal">
$ gpg --export --armour "Mr. Tester" > public-key.asc
</pre>
To use the email as the identifier:
<pre class="terminal">
$ gpg --export --armour "<test@test.org>" > public-key.asc
</pre>
## Step 2: Import Public Key
This list of keys that `gpg` keeps on tap so to speak, is called our "keyring".
Your will need to import a new public key to encrypt files with `gpg`.
If you already created your own public key, then this step is not necessary unless you want to also encrypt something for me :)
<figure>
<img src="/assets/img/keyring.jpg" alt="A keyring holding eight allen keys.">
<figcaption>
A keyring holding eight allen keys.
</figcaption>
</figure>
To import a public key to use for encrypting files, use the `--import` option of `gpg`. Like so:
<pre class="terminal">
$ gpg --import public-key.asc
gpg: key 64FB4E386953BEAD: public key "Tait Hoyem <tait.hoyem@protonmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
</pre>
Now that we have imported a public key, we can make a message to send!
## Step 3: Have A Message To Encrypt
We can make a new file which holds some important, secret data.
Feel free to use a graphical editor if you have one, if not, `nano` works alright too.
Feel free to encrypt this and send it to me to see if it works!
<pre class="terminal">
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
</pre>
Save this file as something like `test-pgp.txt`, and we'll use that name later :)
## Step 4: Encrypt A Message
Now that we have a message to send and person to send to,
all we have to do is encrypt this message and it'll be on its merry way!
To do so, we must specify two new options to `gpg`.
The first is `--recipient`.
This tells `gpg` to encrypt using a certina public key that we have in our keyring.
We can use the person's name, email address, or the key's uid.
The second is `--encrypt`.
Put the file name after this option.
We will also specify the `--armour` option to use ASCII armoured files.
### On With It!
Ok, yes!
Let's encrypt our document now.
We will be using my name to identify the key.
In the very strange case you have two keys in your keyring named after me, this will fail...
But at that point I have other questions.
This is the big one!
<pre class="terminal">
$ gpg --recipient "Tait Hoyem" --encrypt --armour test-gpg.txt
</pre>
"But there is no output!" you might say!
Yes, that is because our new (encrypted) file has already been saved.
Let's look at it with cat.
<pre class="terminal">
$ cat test-gpg.txt.asc
-----BEGIN PGP MESSAGE-----
hQIMA2mJuYb8vkIlAQ/9FDmXJgW2vI7p9sznKvHhQk7uTZvoWC3hCeqHoO3BSElP
XR1BNAkJ+bykB30M+9u+XDyRtTwazjvNPmYfQnIh0Q+BQZigDWbEd1R47jbzm7Tu
0eZKKapgEidfecULtaECX1sR3qPt1m9oZjyUR1rzNd8tezZlCu2pjdNZrkta2Bdm
Hh1xDS43Bw7PMQqraJsHwqr0M1GLDbMzPes2ZU5y4jEmXZ0PZdJ7kgjR8dvhLBfi
MU+4kYnnemQEztXBOjKidhyOntKiLjenvD00tVHrOuQoWuWCHGiqR24qSwVjeb9G
079gqH1VWi3fk2cwFA9f3TLvJqUwatyE0Hcba0U1d2Voz/C9JEQjT6FHuaCqQL6b
p7B7m2DwpywFGJpAn6ksrEYqHaLVWiEGmdMmHYuHxMw8+cqoSwbYymCZTwMBAuJe
Pr1VO9uNo+Vj5r8IX7ACcSsrjf0XkVzfX6ySsPbyOlGXnwzWSOM3Dk2Z9MqDORbj
0/7vJTnDctPuc91Rlp3YnJlZKWMcNfPMKMtvpljd2XuVwub+C4vGWXa9XLbRXmJo
cnEFT6SB11AKjytE2Urt62CCrYjJPBneabxbCztnBs+vQSx7Fj0LK6v4Euik/Xm/
9aKmZZW8306c9Zwgpp9glWjLMCDNxJRGdKRjZsnkt9hOEYsP1irTegystK6u4eHS
mwHX931ENOJsnPfQZCZ9b41Q9doZQ/N/WHstQO8MtA3HIN1sW3wYkGzOLKj4gJfm
bqR/TzQmXyLT1xZa+/yTscaV0P4OlI4vcii/k4DgeSeQVWp9o9DbZFxSCsdYVvPu
jaDMzZnIKoax1GFz/coUAHFQub2rLzaQ5DDbvrkX++UrAjuUtRcSFH0TKhahZmCF
nv117moLfK22Mst/
=bw8T
-----END PGP MESSAGE-----
</pre>
## Step 5: Finale!
Ladies and gentleman, we have done it!
We have encrypted our very own document.
Feel free to send it to [my email (tait@tait.tech)](mailto:tait@tait.tech).
I am happy to verify if it worked.
For more information on this subject, check out [gnugp.org's guide](https://www.gnupg.org/gph/en/manual/c14.html) on using GPG.
They are the ones that make these tools available,
and the [GNU Project](https://www.gnu.org/) has been instrumental in creating the open-source world as it exists today.
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -191,6 +191,10 @@
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -76,6 +76,10 @@
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -82,6 +82,10 @@ Japan lags slightly behind with 80 percent encrypted traffic.</p>
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -174,6 +174,10 @@ I will discuss this more in another article, but for the technically inclined:</
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -0,0 +1,182 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>How Asymetric Encryption Works</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>
<input type="checkbox" id="menu">
<label for="menu">&#9776;</label>
<div class="menu-content">
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Code</a>
<a href="/links/" class="nav-link" >Links</a>
</div>
</nav>
<h1>How Asymetric Encryption Works</h1>
<h4 class="post-date line-under">Thursday, April 02 2020</h4>
<div class="article">
<p>In a few previous articles I have explained <a href="/2020/01/26/rsa1.html">why encryption may be important to you</a> and <a href="/2020/02/19/rsa2.html">how the theory behind encryption works</a>. I did not yet explain the system of asymetric cryptography, however. That is what this article is for.</p>
<p>Previously, we talked about how <em>symetric</em> encryption works. This is by having a shared key that both parties use to simultaniously encrypt, and decrypt the data. (See Ceasar Cipher for example).</p>
<h2 id="public-key-or-asymetric-encryption">Public-key, or Asymetric Encryption</h2>
<p>Asymetric encryption is based on the idea of having multiple keys instead of only one shared key.
For example: instead of encrypting with one key, and decrypting with that same key (like our ROT ciphers we talked about previously), we can use one key to <em>encrypt</em> the information, and a different key to <em>decrypt</em> the information.</p>
<figure>
<img src="/assets/img/alice-to-bob.png" alt="Alice sending her message to Bob using Bob's public key. Bob decrypts the message with his private key." />
<figcaption>
Alice sending her message to Bob using Bob's public key. Bob decrypts the message with his private key.
</figcaption>
</figure>
<p>In the picture above, see how Alice uses Bobs public key to encrypt some data,
then sends it to Bob for him to decrypt with his private key?
That is the essense of public-key encryption.</p>
<p>The great thing about public-key encryption is that your public key is <em>public</em>! There is no need to be afraid of sending this everywhere!
You can attach it at the end of all your emails, the end of your forum posts, <a href="/public-key.asc">a link to it on your low-power webserver</a> (wink).
There are even things called <a href="http://keys.gnupg.net/">keyservers</a> that will save your public key on them for retrival in case somebody wants to verify your public key.</p>
<p>Anything encrypted with your public key can only be decrypted with your private key.
Provided you never, <em>NEVER</em> share your private key with anyone ever, we can assume that all messages sent to you encrypted with your public key will never be read by anyone else.</p>
<p>Asymetric encryption, however, often contains four keys instead of two. Why is this?</p>
<h4 id="verification-of-author">Verification of Author</h4>
<p>One interesting thing about keys pairs is that not only can the private key decrypt anything the public key encrypts,
but the public key can decrypt anything the private key encrypts.</p>
<p>Now why would one want to encrypt a message that can be decrypted by anyone?</p>
<figure>
<img src="/assets/img/alice-sign-to-bob.png" alt="Alice sending a message to bob which is 'signed' with her private key. This allows Bob to know only Alice could have sent it!" />
<figcaption>
Alice sending a message to bob which is 'signed' with her private key. This allows Bob to know only Alice could have sent it!
<br />
<br />
Note: Although the picture shows otherwise, the text is not sent in the plain. It is encrypted with Alice's private key.
</figcaption>
</figure>
<p>This is how you can verify that the person who says they wrote the message really did indeed write the message!
If their private key was never shared with anyone else, then the message must have come from them!</p>
<p>For maximum security, these methods are often layered.
First, signing with the senders private key,
ensuring only they could have sent it—
then encrypted with the recipients pulbic key,
making sure only the reciever can read it.</p>
<p>Note that both sides must first have eachothers public keys to do this.
This is easy if they communicate often, but when first contacting somebody,
people will generally send their encrypted message along with the their own pulbic key attached in a seperate file.</p>
<h3 id="what-this-means">What This Means</h3>
<p>Notice neither Alice nor Bob had to share any comprimsing information over the network?
This is why public-key encryption is so powerful!</p>
<p>Alice and Bob can both safely send their public keys in the open.
They can even send them over the insecure HTTP, or FTP protocols.</p>
<p>Whilst not sending any encryption-breaking messages,
Alice and Bob now have a way to communicate securely.
If you trust nothing and no one, this is your perfered method of security.</p>
<p>Check out this <a href="https://www.youtube.com/watch?v=GSIDS_lvRv4">Computerphile video</a> if you want the simplified explaination.</p>
<h3 id="the-algorithms">The Algorithms</h3>
<p>The two biggest “implementations” of public-key cryptography vary only in the mathamatical equations used to generate the numbers,
and how the numbers are <a href="https://en.wikipedia.org/wiki/Trapdoor_function">“trapdoored”</a> to decrypt if you have the correct key.</p>
<p>I will discuss the differences in approach here.
If you want to skip to the next article where I show you how to encrypt your own documents using RSA, see <a href="/2020/04/06/rsa4.html">this link</a>.</p>
<h3 id="rsa">RSA</h3>
<p>The mathamatic center of the RSA system was developed over the course of a year or so.
Three men were involved. Ron Rivest, Adi Shamir, and Leonard Aldeman.
They worked as a kind of “team”: Each idea by Rivest and Shamir were critisized by the mathamatician on their team: Mr. Aldeman.</p>
<p>One night, after consuming
<a href="https://www.math.uchicago.edu/~may/VIGRE/VIGRE2007/REUPapers/FINALAPP/Calderbank.pdf">“liberal quantities of Manischewitz wine”</a>
Rivest had trouble sleeping.
After taking long gazes into the abyss of his math textbook, he came up with an idea which would change cryptography forever.
By the next morning, an academic mathamatical paper was nearly finished.
He named it after himself and the two others that had been helping him along this whole time. <em>Rivest, Shamir, Aldeman</em>.</p>
<p>Key sizes of RSA range from 1024-bit to 4096-bit.
1024-bit keys are considered somewhat insecure.
However,
it should be noted that every bit doubles the complexity of the key,
so 2048 is <a href="https://www.wolframalpha.com/input/?i=2%5E1024">2^1024</a> times more complex than 1024.</p>
<h3 id="eliptic-curve-ec">Eliptic-Curve (EC)</h3>
<p>Eliptic-Curve (EC) is a family of algorithms that use the <a href="https://en.wikipedia.org/wiki/Elliptic_curve">Eliptic curve</a> mathamatical structure to generate the numbers for the keys.
EC can effectivly provide the security of an RSA key <a href="https://www.youtube.com/watch?v=NF1pwjL9-DE">one order of magnitude larger</a> than an RSA key.</p>
<figure>
<img src="/assets/img/ec.png" alt="A picture of an eliptic curve." class="small-image" />
<figcaption>
An eliptic curve structure.
</figcaption>
</figure>
<p>Its fast; its secure! Perfect right?</p>
<p>Of course not!</p>
<p>One problem is that due to the smaller key size,
it can more easily be broken by brute-force.
This is why EC is mostly used for temporary communication (like HTTPS), not permenant communication (like having an encrypted email conversation with a journalist).</p>
<p>The other problem is that a certain EC algrorithm called P-256 is suspected to be introduced with malice to National Institute of Standards and Technology (NIST)
<a href="https://www.schneier.com/essays/archives/2007/11/did_nsa_put_a_secret.html">by the NSA</a>.
Supposedly, the NSA is able to crack anything encrypted with this algorithm.
I will let the experts argure about that.</p>
<p>Other well-known EC algorithms that are more-or-less trusted as secure do exist though.
The premeire one being Curve25519.
The reference implementation of <a href="https://cr.yp.to/ecdh.html">this algrorithm</a> is also <a href="https://fairuse.stanford.edu/overview/public-domain/welcome/">public-domain</a>,
so it is easy for devlopers to work into their own applications without worrying about copywrite.</p>
<h2 id="conslusion">Conslusion</h2>
<p>In this article we went over some basic points:</p>
<ol>
<li>Public-key encryption enables secure communication over insecure networks.</li>
<li>RSA is considered the standard for extra-seure communication.</li>
<li>EC is a newer, faster, more transient encryption method.</li>
</ol>
<p>To learn how to use RSA keys to encrypt your own communications, check out <a href="/2020/04/06/rsa4.html">this other aritcle I wrote</a>.</p>
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -0,0 +1,381 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>How To Encrypt Your Own Documents Using gpg</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>
<input type="checkbox" id="menu">
<label for="menu">&#9776;</label>
<div class="menu-content">
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Code</a>
<a href="/links/" class="nav-link" >Links</a>
</div>
</nav>
<h1>How To Encrypt Your Own Documents Using gpg</h1>
<h4 class="post-date line-under">Monday, April 06 2020</h4>
<div class="article">
<p>If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you!
It should be noted that in some circles the tools used are more common than in others.
These are the everyday tools of many privacy advocates and computer nerds.</p>
<p>If you have never used Linux however, then the method of doing this will be rather unfamiliar.
This tutorial will be done on an <a href="https://archlinux.org/">Arch Linux</a> machine,
but it should be the same on Ubuntu, Fedora, CentOS, Debian,
OpenBSD, FreeBSD, MacOSX, etc.
The only operating system that does not include these tools by default (or easily accessible) is Windows.</p>
<p>This tutorial makes heavy use of the terminal.
You have been warned.</p>
<p><em>Let us…begin!</em></p>
<h2 id="glossary">Glossary</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Binary-to-text_encoding#ASCII_armor"><strong>ASCII armour</strong></a> — A way to encode <strong>OpenPGP</strong> documents so they are readable by humans. These files end in .asc</li>
<li><strong>(Open)PGP</strong> — An open standard for encoding pulbic keys and encrypted documents.</li>
<li><strong>GPG</strong> — GNUPrivacyGaurd is an implementation of <strong>OpenPGP</strong>. It is installed by default on most Linux distrobutions.</li>
</ul>
<h2 id="step-0-setup">Step 0: Setup</h2>
<p>We will be using the utility <code class="highlighter-rouge">gpg</code> for this tutorial.</p>
<p>The other thing to note: The character $ (dollar sign) is usually not typed when shown in a command.
It simply indicates that you do not need administrative privilages to run these commands.</p>
<p>Test to see if you get this output in your terminal.</p>
<pre class="terminal">
$ gpg --version
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;
...
</pre>
<p>If this is not successful look into how to install these tools on your system.</p>
<h2 id="step-1-getcreate-a-public-key">Step 1: Get/Create A Public Key!</h2>
<h3 id="get-somebody-elses">Get Somebody Elses</h3>
<p>Step one is having somebody to send your encrypted message to. Maybe this is a friend, a journalist, or a whistleblower.</p>
<p>To encrypt a document with somebodys public key, you need to first obtain it.
My public key is available <a href="/public-key.asc">at this link</a>, and you can use it to send me encrypted stuff.</p>
<p>If you are on a linux terminal, you can use the <code class="highlighter-rouge">curl</code> or <code class="highlighter-rouge">wget</code> command to download it.</p>
<p>wget:</p>
<pre class="terminal">
$ wget https://tait.tech/public-key.asc
</pre>
<p>Curl:</p>
<pre class="terminal">
$ curl https://tait.tech/public-key.asc -o public-key.asc
</pre>
<h3 id="make-your-own-optional">Make Your Own (optional)</h3>
<p>The following section is quite long,
so if you dont want to create your own keypair,
then feel free to skip to <a href="#step-2-import-public-key">Step #2</a>.</p>
<p>If you want to encrypt your own documents,
or you want others to be able to send you encrypted messages,
then you can create your own public/private key pair.
You can use these to encrypt your documents,
and you can send our public key to others so that they can securely communicate with yourself.</p>
<p>Run the following command in your terminal, and follow the steps I outline to get you started.</p>
<pre class="terminal">
$ gpg --full-gen-key
</pre>
<p>This will produce the following dialog:</p>
<pre class="terminal">
gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection?
</pre>
<p>Select the option <code class="highlighter-rouge">1</code>. You want two keys, both RSA.</p>
<p>Next we will select the key size:</p>
<pre class="terminal">
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
</pre>
<p>Type the number 2048.</p>
<p>Next it will ask you how long you want the key to be valid.</p>
<pre class="terminal">
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
&lt;n&gt; = key expires in n days
&lt;n&gt;w = key expires in n weeks
&lt;n&gt;m = key expires in n months
&lt;n&gt;y = key expires in n years
Key is valid for? (0)
</pre>
<p>Type the number 1. This will enable you time to test it,
but it will make the key expire within 24 hours so that if you accidentally
share your private key, or delete your VM and no longer have access to it, you will be fine.</p>
<p>It will ask your if you are sure about the expiry date.</p>
<pre class="terminal">
Key expires at Tue Apr 7 02:24:23 2020 UTC
Is this correct? (y/N)
</pre>
<p>Type <code class="highlighter-rouge">y</code> to confirm your choice.</p>
<p>Now <code class="highlighter-rouge">gpg</code> is going to ask you to create a user id to indetify this key.
Use some test data for now.
User input is in bold, feel free to follow along or to put your own test data in.</p>
<p>Once you are more comfortable with the tools,
then you can create a public/private keypair that you will keep for some time.</p>
<pre class="terminal">
GnuPG needs to construct a user ID to identify your key.
Real name: <b>Mr. Tester</b>
Email address: <b>test@test.org</b>
Comment: <b>for testing only</b>
You selected this USER-ID:
"Mr. Tester (for testing only) &lt;test@test.org&gt;"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <b>O</b>
</pre>
<p>It will then ask you for a password.
If you are simply using this for test purposes,
then you can feel free to set it to something like “test”.
When create a long-term use pulbic key make sure to make the password <em>very</em> secure.</p>
<p>During the process of creating your key, <code class="highlighter-rouge">gpg</code> may warn you with this message:</p>
<pre class="terminal">
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
</pre>
<p>If this happens, feel free to smash your keyboard (lightly),
watch a YouTube video on the machine,
browse the web with <a href="http://w3m.sourceforge.net/">w3m</a>,
etc. until the key is generated.</p>
<p>You will know it is done when you see this message (or something similar):</p>
<pre class="terminal">
gpg: key EACCC490291EA7CE marked as ultimately trusted
gpg: revocation certificate stored as '/home/tait/.config/gnupg/openpgp-revocs.d/FFA7D7525C6546983F1152D8EACCC490291EA7CE.rev'
public and secret key created and signed.
pub rsa2048 2020-04-06 [SC] [expires: 2020-04-07]
FFA7D7525C6546983F1152D8EACCC490291EA7CE
uid Mr. Tester (for testing only) &lt;test@test.org&gt;
sub rsa2048 2020-04-06 [E] [expires: 2020-04-07]
</pre>
<p>Tada! You have your own public/private keypair!</p>
<p>Sharing a keypair that will expire soon is not a good idea,
however, if you are ready, then you can use this command to generate a public key file to share with others.</p>
<p>Feel free to substitute “Mr. Tester” for any other identifying part of your key.
Remember that to use the email, you must enclose it in &lt; and &gt;.</p>
<pre class="terminal">
$ gpg --export --armour "Mr. Tester" &gt; public-key.asc
</pre>
<p>To use the email as the identifier:</p>
<pre class="terminal">
$ gpg --export --armour "&lt;test@test.org&gt;" &gt; public-key.asc
</pre>
<h2 id="step-2-import-public-key">Step 2: Import Public Key</h2>
<p>This list of keys that <code class="highlighter-rouge">gpg</code> keeps on tap so to speak, is called our “keyring”.
Your will need to import a new public key to encrypt files with <code class="highlighter-rouge">gpg</code>.</p>
<p>If you already created your own public key, then this step is not necessary unless you want to also encrypt something for me :)</p>
<figure>
<img src="/assets/img/keyring.jpg" alt="A keyring holding eight allen keys." />
<figcaption>
A keyring holding eight allen keys.
</figcaption>
</figure>
<p>To import a public key to use for encrypting files, use the <code class="highlighter-rouge">--import</code> option of <code class="highlighter-rouge">gpg</code>. Like so:</p>
<pre class="terminal">
$ gpg --import public-key.asc
gpg: key 64FB4E386953BEAD: public key "Tait Hoyem &lt;tait.hoyem@protonmail.com&gt;" imported
gpg: Total number processed: 1
gpg: imported: 1
</pre>
<p>Now that we have imported a public key, we can make a message to send!</p>
<h2 id="step-3-have-a-message-to-encrypt">Step 3: Have A Message To Encrypt</h2>
<p>You can make a new file which holds some important, secret data.
Feel free to use a graphical editor if you have one, if not, <code class="highlighter-rouge">nano</code> works alright too.</p>
<pre class="terminal">
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
</pre>
<p>Save this file as something like <code class="highlighter-rouge">test-pgp.txt</code>, and well use that name later.</p>
<h2 id="step-4-encrypt-a-message">Step 4: Encrypt A Message</h2>
<p>Now that we have a message to send and person to send to,
all we have to do is encrypt this message and itll be on its merry way!
To do so, we must specify two new options to <code class="highlighter-rouge">gpg</code>.</p>
<p>The first is <code class="highlighter-rouge">--recipient</code>.
This tells <code class="highlighter-rouge">gpg</code> to encrypt using a certin public key that we have in our keyring.
You can use the persons name, email address, or the keys uid.</p>
<p>The second is <code class="highlighter-rouge">--encrypt</code>.</p>
<p>You will also specify the <code class="highlighter-rouge">--armour</code> option to use ASCII armoured files. Put this option after <code class="highlighter-rouge">--encrypt</code>, and put the file name after <code class="highlighter-rouge">--armour</code>. See below.</p>
<p>You can either use your own public key name to encrypt a document (allowng only you to decrypt it),
or you can use my public key that we imported earlier (allowing only me to decrypt it).
Either way works fine.</p>
<p>This is the big one!</p>
<pre class="terminal">
$ gpg --recipient "Tait Hoyem" --encrypt --armour test-gpg.txt
</pre>
<p>“But there is no output!” you might say!
Yes, that is because our new (encrypted) file has already been saved.
Lets look at it with cat.</p>
<pre class="terminal">
$ cat test-gpg.txt.asc
-----BEGIN PGP MESSAGE-----
hQIMA2mJuYb8vkIlAQ/9FDmXJgW2vI7p9sznKvHhQk7uTZvoWC3hCeqHoO3BSElP
XR1BNAkJ+bykB30M+9u+XDyRtTwazjvNPmYfQnIh0Q+BQZigDWbEd1R47jbzm7Tu
0eZKKapgEidfecULtaECX1sR3qPt1m9oZjyUR1rzNd8tezZlCu2pjdNZrkta2Bdm
Hh1xDS43Bw7PMQqraJsHwqr0M1GLDbMzPes2ZU5y4jEmXZ0PZdJ7kgjR8dvhLBfi
MU+4kYnnemQEztXBOjKidhyOntKiLjenvD00tVHrOuQoWuWCHGiqR24qSwVjeb9G
079gqH1VWi3fk2cwFA9f3TLvJqUwatyE0Hcba0U1d2Voz/C9JEQjT6FHuaCqQL6b
p7B7m2DwpywFGJpAn6ksrEYqHaLVWiEGmdMmHYuHxMw8+cqoSwbYymCZTwMBAuJe
Pr1VO9uNo+Vj5r8IX7ACcSsrjf0XkVzfX6ySsPbyOlGXnwzWSOM3Dk2Z9MqDORbj
0/7vJTnDctPuc91Rlp3YnJlZKWMcNfPMKMtvpljd2XuVwub+C4vGWXa9XLbRXmJo
cnEFT6SB11AKjytE2Urt62CCrYjJPBneabxbCztnBs+vQSx7Fj0LK6v4Euik/Xm/
9aKmZZW8306c9Zwgpp9glWjLMCDNxJRGdKRjZsnkt9hOEYsP1irTegystK6u4eHS
mwHX931ENOJsnPfQZCZ9b41Q9doZQ/N/WHstQO8MtA3HIN1sW3wYkGzOLKj4gJfm
bqR/TzQmXyLT1xZa+/yTscaV0P4OlI4vcii/k4DgeSeQVWp9o9DbZFxSCsdYVvPu
jaDMzZnIKoax1GFz/coUAHFQub2rLzaQ5DDbvrkX++UrAjuUtRcSFH0TKhahZmCF
nv117moLfK22Mst/
=bw8T
-----END PGP MESSAGE-----
</pre>
<h2 id="step-5-decryption-optional">Step 5: Decryption (optional)</h2>
<p>If you created your own public/private keypair in step 1,
and you encryped using <code class="highlighter-rouge">--recipient "Your Test Name"</code>,
then you can decrypt your document as well!</p>
<p>You will need to specify <code class="highlighter-rouge">--decrypt</code>, and thats all folks!</p>
<pre class="terminal">
$ gpg --decrypt test-gpg.txt.asc
</pre>
<p>A password dialog will then come up asking for your previously created password.
As long as you remember your password from before and enter it correctly: voila!</p>
<pre class="terminal">
gpg: encrypted with 4096-bit RSA key, ID 6989B986FCBE4225, created 2020-01-02
"Tait Hoyem &lt;tait.hoyem@protonmail.com&gt;"
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
</pre>
<h2 id="step-6-finale">Step 6: Finale!</h2>
<p>Ladies and gentleman, you have done it!
You have encrypted our very own document.
(And maybe even decrypted it yourself too :)</p>
<p>If you encrypted using my public key,
feel free to send it to <a href="mailto:tait@tait.tech">my email</a>.
I am happy to verify if it worked.</p>
<p>For more information on this subject, check out <a href="https://www.gnupg.org/gph/en/manual/c14.html">gnugp.orgs guide</a> on using GPG.
They are the ones that make these tools available,
and the <a href="https://www.gnu.org/">GNU Project</a> has been instrumental in creating the open-source world as it exists today.
Give em some love, eh!</p>
<p>Thank you so much for sticking through this whole thing!
Let me know if there is anything that doesnt make sense.
I am happy to improve this guide as time goes on if that is necessary.</p>
<p>Happy hacking :)</p>
</div>
<footer>
</footer>
</div>
</body>
</html>

@ -1,2 +1,23 @@
# tait.tech
The uncompiled version of my website. Compiled files in _site
### To compile
To compile the files, simply use the bundle Ruby gem.
```
bundle exec jekyll build
```
to compile once. If you decide you want to actually have changes appear instantly, use the following
```
bundle exec jekyll watch
```
To run a local web server to view the changes on:
```
bundle exec jekyll server -w
```
This will watch for the latest changes, compile them, and make them available on localhost:4000

@ -79,4 +79,10 @@ sup { margin: 0; padding: 0; }
figcaption { font-size: .8em; text-decoration: italic; }
footer { border-top: 1px solid #aaa; margin-bottom: 100px; }
.terminal { line-height: 1em; overflow: scroll; padding: 10px; color: #00FF41; margin: 0px; background-color: #151515; }
.small-image { width: 100%; }
/*# sourceMappingURL=style.css.map */

@ -7,8 +7,8 @@
],
"sourcesContent": [
"@import \"main\";\n",
"$normal-text-color: #444444;\n$nav-link-color: #333;\n$nav-link-hover-color: black;\n$link-color: #47a;\n$visited-link-color: #941452;\n\n$last-p-padd: 1.5em;\n$nav-padd: 1em;\n$line-under: 1px solid #aaa; \n\nbody {\n background-color: #fefefe;\n padding: 15px;\n margin: auto;\n max-width: 600px;\n font-family: -apple-system, helvetica, arial, sans-serif;\n}\n#wrapper {\n color: $normal-text-color;\n font-size: 14px;\n}\n#main-name {\n color: rgba(0, 0, 0, 0.8);\n}\nh1, h2, h3, h4, h5, h6 {\n}\nh1 {\n font-size: 2.5em;\n}\nh2 {\n font-size: 1.3em;\n}\nh4 {\n}\na {\n text-decoration: underline;\n color: $link-color;\n} \na:visited {\n color: $visited-link-color;\n}\na.nav-link,\na.post-title-link {\n color: $nav-link-color;\n text-decoration: none;\n}\na.citation-link {\n text-decoration: none;\n}\n\nlabel {\n font-size: .8em;\n}\n\n#menu,\nlabel[for=\"menu\"]{\n display: none;\n}\n\nnav {\n padding: $nav-padd 0px;\n margin: 0px;\n}\nnav a:first-of-type {\n margin-left: 0;\n}\nnav a {\n margin: 1em;\n color: $nav-link-color;\n font-weight: bold;\n font-style: none;\n}\nnav a.on-page {\n color: #888;\n}\nnav a:hover {\n text-decoration: underline; \n}\n\nli {\n margin: .5em;\n}\n\n#main-img {\n width: 100%;\n}\np {\n line-height: 1.5;\n padding: .1em 0;\n}\n.line-under {\n padding-bottom: $last-p-padd;\n border-bottom: $line-under;\n}\n.article a:hover {\n color: rgba(0, 0, 0, 0.5);\n}\n.post-date {\n text-transform: uppercase;\n font-weight: bold;\n color: rgba(0, 0, 0, 0.5);\n}\n\n.post-desc {\n color: rgba(0, 0, 0, .7);\n padding: 10px;\n font-weight: lighter;\n}\n\np.post-excerpt {\n margin-top: 0;\n padding-top: 10px;\n}\n\n\ntable,\ntable tr,\ntable td,\ntable th{\n border: 1px solid rgba(0, 0, 0, 0.5);\n border-collapse: collapse;\n padding: 5px;\n font-weight: normal;\n}\ntable th {\n font-weight: bold;\n}\ntable {\n width: 75%;\n margin: auto;\n}\n\ntable.post-list,\ntable.post-list tr,\ntable.post-list td {\n width: 100%;\n border: none;\n padding-left: 0;\n}\nimg {\n display: block;\n width: 55%;\n margin-left: auto;\n margin-right: auto;\n}\n\nblockquote {\n font-style: italic;\n}\n\n@media screen and (max-width: 600px){\n #menu,\n label[for=\"menu\"]{\n display: inline-block;\n font-size: 20px;\n }\n body {\n width: 90%;\n }\n #info {\n margin: 0 7px;\n }\n .menu-content {\n max-height: 0;\n overflow: hidden;\n }\n nav {\n width: 100%;\n }\n nav a {\n display: block;\n padding-left: 0;\n margin-left: 0;\n }\n input#menu{\n display: none;\n }\n input:checked ~ .menu-content {\n max-height: 100%;\n border-bottom: $line-under;\n color: red;\n }\n}\n\n.contact-info {\n width: 90%;\n margin: auto;\n word-wrap: break-word;\n}\n.contact-info p {\n margin: 7px;\n padding: 0;\n}\n\n.mono {\n font-family: monospace;\n}\n\n.bold {\n font-weight: bold;\n}\n\nsup {\n margin: 0;\n padding: 0;\n}\n\nfigcaption {\n font-size: .8em;\n text-decoration: italic;\n}\n"
"$normal-text-color: #444444;\n$nav-link-color: #333;\n$nav-link-hover-color: black;\n$link-color: #47a;\n$visited-link-color: #941452;\n\n$last-p-padd: 1.5em;\n$nav-padd: 1em;\n$line-under: 1px solid #aaa; \n\nbody {\n background-color: #fefefe;\n padding: 15px;\n margin: auto;\n max-width: 600px;\n font-family: -apple-system, helvetica, arial, sans-serif;\n}\n#wrapper {\n color: $normal-text-color;\n font-size: 14px;\n}\n#main-name {\n color: rgba(0, 0, 0, 0.8);\n}\nh1, h2, h3, h4, h5, h6 {\n}\nh1 {\n font-size: 2.5em;\n}\nh2 {\n font-size: 1.3em;\n}\nh4 {\n}\na {\n text-decoration: underline;\n color: $link-color;\n} \na:visited {\n color: $visited-link-color;\n}\na.nav-link,\na.post-title-link {\n color: $nav-link-color;\n text-decoration: none;\n}\na.citation-link {\n text-decoration: none;\n}\n\nlabel {\n font-size: .8em;\n}\n\n#menu,\nlabel[for=\"menu\"]{\n display: none;\n}\n\nnav {\n padding: $nav-padd 0px;\n margin: 0px;\n}\nnav a:first-of-type {\n margin-left: 0;\n}\nnav a {\n margin: 1em;\n color: $nav-link-color;\n font-weight: bold;\n font-style: none;\n}\nnav a.on-page {\n color: #888;\n}\nnav a:hover {\n text-decoration: underline; \n}\n\nli {\n margin: .5em;\n}\n\n#main-img {\n width: 100%;\n}\np {\n line-height: 1.5;\n padding: .1em 0;\n}\n.line-under {\n padding-bottom: $last-p-padd;\n border-bottom: $line-under;\n}\n.article a:hover {\n color: rgba(0, 0, 0, 0.5);\n}\n.post-date {\n text-transform: uppercase;\n font-weight: bold;\n color: rgba(0, 0, 0, 0.5);\n}\n\n.post-desc {\n color: rgba(0, 0, 0, .7);\n padding: 10px;\n font-weight: lighter;\n}\n\np.post-excerpt {\n margin-top: 0;\n padding-top: 10px;\n}\n\n\ntable,\ntable tr,\ntable td,\ntable th{\n border: 1px solid rgba(0, 0, 0, 0.5);\n border-collapse: collapse;\n padding: 5px;\n font-weight: normal;\n}\ntable th {\n font-weight: bold;\n}\ntable {\n width: 75%;\n margin: auto;\n}\n\ntable.post-list,\ntable.post-list tr,\ntable.post-list td {\n width: 100%;\n border: none;\n padding-left: 0;\n}\nimg {\n display: block;\n width: 55%;\n margin-left: auto;\n margin-right: auto;\n}\n\nblockquote {\n font-style: italic;\n}\n\n@media screen and (max-width: 600px){\n #menu,\n label[for=\"menu\"]{\n display: inline-block;\n font-size: 20px;\n }\n body {\n width: 90%;\n }\n #info {\n margin: 0 7px;\n }\n .menu-content {\n max-height: 0;\n overflow: hidden;\n }\n nav {\n width: 100%;\n }\n nav a {\n display: block;\n padding-left: 0;\n margin-left: 0;\n }\n input#menu{\n display: none;\n }\n input:checked ~ .menu-content {\n max-height: 100%;\n border-bottom: $line-under;\n color: red;\n }\n}\n\n.contact-info {\n width: 90%;\n margin: auto;\n word-wrap: break-word;\n}\n.contact-info p {\n margin: 7px;\n padding: 0;\n}\n\n.mono {\n font-family: monospace;\n}\n\n.bold {\n font-weight: bold;\n}\n\nsup {\n margin: 0;\n padding: 0;\n}\n\nfigcaption {\n font-size: .8em;\n text-decoration: italic;\n}\n\nfooter {\n border-top: $line-under; \n margin-bottom: 100px;\n}\n\n.terminal {\n line-height: 1em;\n overflow: scroll;\n padding: 10px; \n color: #00FF41;\n margin: 0px;\n background-color: #151515;\n}\n\n.small-image {\n width: 100%;\n}\n"
],
"names": [],
"mappings": "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"
"mappings": "ACUA,AAAA,IAAI,CAAC,EACH,gBAAgB,EAAE,OAAO,EACzB,OAAO,EAAE,IAAI,EACb,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,KAAK,EAChB,WAAW,EAAE,2CAA2C,GACzD;;AACD,AAAA,QAAQ,CAAC,EACP,KAAK,EAlBa,OAAO,EAmBzB,SAAS,EAAE,IAAI,GAChB;;AACD,AAAA,UAAU,CAAC,EACT,KAAK,EAAE,kBAAkB,GAC1B;;AAGD,AAAA,EAAE,CAAC,EACD,SAAS,EAAE,KAAK,GACjB;;AACD,AAAA,EAAE,CAAC,EACD,SAAS,EAAE,KAAK,GACjB;;AAGD,AAAA,CAAC,CAAC,EACA,eAAe,EAAE,SAAS,EAC1B,KAAK,EAjCM,IAAI,GAkChB;;AACD,AAAA,CAAC,AAAA,QAAQ,CAAC,EACR,KAAK,EAnCc,OAAO,GAoC3B;;AACD,AAAA,CAAC,AAAA,SAAS,EACV,CAAC,AAAA,gBAAgB,CAAC,EAChB,KAAK,EA1CU,IAAI,EA2CnB,eAAe,EAAE,IAAI,GACtB;;AACD,AAAA,CAAC,AAAA,cAAc,CAAC,EACd,eAAe,EAAE,IAAI,GACtB;;AAED,AAAA,KAAK,CAAC,EACJ,SAAS,EAAE,IAAI,GAChB;;AAED,AAAA,KAAK,EACL,KAAK,CAAA,AAAA,GAAC,CAAI,MAAM,AAAV,EAAW,EACf,OAAO,EAAE,IAAI,GACd;;AAED,AAAA,GAAG,CAAC,EACF,OAAO,EArDE,GAAG,CAqDO,GAAG,EACtB,MAAM,EAAE,GAAG,GACZ;;AACD,AAAA,GAAG,CAAC,CAAC,AAAA,cAAc,CAAC,EAClB,WAAW,EAAE,CAAC,GACf;;AACD,AAAA,GAAG,CAAC,CAAC,CAAC,EACJ,MAAM,EAAE,GAAG,EACX,KAAK,EAnEU,IAAI,EAoEnB,WAAW,EAAE,IAAI,EACjB,UAAU,EAAE,IAAI,GACjB;;AACD,AAAA,GAAG,CAAC,CAAC,AAAA,QAAQ,CAAC,EACZ,KAAK,EAAE,IAAI,GACZ;;AACD,AAAA,GAAG,CAAC,CAAC,AAAA,MAAM,CAAC,EACV,eAAe,EAAE,SAAS,GAC3B;;AAED,AAAA,EAAE,CAAC,EACD,MAAM,EAAE,IAAI,GACb;;AAED,AAAA,SAAS,CAAC,EACR,KAAK,EAAE,IAAI,GACZ;;AACD,AAAA,CAAC,CAAC,EACA,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,MAAM,GAChB;;AACD,AAAA,WAAW,CAAC,EACV,cAAc,EArFF,KAAK,EAsFjB,aAAa,EApFF,GAAG,CAAC,KAAK,CAAC,IAAI,GAqF1B;;AACD,AAAA,QAAQ,CAAC,CAAC,AAAA,MAAM,CAAC,EACf,KAAK,EAAE,kBAAkB,GAC1B;;AACD,AAAA,UAAU,CAAC,EACT,cAAc,EAAE,SAAS,EACzB,WAAW,EAAE,IAAI,EACjB,KAAK,EAAE,kBAAkB,GAC1B;;AAED,AAAA,UAAU,CAAC,EACT,KAAK,EAAE,kBAAiB,EACxB,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,OAAO,GACrB;;AAED,AAAA,CAAC,AAAA,aAAa,CAAC,EACb,UAAU,EAAE,CAAC,EACb,WAAW,EAAE,IAAI,GAClB;;AAGD,AAAA,KAAK,EACL,KAAK,CAAC,EAAE,EACR,KAAK,CAAC,EAAE,EACR,KAAK,CAAC,EAAE,CAAA,EACN,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,kBAAkB,EACpC,eAAe,EAAE,QAAQ,EACzB,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,GACpB;;AACD,AAAA,KAAK,CAAC,EAAE,CAAC,EACP,WAAW,EAAE,IAAI,GAClB;;AACD,AAAA,KAAK,CAAC,EACJ,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,IAAI,GACb;;AAED,AAAA,KAAK,AAAA,UAAU,EACf,KAAK,AAAA,UAAU,CAAC,EAAE,EAClB,KAAK,AAAA,UAAU,CAAC,EAAE,CAAC,EACjB,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,YAAY,EAAE,CAAC,GAChB;;AACD,AAAA,GAAG,CAAC,EACF,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,GAAG,EACV,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,IAAI,GACnB;;AAED,AAAA,UAAU,CAAC,EACT,UAAU,EAAE,MAAM,GACnB;;AAED,MAAM,CAAC,MAAM,MAAM,SAAS,EAAE,KAAK,IACjC,AAAA,KAAK,EACL,KAAK,CAAA,AAAA,GAAC,CAAI,MAAM,AAAV,EAAW,EACf,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,IAAI,GAChB;EACD,AAAA,IAAI,CAAC,EACH,KAAK,EAAE,GAAG,GACX;EACD,AAAA,KAAK,CAAC,EACJ,MAAM,EAAE,KAAK,GACd;EACD,AAAA,aAAa,CAAC,EACZ,UAAU,EAAE,CAAC,EACb,QAAQ,EAAE,MAAM,GACjB;EACD,AAAA,GAAG,CAAC,EACF,KAAK,EAAE,IAAI,GACZ;EACD,AAAA,GAAG,CAAC,CAAC,CAAC,EACJ,OAAO,EAAE,KAAK,EACd,YAAY,EAAE,CAAC,EACf,WAAW,EAAE,CAAC,GACf;EACD,AAAA,KAAK,AAAA,KAAK,CAAA,EACR,OAAO,EAAE,IAAI,GACd;EACD,AAAA,KAAK,AAAA,QAAQ,GAAG,aAAa,CAAC,EAC5B,UAAU,EAAE,IAAI,EAChB,aAAa,EA3KJ,GAAG,CAAC,KAAK,CAAC,IAAI,EA4KvB,KAAK,EAAE,GAAG,GACX;;AAGH,AAAA,aAAa,CAAC,EACZ,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,UAAU,GACtB;;AACD,AAAA,aAAa,CAAC,CAAC,CAAC,EACd,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,CAAC,GACX;;AAED,AAAA,KAAK,CAAC,EACJ,WAAW,EAAE,SAAS,GACvB;;AAED,AAAA,KAAK,CAAC,EACJ,WAAW,EAAE,IAAI,GAClB;;AAED,AAAA,GAAG,CAAC,EACF,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,CAAC,GACX;;AAED,AAAA,UAAU,CAAC,EACT,SAAS,EAAE,IAAI,EACf,eAAe,EAAE,MAAM,GACxB;;AAED,AAAA,MAAM,CAAC,EACL,UAAU,EA7MC,GAAG,CAAC,KAAK,CAAC,IAAI,EA8MzB,aAAa,EAAE,KAAK,GACrB;;AAED,AAAA,SAAS,CAAC,EACR,WAAW,EAAE,GAAG,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,IAAI,EACb,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,GAAG,EACX,gBAAgB,EAAE,OAAO,GAC1B;;AAED,AAAA,YAAY,CAAC,EACX,KAAK,EAAE,IAAI,GACZ"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0"
x="0.00000000" y="0.00000000" width="525.00000px" height="512.50000px"
id="svg2" sodipodi:version="0.32" inkscape:version="0.42.2"
sodipodi:docname="Public key encryption 06.svg" sodipodi:docbase="O:\Wikipedia\Public-key cryptography">
<metadata id="metadata55">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview inkscape:window-height="553"
inkscape:window-width="800" inkscape:pageshadow="2"
inkscape:pageopacity="0.0" borderopacity="1.0" bordercolor="#666666"
pagecolor="#ffffff" id="base" inkscape:zoom="0.75317073" inkscape:cx="262.50000"
inkscape:cy="256.25000" inkscape:window-x="-4" inkscape:window-y="-4"
inkscape:current-layer="svg2" />
<defs id="defs4">
<marker refX="0.00000000" refY="0.00000000" orient="auto"
style="overflow:visible" id="Arrow2Lend">
<path
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-1.100000,0.000000,0.000000,-1.100000,5.500000,0.000000)"
style="font-size:12.000000px;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
id="path7487" />
</marker>
<marker id="marker1456" style="overflow:visible" orient="auto"
refY="0.00000000" refX="0.00000000">
<path id="path1458"
style="font-size:12.000000px;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
transform="matrix(-1.100000,0.000000,0.000000,-1.100000,5.500000,0.000000)"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " />
</marker>
</defs>
<rect width="530.98798" height="518.74139" x="-1.8118663" y="-2.1716299"
style="opacity:1.0000000;fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect12797" />
<path d="M 349.94220,396.95514 L 311.46712,413.13812"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2937" />
<path d="M 353.86966,101.12095 L 311.24950,111.08631"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2935" />
<path d="M 236.12824,272.73302 L 237.37018,371.42135"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2917" />
<path d="M 236.12824,125.59671 L 237.37018,173.50784"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path12787" />
<path d="M 91.840230,114.96672 L 160.92992,115.39841"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path12783" />
<rect width="99.449097" height="79.464615" x="29.548828" y="75.450256"
style="opacity:1.0000000;fill:#00fbfe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999976;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect9051" />
<switch>
<text systemLanguage="zh" style="font-size:24px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text6642" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="108" id="tspan11289">鮑伯 </tspan>
<tspan x="50" y="138" id="tspan2167">你好!</tspan>
</text>
<text style="font-size:24px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text6642" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="108" id="tspan11289">Hello </tspan>
<tspan x="50" y="138" id="tspan2167">Bob!</tspan>
</text>
</switch>
<path
d="M 368.29004,364.25146 C 357.00240,364.25146 347.84129,376.85844 347.84129,392.38524 C 347.84129,407.91204 357.00240,420.50744 368.29004,420.50744 C 377.68345,420.50744 385.59183,411.77419 387.98569,399.89686 L 450.21289,399.89686 L 450.21289,410.74725 L 460.74363,410.74725 L 460.74363,418.99219 L 469.47455,418.99219 L 469.47455,410.74725 L 479.27770,410.74725 L 479.27770,399.89686 L 491.69758,399.89686 L 491.69758,386.31104 L 388.25375,386.31104 C 386.23190,373.70358 378.06032,364.25146 368.29004,364.25146 z M 363.17148,382.01040 C 366.86596,382.01040 369.87285,386.33783 369.87285,391.66654 C 369.87285,396.99525 366.86596,401.32268 363.17148,401.32268 C 359.47699,401.32268 356.48287,396.99525 356.48287,391.66654 C 356.48287,386.33782 359.47699,382.01040 363.17148,382.01040 z "
style="opacity:1.0000000;fill:#ff0000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.0000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="path1306" />
<switch>
<text systemLanguage="zh" x="333.31406" y="474.3338" style="font-size:24.000338px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text8995" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="460" id="tspan8997">鮑伯的</tspan>
<tspan x="360" y="490" id="tspan9043">私有密鑰</tspan>
</text>
<text x="333.31406" y="474.3338" style="font-size:24.000338px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text8995" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="460" id="tspan8997">Bob's</tspan>
<tspan x="360" y="490" id="tspan9043">Private Key</tspan>
</text>
</switch>
<rect width="112.12913" height="60.939266" x="180.68465" y="84.712936"
style="opacity:1.0000000;fill:#ffff91;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect10547" />
<switch>
<text systemLanguage="zh" x="210" y="125" style="font-size:24.000153px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text11291" xml:space="preserve" sodipodi:linespacing="125.00000%">加密</text>
<text x="190" y="125" style="font-size:24.000153px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text11291" xml:space="preserve" sodipodi:linespacing="125.00000%">Encrypt</text>
</switch>
<rect width="137.04561" height="79.464615" x="168.22641" y="193.16718"
style="opacity:1.0000000;fill:#20dddd;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect2159" />
<text x="180" y="208.4174"
style="font-size:24.000149px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma"
id="text2161" xml:space="preserve" sodipodi:linespacing="125.00000%"><tspan
x="175" y="225" id="tspan2163">6EB69570</tspan><tspan x="175" y="255" id="tspan2165">08E03CE4</tspan></text>
<path d="M 224.35180,421.31549 L 147.53475,420.91816"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2919" />
<rect width="96.798950" height="79.464615" x="30.873901" y="381.38452"
style="opacity:1.0000000;fill:#00fbfe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999976;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect2921" />
<switch>
<text systemLanguage="zh" style="font-size:24.000481px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2923" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="415" id="tspan2925">鮑伯</tspan>
<tspan x="50" y="445" id="tspan2927">你好!</tspan>
</text>
<text style="font-size:24.000481px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2923" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="415" id="tspan2925">Hello </tspan>
<tspan x="50" y="445" id="tspan2927">Bob!</tspan>
</text>
</switch>
<rect width="112.12913" height="60.939266" x="180.68465" y="390.64719"
style="opacity:1.0000000;fill:#ffff91;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect2929" />
<switch>
<text systemLanguage="zh" x="210" y="428" style="font-size:24.000477px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2931" xml:space="preserve" sodipodi:linespacing="125.00000%">解密</text>
<text x="190" y="428" style="font-size:24.000477px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2931" xml:space="preserve" sodipodi:linespacing="125.00000%">Decrypt</text>
</switch>
<path
d="M 368.29006,70.471520 C 357.00241,70.471520 347.84130,83.078500 347.84130,98.605300 C 347.84130,114.13210 357.00241,126.72750 368.29006,126.72750 C 377.68346,126.72750 385.59184,117.99425 387.98570,106.11692 L 450.21291,106.11692 L 450.21291,124.96731 L 460.74364,124.96731 L 460.74364,117.21225 L 469.47457,117.21225 L 469.47457,124.96731 L 479.27772,124.96731 L 479.27772,106.11692 L 491.69759,106.11692 L 491.69759,92.531100 L 388.25376,92.531100 C 386.23191,79.923640 378.06033,70.471520 368.29006,70.471520 z M 363.17149,88.230460 C 366.86597,88.230460 369.87286,92.557890 369.87286,97.886600 C 369.87286,103.21531 366.86597,107.54274 363.17149,107.54274 C 359.47701,107.54274 356.48288,103.21531 356.48288,97.886600 C 356.48288,92.557880 359.47701,88.230460 363.17149,88.230460 z "
style="opacity:1.0000000;fill:#00ff00;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.0000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="path5914" />
<switch>
<text systemLanguage="zh" x="333.31406" y="169.18408" style="font-size:24.000067px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text9045" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="165" id="tspan9047">鮑伯的</tspan>
<tspan x="360" y="195" id="tspan9049">公開金鑰</tspan>
</text>
<text x="333.31406" y="169.18408" style="font-size:24.000067px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text9045" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="165" id="tspan9047">Bob's</tspan>
<tspan x="360" y="195" id="tspan9049">Public Key</tspan>
</text>
</switch>
<switch>
<text systemLanguage="zh" x="32" y="44" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan1356">愛麗斯</text>
<text x="32" y="44" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan1356">Alice</text>
</switch>
<path d="M 23.707951,306.44560 L 498.73449,306.44560"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.0000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path1378" />
<switch>
<text systemLanguage="zh" x="32" y="340" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan2137">鮑伯</text>
<text x="32" y="340" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan2137">Bob</text>
</switch>
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path13515" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-3.040663e-4,0.536912,-0.316064,-1.599964e-4,336.0039,341.7284)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path5890" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-0.496084,0.205365,-0.120910,-0.292022,376.0725,492.9744)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path5892" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(0.536905,-2.831340e-3,1.685723e-3,0.316060,130.9598,16.20191)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path3014" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-0.536905,-2.831340e-3,-1.685723e-3,0.316060,177.0222,322.1088)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path3016" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-3.040663e-4,0.536912,-0.316064,-1.599964e-4,336.0039,144.1345)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path3018" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-0.522749,0.122507,-7.213487e-2,-0.307722,363.3824,200.5708)" />
</svg>

After

Width:  |  Height:  |  Size: 21 KiB

@ -0,0 +1,12 @@
--2020-04-02 20:52:24-- https://www.google.com/url?sa=i
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving www.google.com (www.google.com)... 172.217.3.196, 2607:f8b0:400a:809::2004
Connecting to www.google.com (www.google.com)|172.217.3.196|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'url?sa=i'
url?sa=i [<=> ] 0 --.-KB/s url?sa=i [ <=> ] 1.38K --.-KB/s in 0s
2020-04-02 20:52:24 (10.1 MB/s) - 'url?sa=i' saved [1414]

@ -26,6 +26,26 @@
<table class="post-list">
<tr>
<td>
<h2 class="post-title"><a class="post-title-link" href="/2020/04/06/rsa4.html">How To Encrypt Your Own Documents Using gpg</a></h2>
<span class="post-date">06 April 2020</span>
<div class="post-excerpt"><p>If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you!
It should be noted that in some circles the tools used are more common than in others.
These are the everyday tools of many privacy advocates and computer nerds.</p>
</div>
</td>
</tr>
<tr>
<td>
<h2 class="post-title"><a class="post-title-link" href="/2020/04/02/rsa3.html">How Asymetric Encryption Works</a></h2>
<span class="post-date">02 April 2020</span>
<div class="post-excerpt"><p>In a few previous articles I have explained <a href="/2020/01/26/rsa1.html">why encryption may be important to you</a> and <a href="/2020/02/19/rsa2.html">how the theory behind encryption works</a>. I did not yet explain the system of asymetric cryptography, however. That is what this article is for.</p>
</div>
</td>
</tr>
<tr>
<td>
<h2 class="post-title"><a class="post-title-link" href="/2020/02/19/rsa2.html">How Does Encryption Work, in Theory?</a></h2>

@ -1,4 +1,484 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.0.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2020-03-10T22:25:54+00:00</updated><id>/feed.xml</id><entry><title type="html">How Does Encryption Work, in Theory?</title><link href="/2020/02/19/rsa2.html" rel="alternate" type="text/html" title="How Does Encryption Work, in Theory?" /><published>2020-02-19T00:00:00+00:00</published><updated>2020-02-19T00:00:00+00:00</updated><id>/2020/02/19/rsa2</id><content type="html" xml:base="/2020/02/19/rsa2.html">&lt;p&gt;There are many kinds of encryption used in our everyday communication. Online and offline, over the internet and in person. In this article, I will explain the basics of how encryption should work in theory. I explain in &lt;a href=&quot;/2020/01/26/rsa1.html&quot;&gt;this article&lt;/a&gt; why encryption is important, and why &lt;em&gt;you&lt;/em&gt; should care about it.&lt;/p&gt;
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.0.0">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2020-04-06T03:53:39+00:00</updated><id>http://localhost:4000/feed.xml</id><entry><title type="html">How To Encrypt Your Own Documents Using gpg</title><link href="http://localhost:4000/2020/04/06/rsa4.html" rel="alternate" type="text/html" title="How To Encrypt Your Own Documents Using gpg" /><published>2020-04-06T00:00:00+00:00</published><updated>2020-04-06T00:00:00+00:00</updated><id>http://localhost:4000/2020/04/06/rsa4</id><content type="html" xml:base="http://localhost:4000/2020/04/06/rsa4.html">&lt;p&gt;If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you!
It should be noted that in some circles the tools used are more common than in others.
These are the everyday tools of many privacy advocates and computer nerds.&lt;/p&gt;
&lt;p&gt;If you have never used Linux however, then the method of doing this will be rather unfamiliar.
This tutorial will be done on an &lt;a href=&quot;https://archlinux.org/&quot;&gt;Arch Linux&lt;/a&gt; machine,
but it should be the same on Ubuntu, Fedora, CentOS, Debian,
OpenBSD, FreeBSD, MacOSX, etc.
The only operating system that does not include these tools by default (or easily accessible) is Windows.&lt;/p&gt;
&lt;p&gt;This tutorial makes heavy use of the terminal.
You have been warned.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Let us…begin!&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;glossary&quot;&gt;Glossary&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Binary-to-text_encoding#ASCII_armor&quot;&gt;&lt;strong&gt;ASCII armour&lt;/strong&gt;&lt;/a&gt; — A way to encode &lt;strong&gt;OpenPGP&lt;/strong&gt; documents so they are readable by humans. These files end in .asc&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(Open)PGP&lt;/strong&gt; — An open standard for encoding pulbic keys and encrypted documents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPG&lt;/strong&gt; — GNUPrivacyGaurd is an implementation of &lt;strong&gt;OpenPGP&lt;/strong&gt;. It is installed by default on most Linux distrobutions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;step-0-setup&quot;&gt;Step 0: Setup&lt;/h2&gt;
&lt;p&gt;We will be using the utility &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt; for this tutorial.&lt;/p&gt;
&lt;p&gt;The other thing to note: The character $ (dollar sign) is usually not typed when shown in a command.
It simply indicates that you do not need administrative privilages to run these commands.&lt;/p&gt;
&lt;p&gt;Test to see if you get this output in your terminal.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --version
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &amp;lt;https://gnu.org/licenses/gpl.html&amp;gt;
...
&lt;/pre&gt;
&lt;p&gt;If this is not successful look into how to install these tools on your system.&lt;/p&gt;
&lt;h2 id=&quot;step-1-getcreate-a-public-key&quot;&gt;Step 1: Get/Create A Public Key!&lt;/h2&gt;
&lt;h3 id=&quot;get-somebody-elses&quot;&gt;Get Somebody Elses&lt;/h3&gt;
&lt;p&gt;Step one is having somebody to send your encrypted message to. Maybe this is a friend, a journalist, or a whistleblower.&lt;/p&gt;
&lt;p&gt;To encrypt a document with somebodys public key, you need to first obtain it.
My public key is available &lt;a href=&quot;/public-key.asc&quot;&gt;at this link&lt;/a&gt;, and you can use it to send me encrypted stuff.&lt;/p&gt;
&lt;p&gt;If you are on a linux terminal, you can use the &lt;code class=&quot;highlighter-rouge&quot;&gt;curl&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;wget&lt;/code&gt; command to download it.&lt;/p&gt;
&lt;p&gt;wget:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ wget https://tait.tech/public-key.asc
&lt;/pre&gt;
&lt;p&gt;Curl:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ curl https://tait.tech/public-key.asc -o public-key.asc
&lt;/pre&gt;
&lt;h3 id=&quot;make-your-own-optional&quot;&gt;Make Your Own (optional)&lt;/h3&gt;
&lt;p&gt;The following section is quite long,
so if you dont want to create your own keypair,
then feel free to skip to &lt;a href=&quot;#step-2-import-public-key&quot;&gt;Step #2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to encrypt your own documents,
or you want others to be able to send you encrypted messages,
then you can create your own public/private key pair.
You can use these to encrypt your documents,
and you can send our public key to others so that they can securely communicate with yourself.&lt;/p&gt;
&lt;p&gt;Run the following command in your terminal, and follow the steps I outline to get you started.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --full-gen-key
&lt;/pre&gt;
&lt;p&gt;This will produce the following dialog:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection?
&lt;/pre&gt;
&lt;p&gt;Select the option &lt;code class=&quot;highlighter-rouge&quot;&gt;1&lt;/code&gt;. You want two keys, both RSA.&lt;/p&gt;
&lt;p&gt;Next we will select the key size:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
&lt;/pre&gt;
&lt;p&gt;Type the number 2048.&lt;/p&gt;
&lt;p&gt;Next it will ask you how long you want the key to be valid.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
&amp;lt;n&amp;gt; = key expires in n days
&amp;lt;n&amp;gt;w = key expires in n weeks
&amp;lt;n&amp;gt;m = key expires in n months
&amp;lt;n&amp;gt;y = key expires in n years
Key is valid for? (0)
&lt;/pre&gt;
&lt;p&gt;Type the number 1. This will enable you time to test it,
but it will make the key expire within 24 hours so that if you accidentally
share your private key, or delete your VM and no longer have access to it, you will be fine.&lt;/p&gt;
&lt;p&gt;It will ask your if you are sure about the expiry date.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
Key expires at Tue Apr 7 02:24:23 2020 UTC
Is this correct? (y/N)
&lt;/pre&gt;
&lt;p&gt;Type &lt;code class=&quot;highlighter-rouge&quot;&gt;y&lt;/code&gt; to confirm your choice.&lt;/p&gt;
&lt;p&gt;Now &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt; is going to ask you to create a user id to indetify this key.
Use some test data for now.
User input is in bold, feel free to follow along or to put your own test data in.&lt;/p&gt;
&lt;p&gt;Once you are more comfortable with the tools,
then you can create a public/private keypair that you will keep for some time.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
GnuPG needs to construct a user ID to identify your key.
Real name: &lt;b&gt;Mr. Tester&lt;/b&gt;
Email address: &lt;b&gt;test@test.org&lt;/b&gt;
Comment: &lt;b&gt;for testing only&lt;/b&gt;
You selected this USER-ID:
&quot;Mr. Tester (for testing only) &amp;lt;test@test.org&amp;gt;&quot;
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? &lt;b&gt;O&lt;/b&gt;
&lt;/pre&gt;
&lt;p&gt;It will then ask you for a password.
If you are simply using this for test purposes,
then you can feel free to set it to something like “test”.
When create a long-term use pulbic key make sure to make the password &lt;em&gt;very&lt;/em&gt; secure.&lt;/p&gt;
&lt;p&gt;During the process of creating your key, &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt; may warn you with this message:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
&lt;/pre&gt;
&lt;p&gt;If this happens, feel free to smash your keyboard (lightly),
watch a YouTube video on the machine,
browse the web with &lt;a href=&quot;http://w3m.sourceforge.net/&quot;&gt;w3m&lt;/a&gt;,
etc. until the key is generated.&lt;/p&gt;
&lt;p&gt;You will know it is done when you see this message (or something similar):&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
gpg: key EACCC490291EA7CE marked as ultimately trusted
gpg: revocation certificate stored as '/home/tait/.config/gnupg/openpgp-revocs.d/FFA7D7525C6546983F1152D8EACCC490291EA7CE.rev'
public and secret key created and signed.
pub rsa2048 2020-04-06 [SC] [expires: 2020-04-07]
FFA7D7525C6546983F1152D8EACCC490291EA7CE
uid Mr. Tester (for testing only) &amp;lt;test@test.org&amp;gt;
sub rsa2048 2020-04-06 [E] [expires: 2020-04-07]
&lt;/pre&gt;
&lt;p&gt;Tada! You have your own public/private keypair!&lt;/p&gt;
&lt;p&gt;Sharing a keypair that will expire soon is not a good idea,
however, if you are ready, then you can use this command to generate a public key file to share with others.&lt;/p&gt;
&lt;p&gt;Feel free to substitute “Mr. Tester” for any other identifying part of your key.
Remember that to use the email, you must enclose it in &amp;lt; and &amp;gt;.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --export --armour &quot;Mr. Tester&quot; &amp;gt; public-key.asc
&lt;/pre&gt;
&lt;p&gt;To use the email as the identifier:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --export --armour &quot;&amp;lt;test@test.org&amp;gt;&quot; &amp;gt; public-key.asc
&lt;/pre&gt;
&lt;h2 id=&quot;step-2-import-public-key&quot;&gt;Step 2: Import Public Key&lt;/h2&gt;
&lt;p&gt;This list of keys that &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt; keeps on tap so to speak, is called our “keyring”.
Your will need to import a new public key to encrypt files with &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you already created your own public key, then this step is not necessary unless you want to also encrypt something for me :)&lt;/p&gt;
&lt;figure&gt;
&lt;img src=&quot;/assets/img/keyring.jpg&quot; alt=&quot;A keyring holding eight allen keys.&quot; /&gt;
&lt;figcaption&gt;
A keyring holding eight allen keys.
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;To import a public key to use for encrypting files, use the &lt;code class=&quot;highlighter-rouge&quot;&gt;--import&lt;/code&gt; option of &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt;. Like so:&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --import public-key.asc
gpg: key 64FB4E386953BEAD: public key &quot;Tait Hoyem &amp;lt;tait.hoyem@protonmail.com&amp;gt;&quot; imported
gpg: Total number processed: 1
gpg: imported: 1
&lt;/pre&gt;
&lt;p&gt;Now that we have imported a public key, we can make a message to send!&lt;/p&gt;
&lt;h2 id=&quot;step-3-have-a-message-to-encrypt&quot;&gt;Step 3: Have A Message To Encrypt&lt;/h2&gt;
&lt;p&gt;You can make a new file which holds some important, secret data.
Feel free to use a graphical editor if you have one, if not, &lt;code class=&quot;highlighter-rouge&quot;&gt;nano&lt;/code&gt; works alright too.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
&lt;/pre&gt;
&lt;p&gt;Save this file as something like &lt;code class=&quot;highlighter-rouge&quot;&gt;test-pgp.txt&lt;/code&gt;, and well use that name later.&lt;/p&gt;
&lt;h2 id=&quot;step-4-encrypt-a-message&quot;&gt;Step 4: Encrypt A Message&lt;/h2&gt;
&lt;p&gt;Now that we have a message to send and person to send to,
all we have to do is encrypt this message and itll be on its merry way!
To do so, we must specify two new options to &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first is &lt;code class=&quot;highlighter-rouge&quot;&gt;--recipient&lt;/code&gt;.
This tells &lt;code class=&quot;highlighter-rouge&quot;&gt;gpg&lt;/code&gt; to encrypt using a certin public key that we have in our keyring.
You can use the persons name, email address, or the keys uid.&lt;/p&gt;
&lt;p&gt;The second is &lt;code class=&quot;highlighter-rouge&quot;&gt;--encrypt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You will also specify the &lt;code class=&quot;highlighter-rouge&quot;&gt;--armour&lt;/code&gt; option to use ASCII armoured files. Put this option after &lt;code class=&quot;highlighter-rouge&quot;&gt;--encrypt&lt;/code&gt;, and put the file name after &lt;code class=&quot;highlighter-rouge&quot;&gt;--armour&lt;/code&gt;. See below.&lt;/p&gt;
&lt;p&gt;You can either use your own public key name to encrypt a document (allowng only you to decrypt it),
or you can use my public key that we imported earlier (allowing only me to decrypt it).
Either way works fine.&lt;/p&gt;
&lt;p&gt;This is the big one!&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --recipient &quot;Tait Hoyem&quot; --encrypt --armour test-gpg.txt
&lt;/pre&gt;
&lt;p&gt;“But there is no output!” you might say!
Yes, that is because our new (encrypted) file has already been saved.
Lets look at it with cat.&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ cat test-gpg.txt.asc
-----BEGIN PGP MESSAGE-----
hQIMA2mJuYb8vkIlAQ/9FDmXJgW2vI7p9sznKvHhQk7uTZvoWC3hCeqHoO3BSElP
XR1BNAkJ+bykB30M+9u+XDyRtTwazjvNPmYfQnIh0Q+BQZigDWbEd1R47jbzm7Tu
0eZKKapgEidfecULtaECX1sR3qPt1m9oZjyUR1rzNd8tezZlCu2pjdNZrkta2Bdm
Hh1xDS43Bw7PMQqraJsHwqr0M1GLDbMzPes2ZU5y4jEmXZ0PZdJ7kgjR8dvhLBfi
MU+4kYnnemQEztXBOjKidhyOntKiLjenvD00tVHrOuQoWuWCHGiqR24qSwVjeb9G
079gqH1VWi3fk2cwFA9f3TLvJqUwatyE0Hcba0U1d2Voz/C9JEQjT6FHuaCqQL6b
p7B7m2DwpywFGJpAn6ksrEYqHaLVWiEGmdMmHYuHxMw8+cqoSwbYymCZTwMBAuJe
Pr1VO9uNo+Vj5r8IX7ACcSsrjf0XkVzfX6ySsPbyOlGXnwzWSOM3Dk2Z9MqDORbj
0/7vJTnDctPuc91Rlp3YnJlZKWMcNfPMKMtvpljd2XuVwub+C4vGWXa9XLbRXmJo
cnEFT6SB11AKjytE2Urt62CCrYjJPBneabxbCztnBs+vQSx7Fj0LK6v4Euik/Xm/
9aKmZZW8306c9Zwgpp9glWjLMCDNxJRGdKRjZsnkt9hOEYsP1irTegystK6u4eHS
mwHX931ENOJsnPfQZCZ9b41Q9doZQ/N/WHstQO8MtA3HIN1sW3wYkGzOLKj4gJfm
bqR/TzQmXyLT1xZa+/yTscaV0P4OlI4vcii/k4DgeSeQVWp9o9DbZFxSCsdYVvPu
jaDMzZnIKoax1GFz/coUAHFQub2rLzaQ5DDbvrkX++UrAjuUtRcSFH0TKhahZmCF
nv117moLfK22Mst/
=bw8T
-----END PGP MESSAGE-----
&lt;/pre&gt;
&lt;h2 id=&quot;step-5-decryption-optional&quot;&gt;Step 5: Decryption (optional)&lt;/h2&gt;
&lt;p&gt;If you created your own public/private keypair in step 1,
and you encryped using &lt;code class=&quot;highlighter-rouge&quot;&gt;--recipient &quot;Your Test Name&quot;&lt;/code&gt;,
then you can decrypt your document as well!&lt;/p&gt;
&lt;p&gt;You will need to specify &lt;code class=&quot;highlighter-rouge&quot;&gt;--decrypt&lt;/code&gt;, and thats all folks!&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
$ gpg --decrypt test-gpg.txt.asc
&lt;/pre&gt;
&lt;p&gt;A password dialog will then come up asking for your previously created password.
As long as you remember your password from before and enter it correctly: voila!&lt;/p&gt;
&lt;pre class=&quot;terminal&quot;&gt;
gpg: encrypted with 4096-bit RSA key, ID 6989B986FCBE4225, created 2020-01-02
&quot;Tait Hoyem &amp;lt;tait.hoyem@protonmail.com&amp;gt;&quot;
Rules Of A Good Life:
1. Wash your hands!
2. Work hard!
3. Be firm.
5. Have good friends!
&lt;/pre&gt;
&lt;h2 id=&quot;step-6-finale&quot;&gt;Step 6: Finale!&lt;/h2&gt;
&lt;p&gt;Ladies and gentleman, you have done it!
You have encrypted our very own document.
(And maybe even decrypted it yourself too :)&lt;/p&gt;
&lt;p&gt;If you encrypted using my public key,
feel free to send it to &lt;a href=&quot;mailto:tait@tait.tech&quot;&gt;my email&lt;/a&gt;.
I am happy to verify if it worked.&lt;/p&gt;
&lt;p&gt;For more information on this subject, check out &lt;a href=&quot;https://www.gnupg.org/gph/en/manual/c14.html&quot;&gt;gnugp.orgs guide&lt;/a&gt; on using GPG.
They are the ones that make these tools available,
and the &lt;a href=&quot;https://www.gnu.org/&quot;&gt;GNU Project&lt;/a&gt; has been instrumental in creating the open-source world as it exists today.
Give em some love, eh!&lt;/p&gt;
&lt;p&gt;Thank you so much for sticking through this whole thing!
Let me know if there is anything that doesnt make sense.
I am happy to improve this guide as time goes on if that is necessary.&lt;/p&gt;
&lt;p&gt;Happy hacking :)&lt;/p&gt;</content><author><name>tait</name></author><summary type="html">If you have ever wanted to garuntee the utmost security of your emails and documents, then this is the guide for you! It should be noted that in some circles the tools used are more common than in others. These are the everyday tools of many privacy advocates and computer nerds.</summary></entry><entry><title type="html">How Asymetric Encryption Works</title><link href="http://localhost:4000/2020/04/02/rsa3.html" rel="alternate" type="text/html" title="How Asymetric Encryption Works" /><published>2020-04-02T00:00:00+00:00</published><updated>2020-04-02T00:00:00+00:00</updated><id>http://localhost:4000/2020/04/02/rsa3</id><content type="html" xml:base="http://localhost:4000/2020/04/02/rsa3.html">&lt;p&gt;In a few previous articles I have explained &lt;a href=&quot;/2020/01/26/rsa1.html&quot;&gt;why encryption may be important to you&lt;/a&gt; and &lt;a href=&quot;/2020/02/19/rsa2.html&quot;&gt;how the theory behind encryption works&lt;/a&gt;. I did not yet explain the system of asymetric cryptography, however. That is what this article is for.&lt;/p&gt;
&lt;p&gt;Previously, we talked about how &lt;em&gt;symetric&lt;/em&gt; encryption works. This is by having a shared key that both parties use to simultaniously encrypt, and decrypt the data. (See Ceasar Cipher for example).&lt;/p&gt;
&lt;h2 id=&quot;public-key-or-asymetric-encryption&quot;&gt;Public-key, or Asymetric Encryption&lt;/h2&gt;
&lt;p&gt;Asymetric encryption is based on the idea of having multiple keys instead of only one shared key.
For example: instead of encrypting with one key, and decrypting with that same key (like our ROT ciphers we talked about previously), we can use one key to &lt;em&gt;encrypt&lt;/em&gt; the information, and a different key to &lt;em&gt;decrypt&lt;/em&gt; the information.&lt;/p&gt;
&lt;figure&gt;
&lt;img src=&quot;/assets/img/alice-to-bob.png&quot; alt=&quot;Alice sending her message to Bob using Bob's public key. Bob decrypts the message with his private key.&quot; /&gt;
&lt;figcaption&gt;
Alice sending her message to Bob using Bob's public key. Bob decrypts the message with his private key.
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;In the picture above, see how Alice uses Bobs public key to encrypt some data,
then sends it to Bob for him to decrypt with his private key?
That is the essense of public-key encryption.&lt;/p&gt;
&lt;p&gt;The great thing about public-key encryption is that your public key is &lt;em&gt;public&lt;/em&gt;! There is no need to be afraid of sending this everywhere!
You can attach it at the end of all your emails, the end of your forum posts, &lt;a href=&quot;/public-key.asc&quot;&gt;a link to it on your low-power webserver&lt;/a&gt; (wink).
There are even things called &lt;a href=&quot;http://keys.gnupg.net/&quot;&gt;keyservers&lt;/a&gt; that will save your public key on them for retrival in case somebody wants to verify your public key.&lt;/p&gt;
&lt;p&gt;Anything encrypted with your public key can only be decrypted with your private key.
Provided you never, &lt;em&gt;NEVER&lt;/em&gt; share your private key with anyone ever, we can assume that all messages sent to you encrypted with your public key will never be read by anyone else.&lt;/p&gt;
&lt;p&gt;Asymetric encryption, however, often contains four keys instead of two. Why is this?&lt;/p&gt;
&lt;h4 id=&quot;verification-of-author&quot;&gt;Verification of Author&lt;/h4&gt;
&lt;p&gt;One interesting thing about keys pairs is that not only can the private key decrypt anything the public key encrypts,
but the public key can decrypt anything the private key encrypts.&lt;/p&gt;
&lt;p&gt;Now why would one want to encrypt a message that can be decrypted by anyone?&lt;/p&gt;
&lt;figure&gt;
&lt;img src=&quot;/assets/img/alice-sign-to-bob.png&quot; alt=&quot;Alice sending a message to bob which is 'signed' with her private key. This allows Bob to know only Alice could have sent it!&quot; /&gt;
&lt;figcaption&gt;
Alice sending a message to bob which is 'signed' with her private key. This allows Bob to know only Alice could have sent it!
&lt;br /&gt;
&lt;br /&gt;
Note: Although the picture shows otherwise, the text is not sent in the plain. It is encrypted with Alice's private key.
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This is how you can verify that the person who says they wrote the message really did indeed write the message!
If their private key was never shared with anyone else, then the message must have come from them!&lt;/p&gt;
&lt;p&gt;For maximum security, these methods are often layered.
First, signing with the senders private key,
ensuring only they could have sent it—
then encrypted with the recipients pulbic key,
making sure only the reciever can read it.&lt;/p&gt;
&lt;p&gt;Note that both sides must first have eachothers public keys to do this.
This is easy if they communicate often, but when first contacting somebody,
people will generally send their encrypted message along with the their own pulbic key attached in a seperate file.&lt;/p&gt;
&lt;h3 id=&quot;what-this-means&quot;&gt;What This Means&lt;/h3&gt;
&lt;p&gt;Notice neither Alice nor Bob had to share any comprimsing information over the network?
This is why public-key encryption is so powerful!&lt;/p&gt;
&lt;p&gt;Alice and Bob can both safely send their public keys in the open.
They can even send them over the insecure HTTP, or FTP protocols.&lt;/p&gt;
&lt;p&gt;Whilst not sending any encryption-breaking messages,
Alice and Bob now have a way to communicate securely.
If you trust nothing and no one, this is your perfered method of security.&lt;/p&gt;
&lt;p&gt;Check out this &lt;a href=&quot;https://www.youtube.com/watch?v=GSIDS_lvRv4&quot;&gt;Computerphile video&lt;/a&gt; if you want the simplified explaination.&lt;/p&gt;
&lt;h3 id=&quot;the-algorithms&quot;&gt;The Algorithms&lt;/h3&gt;
&lt;p&gt;The two biggest “implementations” of public-key cryptography vary only in the mathamatical equations used to generate the numbers,
and how the numbers are &lt;a href=&quot;https://en.wikipedia.org/wiki/Trapdoor_function&quot;&gt;“trapdoored”&lt;/a&gt; to decrypt if you have the correct key.&lt;/p&gt;
&lt;p&gt;I will discuss the differences in approach here.
If you want to skip to the next article where I show you how to encrypt your own documents using RSA, see &lt;a href=&quot;/2020/04/06/rsa4.html&quot;&gt;this link&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;rsa&quot;&gt;RSA&lt;/h3&gt;
&lt;p&gt;The mathamatic center of the RSA system was developed over the course of a year or so.
Three men were involved. Ron Rivest, Adi Shamir, and Leonard Aldeman.
They worked as a kind of “team”: Each idea by Rivest and Shamir were critisized by the mathamatician on their team: Mr. Aldeman.&lt;/p&gt;
&lt;p&gt;One night, after consuming
&lt;a href=&quot;https://www.math.uchicago.edu/~may/VIGRE/VIGRE2007/REUPapers/FINALAPP/Calderbank.pdf&quot;&gt;“liberal quantities of Manischewitz wine”&lt;/a&gt;
Rivest had trouble sleeping.
After taking long gazes into the abyss of his math textbook, he came up with an idea which would change cryptography forever.
By the next morning, an academic mathamatical paper was nearly finished.
He named it after himself and the two others that had been helping him along this whole time. &lt;em&gt;Rivest, Shamir, Aldeman&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Key sizes of RSA range from 1024-bit to 4096-bit.
1024-bit keys are considered somewhat insecure.
However,
it should be noted that every bit doubles the complexity of the key,
so 2048 is &lt;a href=&quot;https://www.wolframalpha.com/input/?i=2%5E1024&quot;&gt;2^1024&lt;/a&gt; times more complex than 1024.&lt;/p&gt;
&lt;h3 id=&quot;eliptic-curve-ec&quot;&gt;Eliptic-Curve (EC)&lt;/h3&gt;
&lt;p&gt;Eliptic-Curve (EC) is a family of algorithms that use the &lt;a href=&quot;https://en.wikipedia.org/wiki/Elliptic_curve&quot;&gt;Eliptic curve&lt;/a&gt; mathamatical structure to generate the numbers for the keys.
EC can effectivly provide the security of an RSA key &lt;a href=&quot;https://www.youtube.com/watch?v=NF1pwjL9-DE&quot;&gt;one order of magnitude larger&lt;/a&gt; than an RSA key.&lt;/p&gt;
&lt;figure&gt;
&lt;img src=&quot;/assets/img/ec.png&quot; alt=&quot;A picture of an eliptic curve.&quot; class=&quot;small-image&quot; /&gt;
&lt;figcaption&gt;
An eliptic curve structure.
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Its fast; its secure! Perfect right?&lt;/p&gt;
&lt;p&gt;Of course not!&lt;/p&gt;
&lt;p&gt;One problem is that due to the smaller key size,
it can more easily be broken by brute-force.
This is why EC is mostly used for temporary communication (like HTTPS), not permenant communication (like having an encrypted email conversation with a journalist).&lt;/p&gt;
&lt;p&gt;The other problem is that a certain EC algrorithm called P-256 is suspected to be introduced with malice to National Institute of Standards and Technology (NIST)
&lt;a href=&quot;https://www.schneier.com/essays/archives/2007/11/did_nsa_put_a_secret.html&quot;&gt;by the NSA&lt;/a&gt;.
Supposedly, the NSA is able to crack anything encrypted with this algorithm.
I will let the experts argure about that.&lt;/p&gt;
&lt;p&gt;Other well-known EC algorithms that are more-or-less trusted as secure do exist though.
The premeire one being Curve25519.
The reference implementation of &lt;a href=&quot;https://cr.yp.to/ecdh.html&quot;&gt;this algrorithm&lt;/a&gt; is also &lt;a href=&quot;https://fairuse.stanford.edu/overview/public-domain/welcome/&quot;&gt;public-domain&lt;/a&gt;,
so it is easy for devlopers to work into their own applications without worrying about copywrite.&lt;/p&gt;
&lt;h2 id=&quot;conslusion&quot;&gt;Conslusion&lt;/h2&gt;
&lt;p&gt;In this article we went over some basic points:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Public-key encryption enables secure communication over insecure networks.&lt;/li&gt;
&lt;li&gt;RSA is considered the standard for extra-seure communication.&lt;/li&gt;
&lt;li&gt;EC is a newer, faster, more transient encryption method.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To learn how to use RSA keys to encrypt your own communications, check out &lt;a href=&quot;/2020/04/06/rsa4.html&quot;&gt;this other aritcle I wrote&lt;/a&gt;.&lt;/p&gt;</content><author><name>tait</name></author><summary type="html">In a few previous articles I have explained why encryption may be important to you and how the theory behind encryption works. I did not yet explain the system of asymetric cryptography, however. That is what this article is for.</summary></entry><entry><title type="html">How Does Encryption Work, in Theory?</title><link href="http://localhost:4000/2020/02/19/rsa2.html" rel="alternate" type="text/html" title="How Does Encryption Work, in Theory?" /><published>2020-02-19T00:00:00+00:00</published><updated>2020-02-19T00:00:00+00:00</updated><id>http://localhost:4000/2020/02/19/rsa2</id><content type="html" xml:base="http://localhost:4000/2020/02/19/rsa2.html">&lt;p&gt;There are many kinds of encryption used in our everyday communication. Online and offline, over the internet and in person. In this article, I will explain the basics of how encryption should work in theory. I explain in &lt;a href=&quot;/2020/01/26/rsa1.html&quot;&gt;this article&lt;/a&gt; why encryption is important, and why &lt;em&gt;you&lt;/em&gt; should care about it.&lt;/p&gt;
&lt;p&gt;We will start by looking at in-person, offline encryption.&lt;/p&gt;
@ -139,7 +619,7 @@ I will discuss this more in another article, but for the technically inclined:&l
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/RSA_(cryptosystem)&quot;&gt;RSA&lt;/a&gt;/&lt;a href=&quot;https://en.wikipedia.org/wiki/Elliptic-curve_cryptography&quot;&gt;EC&lt;/a&gt; provides &lt;em&gt;very&lt;/em&gt; large cryptographic keys. It would be impossible for a human to encrypt or decrypt a message manually.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=GSIDS_lvRv4&quot;&gt;Asymetric cryptography&lt;/a&gt; provides four keys, instead of just one; stopping evesdroppers from listening in on your secret conversations—even if you do not have the chance to exchange keys in advance.&lt;/li&gt;
&lt;/ol&gt;</content><author><name>tait</name></author><summary type="html">There are many kinds of encryption used in our everyday communication. Online and offline, over the internet and in person. In this article, I will explain the basics of how encryption should work in theory. I explain in this article why encryption is important, and why you should care about it.</summary></entry><entry><title type="html">Is Encryption Worth It?</title><link href="/2020/01/26/rsa1.html" rel="alternate" type="text/html" title="Is Encryption Worth It?" /><published>2020-01-26T00:00:00+00:00</published><updated>2020-01-26T00:00:00+00:00</updated><id>/2020/01/26/rsa1</id><content type="html" xml:base="/2020/01/26/rsa1.html">&lt;p&gt;What is the most embarassing thing you have typed into Google search? What is the most personal secret you told a friend in confidence? What is your bank password? What is your businesss secret to stay ahead of the competition?&lt;/p&gt;
&lt;/ol&gt;</content><author><name>tait</name></author><summary type="html">There are many kinds of encryption used in our everyday communication. Online and offline, over the internet and in person. In this article, I will explain the basics of how encryption should work in theory. I explain in this article why encryption is important, and why you should care about it.</summary></entry><entry><title type="html">Is Encryption Worth It?</title><link href="http://localhost:4000/2020/01/26/rsa1.html" rel="alternate" type="text/html" title="Is Encryption Worth It?" /><published>2020-01-26T00:00:00+00:00</published><updated>2020-01-26T00:00:00+00:00</updated><id>http://localhost:4000/2020/01/26/rsa1</id><content type="html" xml:base="http://localhost:4000/2020/01/26/rsa1.html">&lt;p&gt;What is the most embarassing thing you have typed into Google search? What is the most personal secret you told a friend in confidence? What is your bank password? What is your businesss secret to stay ahead of the competition?&lt;/p&gt;
&lt;p&gt;Now at first these questions may seem not completely related. There is a point though: You likely sent all of this information over the internet.&lt;/p&gt;
@ -188,7 +668,7 @@ Japan lags slightly behind with 80 percent encrypted traffic.&lt;/p&gt;
&lt;h3 id=&quot;what-about-rsa&quot;&gt;What about RSA?&lt;/h3&gt;
&lt;p&gt;RSA is an encryption method named after the initials of the inventors sir names: Ron &lt;strong&gt;R&lt;/strong&gt;ivest, Adi &lt;strong&gt;S&lt;/strong&gt;hamir, and Leonard &lt;strong&gt;A&lt;/strong&gt;dleman. It uses the mathematical “factoring problem” to secure communication. The details of this specific type of encryption will be discussed in an article soon to come.&lt;/p&gt;</content><author><name>tait</name></author><summary type="html">What is the most embarassing thing you have typed into Google search? What is the most personal secret you told a friend in confidence? What is your bank password? What is your businesss secret to stay ahead of the competition?</summary></entry><entry><title type="html">Padding And Margin</title><link href="/2020/01/22/padding-and-margin.html" rel="alternate" type="text/html" title="Padding And Margin" /><published>2020-01-22T00:00:00+00:00</published><updated>2020-01-22T00:00:00+00:00</updated><id>/2020/01/22/padding-and-margin</id><content type="html" xml:base="/2020/01/22/padding-and-margin.html">&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;RSA is an encryption method named after the initials of the inventors sir names: Ron &lt;strong&gt;R&lt;/strong&gt;ivest, Adi &lt;strong&gt;S&lt;/strong&gt;hamir, and Leonard &lt;strong&gt;A&lt;/strong&gt;dleman. It uses the mathematical “factoring problem” to secure communication. The details of this specific type of encryption will be discussed in an article soon to come.&lt;/p&gt;</content><author><name>tait</name></author><summary type="html">What is the most embarassing thing you have typed into Google search? What is the most personal secret you told a friend in confidence? What is your bank password? What is your businesss secret to stay ahead of the competition?</summary></entry><entry><title type="html">Padding And Margin</title><link href="http://localhost:4000/2020/01/22/padding-and-margin.html" rel="alternate" type="text/html" title="Padding And Margin" /><published>2020-01-22T00:00:00+00:00</published><updated>2020-01-22T00:00:00+00:00</updated><id>http://localhost:4000/2020/01/22/padding-and-margin</id><content type="html" xml:base="http://localhost:4000/2020/01/22/padding-and-margin.html">&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Here is an image from the World Wide Web Consortium (W3C) who sets the standards for the web.&lt;/p&gt;

@ -1 +1 @@
Sitemap: /sitemap.xml
Sitemap: http://localhost:4000/sitemap.xml

@ -1,30 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>/2020/01/22/padding-and-margin.html</loc>
<loc>http://localhost:4000/2020/01/22/padding-and-margin.html</loc>
<lastmod>2020-01-22T00:00:00+00:00</lastmod>
</url>
<url>
<loc>/2020/01/26/rsa1.html</loc>
<loc>http://localhost:4000/2020/01/26/rsa1.html</loc>
<lastmod>2020-01-26T00:00:00+00:00</lastmod>
</url>
<url>
<loc>/2020/02/19/rsa2.html</loc>
<loc>http://localhost:4000/2020/02/19/rsa2.html</loc>
<lastmod>2020-02-19T00:00:00+00:00</lastmod>
</url>
<url>
<loc>/2020-01-23-sql-joins.html</loc>
<loc>http://localhost:4000/2020/04/02/rsa3.html</loc>
<lastmod>2020-04-02T00:00:00+00:00</lastmod>
</url>
<url>
<loc>/podcast/</loc>
<loc>http://localhost:4000/2020/04/06/rsa4.html</loc>
<lastmod>2020-04-06T00:00:00+00:00</lastmod>
</url>
<url>
<loc>/blog/</loc>
<loc>http://localhost:4000/2020-01-23-sql-joins.html</loc>
</url>
<url>
<loc>/links/</loc>
<loc>http://localhost:4000/podcast/</loc>
</url>
<url>
<loc>/</loc>
<loc>http://localhost:4000/blog/</loc>
</url>
<url>
<loc>http://localhost:4000/links/</loc>
</url>
<url>
<loc>http://localhost:4000/</loc>
</url>
</urlset>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0"
x="0.00000000" y="0.00000000" width="525.00000px" height="512.50000px"
id="svg2" sodipodi:version="0.32" inkscape:version="0.42.2"
sodipodi:docname="Public key encryption 06.svg" sodipodi:docbase="O:\Wikipedia\Public-key cryptography">
<metadata id="metadata55">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview inkscape:window-height="553"
inkscape:window-width="800" inkscape:pageshadow="2"
inkscape:pageopacity="0.0" borderopacity="1.0" bordercolor="#666666"
pagecolor="#ffffff" id="base" inkscape:zoom="0.75317073" inkscape:cx="262.50000"
inkscape:cy="256.25000" inkscape:window-x="-4" inkscape:window-y="-4"
inkscape:current-layer="svg2" />
<defs id="defs4">
<marker refX="0.00000000" refY="0.00000000" orient="auto"
style="overflow:visible" id="Arrow2Lend">
<path
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-1.100000,0.000000,0.000000,-1.100000,5.500000,0.000000)"
style="font-size:12.000000px;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
id="path7487" />
</marker>
<marker id="marker1456" style="overflow:visible" orient="auto"
refY="0.00000000" refX="0.00000000">
<path id="path1458"
style="font-size:12.000000px;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
transform="matrix(-1.100000,0.000000,0.000000,-1.100000,5.500000,0.000000)"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " />
</marker>
</defs>
<rect width="530.98798" height="518.74139" x="-1.8118663" y="-2.1716299"
style="opacity:1.0000000;fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect12797" />
<path d="M 349.94220,396.95514 L 311.46712,413.13812"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2937" />
<path d="M 353.86966,101.12095 L 311.24950,111.08631"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2935" />
<path d="M 236.12824,272.73302 L 237.37018,371.42135"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2917" />
<path d="M 236.12824,125.59671 L 237.37018,173.50784"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path12787" />
<path d="M 91.840230,114.96672 L 160.92992,115.39841"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path12783" />
<rect width="99.449097" height="79.464615" x="29.548828" y="75.450256"
style="opacity:1.0000000;fill:#00fbfe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999976;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect9051" />
<switch>
<text systemLanguage="zh" style="font-size:24px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text6642" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="108" id="tspan11289">鮑伯 </tspan>
<tspan x="50" y="138" id="tspan2167">你好!</tspan>
</text>
<text style="font-size:24px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text6642" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="108" id="tspan11289">Hello </tspan>
<tspan x="50" y="138" id="tspan2167">Bob!</tspan>
</text>
</switch>
<path
d="M 368.29004,364.25146 C 357.00240,364.25146 347.84129,376.85844 347.84129,392.38524 C 347.84129,407.91204 357.00240,420.50744 368.29004,420.50744 C 377.68345,420.50744 385.59183,411.77419 387.98569,399.89686 L 450.21289,399.89686 L 450.21289,410.74725 L 460.74363,410.74725 L 460.74363,418.99219 L 469.47455,418.99219 L 469.47455,410.74725 L 479.27770,410.74725 L 479.27770,399.89686 L 491.69758,399.89686 L 491.69758,386.31104 L 388.25375,386.31104 C 386.23190,373.70358 378.06032,364.25146 368.29004,364.25146 z M 363.17148,382.01040 C 366.86596,382.01040 369.87285,386.33783 369.87285,391.66654 C 369.87285,396.99525 366.86596,401.32268 363.17148,401.32268 C 359.47699,401.32268 356.48287,396.99525 356.48287,391.66654 C 356.48287,386.33782 359.47699,382.01040 363.17148,382.01040 z "
style="opacity:1.0000000;fill:#ff0000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.0000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="path1306" />
<switch>
<text systemLanguage="zh" x="333.31406" y="474.3338" style="font-size:24.000338px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text8995" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="460" id="tspan8997">鮑伯的</tspan>
<tspan x="360" y="490" id="tspan9043">私有密鑰</tspan>
</text>
<text x="333.31406" y="474.3338" style="font-size:24.000338px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text8995" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="460" id="tspan8997">Bob's</tspan>
<tspan x="360" y="490" id="tspan9043">Private Key</tspan>
</text>
</switch>
<rect width="112.12913" height="60.939266" x="180.68465" y="84.712936"
style="opacity:1.0000000;fill:#ffff91;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect10547" />
<switch>
<text systemLanguage="zh" x="210" y="125" style="font-size:24.000153px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text11291" xml:space="preserve" sodipodi:linespacing="125.00000%">加密</text>
<text x="190" y="125" style="font-size:24.000153px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text11291" xml:space="preserve" sodipodi:linespacing="125.00000%">Encrypt</text>
</switch>
<rect width="137.04561" height="79.464615" x="168.22641" y="193.16718"
style="opacity:1.0000000;fill:#20dddd;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect2159" />
<text x="180" y="208.4174"
style="font-size:24.000149px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma"
id="text2161" xml:space="preserve" sodipodi:linespacing="125.00000%"><tspan
x="175" y="225" id="tspan2163">6EB69570</tspan><tspan x="175" y="255" id="tspan2165">08E03CE4</tspan></text>
<path d="M 224.35180,421.31549 L 147.53475,420.91816"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2919" />
<rect width="96.798950" height="79.464615" x="30.873901" y="381.38452"
style="opacity:1.0000000;fill:#00fbfe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999976;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect2921" />
<switch>
<text systemLanguage="zh" style="font-size:24.000481px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2923" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="415" id="tspan2925">鮑伯</tspan>
<tspan x="50" y="445" id="tspan2927">你好!</tspan>
</text>
<text style="font-size:24.000481px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2923" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="50" y="415" id="tspan2925">Hello </tspan>
<tspan x="50" y="445" id="tspan2927">Bob!</tspan>
</text>
</switch>
<rect width="112.12913" height="60.939266" x="180.68465" y="390.64719"
style="opacity:1.0000000;fill:#ffff91;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="rect2929" />
<switch>
<text systemLanguage="zh" x="210" y="428" style="font-size:24.000477px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2931" xml:space="preserve" sodipodi:linespacing="125.00000%">解密</text>
<text x="190" y="428" style="font-size:24.000477px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text2931" xml:space="preserve" sodipodi:linespacing="125.00000%">Decrypt</text>
</switch>
<path
d="M 368.29006,70.471520 C 357.00241,70.471520 347.84130,83.078500 347.84130,98.605300 C 347.84130,114.13210 357.00241,126.72750 368.29006,126.72750 C 377.68346,126.72750 385.59184,117.99425 387.98570,106.11692 L 450.21291,106.11692 L 450.21291,124.96731 L 460.74364,124.96731 L 460.74364,117.21225 L 469.47457,117.21225 L 469.47457,124.96731 L 479.27772,124.96731 L 479.27772,106.11692 L 491.69759,106.11692 L 491.69759,92.531100 L 388.25376,92.531100 C 386.23191,79.923640 378.06033,70.471520 368.29006,70.471520 z M 363.17149,88.230460 C 366.86597,88.230460 369.87286,92.557890 369.87286,97.886600 C 369.87286,103.21531 366.86597,107.54274 363.17149,107.54274 C 359.47701,107.54274 356.48288,103.21531 356.48288,97.886600 C 356.48288,92.557880 359.47701,88.230460 363.17149,88.230460 z "
style="opacity:1.0000000;fill:#00ff00;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.0000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:10.000000;stroke-opacity:1.0000000"
id="path5914" />
<switch>
<text systemLanguage="zh" x="333.31406" y="169.18408" style="font-size:24.000067px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text9045" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="165" id="tspan9047">鮑伯的</tspan>
<tspan x="360" y="195" id="tspan9049">公開金鑰</tspan>
</text>
<text x="333.31406" y="169.18408" style="font-size:24.000067px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Tahoma" id="text9045" xml:space="preserve" sodipodi:linespacing="125.00000%">
<tspan x="360" y="165" id="tspan9047">Bob's</tspan>
<tspan x="360" y="195" id="tspan9049">Public Key</tspan>
</text>
</switch>
<switch>
<text systemLanguage="zh" x="32" y="44" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan1356">愛麗斯</text>
<text x="32" y="44" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan1356">Alice</text>
</switch>
<path d="M 23.707951,306.44560 L 498.73449,306.44560"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.0000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path1378" />
<switch>
<text systemLanguage="zh" x="32" y="340" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan2137">鮑伯</text>
<text x="32" y="340" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;font-family:Tahoma"
id="tspan2137">Bob</text>
</switch>
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path13515" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-3.040663e-4,0.536912,-0.316064,-1.599964e-4,336.0039,341.7284)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path5890" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-0.496084,0.205365,-0.120910,-0.292022,376.0725,492.9744)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path5892" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(0.536905,-2.831340e-3,1.685723e-3,0.316060,130.9598,16.20191)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path3014" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-0.536905,-2.831340e-3,-1.685723e-3,0.316060,177.0222,322.1088)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path3016" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-3.040663e-4,0.536912,-0.316064,-1.599964e-4,336.0039,144.1345)" />
<path sodipodi:type="star"
style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.2825398;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000;display:inline"
id="path3018" sodipodi:sides="3" sodipodi:cx="58.031090" sodipodi:cy="313.98965"
sodipodi:r1="24.870466" sodipodi:r2="12.435234" sodipodi:arg1="0.00000000"
sodipodi:arg2="1.0471976" inkscape:flatsided="false" inkscape:rounded="0.00000000"
inkscape:randomized="0.00000000"
d="M 82.901556,313.98965 L 64.248706,324.75888 L 45.595857,335.52811 L 45.595856,313.98965 L 45.595857,292.45120 L 64.248707,303.22043 L 82.901556,313.98965 z "
transform="matrix(-0.522749,0.122507,-7.213487e-2,-0.307722,363.3824,200.5708)" />
</svg>

After

Width:  |  Height:  |  Size: 21 KiB

@ -0,0 +1,12 @@
--2020-04-02 20:52:24-- https://www.google.com/url?sa=i
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving www.google.com (www.google.com)... 172.217.3.196, 2607:f8b0:400a:809::2004
Connecting to www.google.com (www.google.com)|172.217.3.196|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'url?sa=i'
url?sa=i [<=> ] 0 --.-KB/s url?sa=i [ <=> ] 1.38K --.-KB/s in 0s
2020-04-02 20:52:24 (10.1 MB/s) - 'url?sa=i' saved [1414]
Loading…
Cancel
Save