From aad8f5208d92e70044b6f1d31d07485fc23de8f4 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 1 May 2022 00:01:20 -0400 Subject: [PATCH] Move cryptography to linux --- homepage/knowledge/cryptography.html | 65 ---------------------- homepage/knowledge/linux.html | 83 +++++++++++++++++++++------- 2 files changed, 63 insertions(+), 85 deletions(-) delete mode 100644 homepage/knowledge/cryptography.html diff --git a/homepage/knowledge/cryptography.html b/homepage/knowledge/cryptography.html deleted file mode 100644 index 1e35964..0000000 --- a/homepage/knowledge/cryptography.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - -knowledge/cryptography - - -

~ Return to the rest of the site

- - - -

cryptography

-

updated 2021-11-09

-
-

-This information is not authoritative, nor from a place of deep knowledge. -

-

LUKS partitioning

-

Sources

- -

-To format a partition for LUKS, use lsblk to determine the physical block device location for that partition and run cryptsetup luksFormat [partition]. -The passphrase used can be changed or removed after creation. -

-

-To open a LUKS partition, use cryptsetup luksOpen [partition] [name]. -This name is the name the decrypted block device location will take in /dev/mapper/. -Before the decrypted block device has a filesystem it'll just be cleared space - use mkfs.[filesystem] /dev/mapper/[name]. -

-

-To mount an opened LUKS partition, use mount(8) as normal, just with the decrypted block device location. -

-

-To close an open LUKS partition, umount(8) it if it's open and cryptsetup luksClose [name]. -

-

-To make the LUKS partition openable via keyfile, first make a keyfile (dd if=/dev/urandom of=/root/keyfile bs=1024 count=4 seems to work), and optionally make it readable by root only (chmod 0400 [keyfile]). -Then add the keyfile to the partition's LUKS header with cryptsetup luksAddKey [physical partition block device] [keyfile]. -

-

SSH keys

-

Sources

- -

SSH keys are typically stored in $HOME/.ssh.

-

Typically, the public key's filename will be suffixed with .pub, while the private key will not.

-

You can generate an SSH key with ssh-keygen(1). Currently the preferred implementation is openssh-keygen, part of the OpenSSH suite.

-

-Microsoft GitHub documentation suggests a user create a key with ssh-keygen -t ed25519 -C "[e-mail address]". -This generates an Ed25519 SSH key with an e-mail address in the key comment. -

- - diff --git a/homepage/knowledge/linux.html b/homepage/knowledge/linux.html index b5bf662..d6ffe36 100644 --- a/homepage/knowledge/linux.html +++ b/homepage/knowledge/linux.html @@ -76,6 +76,8 @@ Debian is a Linux software distribution known for its stability and longevity. Debian uses SystemD as its initialization system, the GNU core utilities, and dpkg and apt for package management.

+

Fonts

+

fstab

See fstab(5).

postmarketOS requires that the localmount OpenRC service be enabled for the system to read fstab(5). @@ -91,25 +93,6 @@ Complex Makefiles may not be useable in both. It's custom for Linux systems to have make(1) as GNU Make and bmake(1) as BSD Make, and BSD-based systems to have make(1) as BSD Make and gmake(1) as GNU Make.

-

Mount LUKS encrypted partitions at boot

- -

See cryptography#LUKS partitioning for how to make a LUKS partition.

-

-e2fsprogs is needed for the dm_mod kernel module used for LUKS partition decryption. -

-

-On most OpenRC-initialized distributions, the cryptsetup-openrc package provides a dmcrypt service for OpenRC. -Make sure that service is added to runlevel boot. -

-

-Configure /etc/conf.d/dmcrypt, and accordingly fstab. -dmcrypt will need the UUID of the physical block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper. -

-

On-line manual

In the context of POSIX and UNIX-like systems, an "on-line" manual is a manual that is accessible via the computer system it documents. @@ -124,7 +107,7 @@ Alpine by default uses mandoc. less(1) is more(1); more or less.

-

Partitions and filesystems

+

Partitions and filesystems