Consists of a full backup (assuming 5 disks, labeled A through E).
5 disks (A-E) → 16 days.
2^(n-1), where n is the number of disks.
|
Session
Backup level
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
|
1 (Incremental)
|
|
A
|
|
A
|
|
A
|
|
A
|
|
A
|
|
A
|
|
A
|
|
A
|
|
2 (Differential)
|
|
|
B
|
|
|
|
B
|
|
|
|
B
|
|
|
|
B
|
|
|
3 (Differential)
|
|
|
|
|
C
|
|
|
|
|
|
|
|
C
|
|
|
|
|
4 (Differential)
|
|
|
|
|
|
|
|
|
D
|
|
|
|
|
|
|
|
|
5 (Full)
|
E
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Benefit:
Performing the backup as well as the restore is much simpler, and even cheaper than GFS.
Disadvantages:
Requires high-capacity storage media and, in automated environments, specialized software for this methodology.
Incremental backup
Files modified since the last full or differential backup are copied.

Removable and remote storage media
One of the most common mistakes is using the same media where original data resides to store backups, or placing backups in the same physical site as the backed-up equipment.
The purpose of a backup is to recover data in case of disaster. If the backup resides on the same disk or partition and a physical breakdown occurs, we cannot recover either the original data or the backup.
Backups can be stored on various media: external hard drives, compact discs, DVDs, magnetic tapes, flash memories, SSD drives, etc.
Performing backups in a location separate from the original site is called Off-site Data Protection. Numerous companies specialize in these services, such as http://www.perfectbackup.es.
Rewritable CDs and DVDs:
- Offer a very limited number of writes.
- After several dozen writes, recordings fail and messages like "media is read-only" appear.
Magnetic tape:
- One of the oldest storage media still in use today.
- Its main characteristics are high storage capacity and high reliability.
- Slower than conventional hard drives, as data access is sequential.
Flash memories:
- USB drives, microSD, CompactFlash, and similar.
- Not recommended, as they break easily due to physical shocks or accidental high voltage, and offer low capacity.
Hard drives (HDD):
- Use magnetic recording methods.
- While evolving rapidly, progress has mainly increased capacity, sector access time, and reliability.
Solid State Drives (SSD):
- Backups are increasingly performed on SSD media.
- Disadvantage: cost—they are expensive, and capacity is limited.
- Advantages over conventional hard drives:
- No mechanical parts, making them reliable compared to traditional hard drives.
- Higher performance and lower access time (well below a millisecond) compared to dozens of milliseconds typical of traditional hard drives.
Restoring backups
System restore points
Just as we back up data, we must back up the operating system to restore normal functionality as quickly as possible without reinstalling the OS from scratch.
For Microsoft Windows systems, we can attempt to restore the system to its state before issues occurred. Restoration reverts system files to a previous state.
For this reason, system restore points must be created and saved.
To enable it in Windows 7:
- Open Control Panel.
- Click System.
- Select System Protection on the left panel.
- Select the drive to activate automatic protection, configure, and choose the desired restore setting.
Booting with Last Known Good Configuration
Occasionally, system restore cannot be performed, either because restore points were not created or because the system is severely degraded.
If Windows fails to start, we can use the Last Known Good Configuration startup option.
In Windows, rebooting the machine and pressing F8 opens an advanced boot options menu.
Select Last Known Good Configuration, and the system should boot normally.
If this option fails, attempt system restoration from the command prompt using rstrui.exe.
If the machine cannot start with previous options, try Windows Startup Repair.
It resolves common problems like missing or corrupted system files. Follow these steps:
- Restart the computer.
- Press F8 at boot to access Advanced Boot Options.
- Select the 1st option: Repair your computer.
- Select keyboard layout.
- Enter username and password.
- In System Recovery Options, select Startup Repair.
Automated System Recovery
If the system is so degraded that it cannot boot even in Safe Mode, and we previously created a backup using ASR (Automated System Recovery) on external media (DVD, hard drive, SD card, etc.), we can recover it.
Steps are as follows:
- Boot the computer using the original operating system CD.
- At initial setup, press F2 when prompted at the bottom.
- Follow requested prompts.
- Specify the media and backup file.
Image creation and restoration
To back up the full system (making reinstallation simpler, faster, and easier), applications such as Symantec Ghost and Acronis True Image exist, among others.
Cryptography
Introduction to cryptography
The term cryptography stems from Greek:
krypto = hidden
graphos = writing
It guarantees the confidentiality of transmitted information.
IEC definition of cryptography:
"A technique for converting text or data into a message incomprehensible to anyone without the cipher or key."
Rubicon Labs definition:
"The science studying secret writing—that is, designing secret codes and the inverse operation to interpret encrypted messages."
History of cryptography
Scytale (5th Century BC)
The earliest encrypted messages date back to the 5th century BC, where Spartans in ancient Greece used the scytale to conceal communications.

With this method, the sender wrapped a strip around a rod and wrote the message longitudinally. Afterwards, the strip was unwound and sent to the recipient. If intercepted by enemies, they would only see a meaningless set of characters. The recipient could only interpret the message if possessing an identical rod used to write it (that is, a rod with the exact same diameter).
Polybius (2nd Century BC)
In the mid-2nd century BC, Greeks developed another method named after historian Polybius.

The cipher consists of replacing each letter of the original message with a pair of letters or numbers indicating its row and column.
Caesar Cipher (1st Century BC)
In the 1st century BC, Romans developed the Caesar cipher.
The cipher replaces each character with another by shifting original alphabet characters 3 positions to the left, wrapping around the end of the alphabet when needed.

Vigenère (16th Century)
In the 16th century, Blaise de Vigenère expanded on Leon Battista Alberti's (15th c.) work by using 26 cipher alphabets, each starting with the letter following the previous one:
Thus, the sender could encrypt the 1st letter using the 5th alphabet, the 2nd with the 10th, the 3rd with the 5th, etc...

To decrypt the message, the recipient must know which row of the Vigenère square was used for each letter, requiring prior agreement. This is achieved using a keyword, repeated as many times as necessary to match the total length of the plaintext.
The advantage of this method is that frequency analysis cannot crack the hidden message, as a single letter corresponds to multiple combinations.
Another advantage is that countless keys can be used.
Other ciphers
Alberti cipher (one of the first polyalphabetic ciphers).
19th Century Ciphers
20th Century Cipher Machines
Classification of cryptographic methods
Classification according to cryptographic techniques:
- Transposition systems: Consists of rearranging the order of letters, syllables, or groups of letters. Depending on the number of transpositions, we can classify them into:
- Simple transposition systems: plaintext undergoes a single transposition.
- Double or multiple transposition systems: a second transposition is applied to text already encrypted via simple transposition. This method offers greater security.
Substitution systems: Consists of replacing certain letters of the alphabet with others or sets of characters based on the method. Classified as:
- Literal: letters are replaced by letters.
- Numerical: replaced by numbers.
- Steganographic: replaced by symbols or hidden behind an image, sound, etc.
Symmetric and asymmetric cryptography
Today we mainly use two encryption methods.
- Symmetric Encryption (or private key), which uses the same key for encryption and decryption.
- Asymmetric Encryption (or public key), which uses a key pair for the encryption and decryption process.
Symmetric cryptography
Symmetric encryption (or private key) uses the same key for encryption and decryption. This cipher relies on a shared secret between the entity encrypting the message and the one decrypting it.
The Vigenère method is a clear example of symmetric cryptography.
Disadvantages
Key exchange: if individuals know each other and meet physically, exchanging keys is easy; however, if separated by thousands of kilometers or unacquainted, using email, regular mail, phone calls, etc., represents insecure channels where intruders could capture the key.
Number of keys a person must memorize: assuming someone exchanges confidential information with 50 different people, using a distinct key for each and periodically changing them for security—how many keys must they memorize? Countless.
Asymmetric cryptography
Asymmetric encryption (or public key) means each communicating party holds a key pair for encryption and decryption.
A public key (for encryption), shared with any entity they wish to communicate secret messages with, and a private key (for decryption), which must never be shared.
To encrypt a message, the sender uses the recipient's public key; simultaneously, the recipient decrypts it using their private key.
Keys are generated together and are mathematically linked through one-way functions.
It is practically impossible to derive the private key from the public key.
In a public-key cryptosystem, users pick a random key known only to them (private key). From this key, an algorithm automatically derives the public key. Users exchange this public key over an insecure channel.
When a user wants to send a message, they simply encrypt it using the recipient's public key (found on a key server). The recipient decrypts the message using their private key (known only to them). This system relies on a function easy to compute in one direction and mathematically intractable to reverse without the private key.
Algorithms
Algorithms are the methods used to transform plaintext into ciphertext, such as the Caesar substitution cipher.
Today, various algorithms are used, some suited for private key cryptography and others for public key cryptography.
|
PRIVATE KEY ALGORITHMS
|
PUBLIC KEY ALGORITHMS
|
|
|
|
Hash function
These are functions mapping every document to a number, possessing the property that knowing the numerical value does not reveal the document.
These are known as one-way functions.
Hash functions must satisfy the following requirements:
- It must be extremely difficult for two different documents to produce the same hash.
- It must be virtually impossible to reconstruct a document from a hash value.
Generating a document's hash value requires mathematically complex algorithms to meet both specs.
Some of these algorithms include MD5 and SHA.
Hash functions serve to guarantee text integrity.
For instance, ASCII code could build a simple hash function:
- ASCII assigns a number to every letter or punctuation mark.
- It is an international standard symmetric key.
- Used by all computers, for example.
- We can replace each letter in a text with its ASCII code.
- We can perform calculations on ASCII codes of a text.
- Here, every three characters are calculated via their ASCII codes.
- Formula = (1st-2nd)*3rd
- The sum of results yields a HASH function uniquely identifying the text.

Digital signature
A digital signature allows message recipients to verify the authenticity of data origin and confirm that information was not modified after generation.
Digital signatures support data authentication and integrity, as well as non-repudiation of origin, since the sender of a digitally signed message cannot claim they did not send it.
Digital signatures serve the same purpose as handwritten signatures. However, handwritten signatures are easy to forge, whereas digital signatures are impossible to break without discovering the signer's private key.
Mechanism description of an electronic signature:
- A hash value of the document is calculated using an algorithm like SHA.
- This hash value is encrypted using the private key from our public-private key pair.
- The resulting value is known as the document's digital signature.
Verification process of a digital signature:
- The signature is decrypted using the signer's public key, retrieving the summary value of the document.
- A hash value of the document is calculated independently using the same algorithm (e.g., SHA).
- Finally, both summary values are compared; if they match, the signature is valid; if they differ, the signature is void.

Digital certificate
A digital certificate is a document containing information about a person or entity—storing name, address, email… along with a public key and a digital signature from a trusted organization (Certificate Authority) confirming that the public key belongs to the certificate owner. This final signature is arguably the most critical component.
Multiple file formats store digital certificates. The most widespread standard used on the internet is X.509.
Certificate fields:
- Signature algorithm (identical to the algorithm used to sign the X.509 package).
- Certificate Authority (issuer).
- Validity period (valid from… to…)
- Digital signature of the Certificate Authority.
PKI (Public Key Infrastructure)
PKI stands for Public Key Infrastructure—everything required for secure communications using digital certificates and digital signatures.
A PKI consists of:
- Certificate Authority (CA): trusted entity responsible for issuing and revoking certificates.
- Registration Authority (RA): responsible for controlling certificate generation. It processes user requests, verifies identity documents, and requests certificate issuance from the CA.
- Repositories storing issued and revoked certificates that are no longer valid.
- All software necessary to utilize digital certificates.
- Defined security policies for communications.
In Spain, performing administrative procedures online requires a digital certificate to verify identity.
This certificate is issued by the FNMT (Fábrica Nacional de Moneda y Timbre) acting as a CA, utilizing public administration offices (Social Security, Tax Agency) as Registration Authorities to verify identity upon presenting an official ID card.
JCE Library
The JCE package (Java Cryptography Extension) is a library provided by Java to execute encryption algorithms in our programs.
The goal of JCE is to offer an abstraction layer integrating different cryptographic algorithms, keeping code consistent and dependent on only a few parameters to call methods regardless of the chosen algorithm.
It is also designed to be extensible to incorporate future algorithms while maintaining backward compatibility. Note that JCE does not natively contain every single algorithm in existence today.


Symmetric encryption
AES Algorithm
It uses symmetric encryption, also known as private key encryption.
Currently, several symmetric algorithms are used across software applications. We will focus on studying the AES algorithm (Advanced Encryption Standard), considered the most secure standard symmetric cipher since 2002.
Formerly called Rijndael (pronounced "Rain Doll"), created by Belgian cryptographers Joan Daemen and Vincent Rijmen, it won standard status after competing in a demanding NIST (National Institute of Standards and Technology) international contest in 1997.
Their proposal introduced a family of ciphers with varying key and block sizes.

For AES, NIST selected three members of the Rijndael family, each with a 128-bit block size, but three key sizes: 128, 192, and 256 bits.
AES is based on a design principle known as a substitution-permutation network, combining both concepts.
Unlike its predecessor DES, AES does not use a Feistel network (a block cipher structure identical for encryption and decryption), but implements a variant of Rijndael working with multiples of 32 bits (min 128, max 256).
AES operates on 4x4 byte columns representing state.
The key used determines the number of round repetitions used to convert input ("plaintext") into final output ("ciphertext").
The number of repetition cycles is as follows:
- 10 cycles for 128-bit keys.
- 12 cycles for 192-bit keys.
- 14 cycles for 256-bit keys.
Each round consists of processing steps composed of multiple parts, including one directly dependent on the encryption key itself.
Naturally, transforming ciphertext back to original plaintext uses the same encryption key while applying a reversed set of rounds.
- KeyExpansion: round keys are derived using Rijndael's key schedule.
- InitialRound:
- AddRoundKey - Each state byte is combined with a key block using bitwise XOR.
Rounds:
- SubBytes - Non-linear substitution step where each byte is replaced with another according to a lookup table.
- ShiftRows - Transposition step where state rows are cyclically shifted a set number of times.
- MixColumns - Mixing operation operating on state columns, combining four bytes per column via linear transformation.
- AddRoundKey - Each state byte is combined with the round key derived from the main key using key iteration.
Final step:
- SubBytes - Non-linear substitution step where each byte is replaced with another according to a lookup table.
- ShiftRows - Transposition step where state rows are cyclically shifted a set number of times.
- AddRoundKey - Each state byte is combined with the round key derived from the key iteration.
Security
The design and strength of all key lengths in AES (128, 192, and 256) have been declared sufficient to protect classified information up to "SECRET" level.
"TOP SECRET" information requires minimum key lengths of 192 or 256 bits. AES implementation in products aims to protect national security systems and/or information subject to NSA review and certification prior to acquisition and use. AES runs 10 rounds for 128-bit keys, 12 rounds for 192-bit keys, and 14 rounds for 256-bit keys.
The best attacks against this cipher reach roughly 7 rounds for 128-bit, 8 rounds for 192-bit, and 9 rounds for 256-bit keys.
Other symmetric algorithms still in use include the former standard: DES (Data Encryption Standard) or TripleDES.
Since code adjustments required to swap algorithms using JCE are minimal, focusing on one helps us understand how the rest operate.
Let's look at code samples to see how to work with this...
Before running an encryption algorithm, one essential prerequisite must be solved: deciding on the key protecting the information.
Therefore, this is the first step. Anyone with access to this key will be capable of generating encrypted data and decrypting it later.