Skip to content

Commit 5993725

Browse files
committed
bak
1 parent 1b44e27 commit 5993725

File tree

3 files changed

+43
-3
lines changed

3 files changed

+43
-3
lines changed

cryptography.bigb

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,37 @@ The downside is that that you have to type your password every time you want to
3737

3838
The other main type of encryption is <public-key cryptography>.
3939

40-
The advantage of <public-key cryptography> is that it allows you to send secret messages to other people even if the attacker is able to capture the encrypted messages. This is for example what you want to do when sending a personal message to a special friend.
40+
The advantage of <public-key cryptography> is that it allows you to send secret messages to other people even an the attacker is able to capture the encrypted messages. This is for example what you want to do when sending a personal message to a friend over the <Internet>. Such <encryption> is especially crucial when using <wireless communication> such as <Wi-Fi>, where anyone nearby can capture the signals you send and receive, and would be able to read all your data if it weren't encrypted.
4141

42-
This is not possible with <symmetric encryption> because for your friend to decrypt the message in that system, you'd need to send them the password, which the attacker would also be able to eavesdrop and then decrypt the message.
42+
Easily sending encrypted messages over the <Internet> is not possible with <symmetric encryption> because for your friend to decrypt the message in that system, you'd need to send them the password, which the attacker would also be able to eavesdrop and then decrypt the message that follows using it. The problem of sharing a password with another person online is called <key exchange>.
43+
44+
<Advanced Encryption Standard> (AES) is one of the most popular families of <symmetric encryption> algorithms.
45+
46+
<OpenSSL> is a popular <open source> implementation of <symmetric and public-key cryptography>. A simple example of using <OpenSSL> for <symmetric encryption> from the <command-line> is:
47+
``
48+
echo 'Hello World!' > message.txt
49+
openssl aes-256-cbc -a -salt -pbkdf2 -in message.txt -out message.txt.enc
50+
``
51+
This asks for a password, which we set as `asdfqwer`, and then produces a file `message.txt.enc` containing garbled text such that:
52+
``
53+
hd message.txt.enc
54+
``
55+
contains:
56+
``
57+
00000000 55 32 46 73 64 47 56 6b 58 31 38 58 48 65 2f 30 |U2FsdGVkX18XHe/0|
58+
00000010 70 56 42 2b 70 45 6c 55 59 38 2b 54 38 7a 4e 34 |pVB+pElUY8+T8zN4|
59+
00000020 4e 37 6d 52 2f 73 6d 4d 62 64 30 3d 0a |N7mR/smMbd0=.|
60+
0000002d
61+
``
62+
Then to decrypt:
63+
``
64+
openssl aes-256-cbc -d -a -pbkdf2 -in message.txt.enc -out message.new.txt
65+
``
66+
once again asks for your password and given the correct password produces a file `message.new.txt` containing the original message:
67+
``
68+
Hello World!
69+
``
70+
This was tested on <Ubuntu 24.04>, OpenSSL 3.0.13. See also: https://stackoverflow.com/questions/16056135/how-to-use-openssl-to-encrypt-decrypt-files[How to use OpenSSL to encrypt/decrypt files? on Stack Overflow].
4371

4472
= Provably secure symmetric-key algorithm
4573
{parent=Symmetric encryption}
@@ -218,6 +246,15 @@ https://crypto.stackexchange.com/questions/29906/how-does-diffie-hellman-differ-
218246
= Encrypted
219247
{synonym}
220248

249+
= Encryption software
250+
{parent=Encryption}
251+
{wiki}
252+
253+
= OpenSSL
254+
{c}
255+
{parent=Encryption software}
256+
{wiki}
257+
221258
= Steganography
222259
{parent=Encryption}
223260
{wiki}

ourbigbook.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"htmlXExtension": false,
3535
"xPrefix": "https://ourbigbook.com/cirosantilli/"
3636
},
37-
"unsafe-xss": true,
37+
"unsafeXss": true,
3838
"web": {
3939
"linkFromStaticHeaderMetaToWeb": true,
4040
"username": "cirosantilli"

telecommunication.bigb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ Uses <telephone> lines, and therefore were still usable much much after the <Int
237237
{tag=Light}
238238
{wiki}
239239

240+
= Wireless communication
241+
{synonym}
242+
240243
= Radio
241244
{parent=Wireless}
242245
{wiki}

0 commit comments

Comments
 (0)