Backup, Cryptography and GnuPG: A Practical Security Reference

Classified in Computers

Written on in English with a size of 2.85 KB

Backup

Important directories: /etc, /home, /var, /usr, /local

Package and compress with tar. Files: home.tar

# tar -cvf home.tar /home

Compression:

# gzip -r /home/* (recursive compression)

Decompression:

# gunzip -r /home/* (recursive decompression)

Cryptography

In cryptography, digital signatures are a digital information authentication method, known as signature.

The art of cryptanalysis is the study of attempts to break ciphertext.

Key + algorithm + message = ciphertext

CID + Authentication + Irretrievability

Encryption: C = Ek(M). Decryption: M = Dk(C)

Steganography: secret communication by hiding the existence of the message.

Steganalysis: detection of steganographic content.

Examples of cryptographic protocols: SSL, SSH, IPSec, WEP, WPA

Symmetric algorithms: DES, AES, IDEA

Asymmetric algorithms: RSA, DH, DSS

Protection and Security

Protection relies on complex temporal and economic factors.

Brute force: a method to overcome a cryptographic system by testing keys across a large number of possible combinations.

Common failures: reuse of random parameters, and failure to destroy plaintext after encryption.

Caesar cipher: c = (m + k) mod n

GnuPG

List existing keys in the keyring:

# gpg --list-keys

Generating a key pair:

# gpg --gen-key

Exporting a public key:

# gpg --export <email> > <user>.pubkey

Importing a public key:

# gpg --import <file_with_key>

Removing keys from the keyring:
# gpg --delete-keys removes a public key
# gpg --delete-secret-keys removes a private key

Changing the passphrase:

# gpg --edit-key (then use the password command)

Sending a key to a keyserver:

# gpg --keyserver subkeys.pgp.net --send-key

Encrypting a file:

# gpg -e -r Jorge <file>

Decrypting a file:

# gpg -d <file.gpg>

Signing a file with clearsign:

# gpg --clearsign <file_name>

Verifying a signature:

# gpg --verify <file.gpg>

Public Key Infrastructure

A public key infrastructure is a set of entities, policies, and technical standards designed to support cryptographic systems such as digital certificates.

OpenSSL provides a set of implementation tools.

Related entries: