0

I have a 2021 M1 Macbook Pro that is password protected with a weak password (5 characters).

I want to create a local backup of my Macbook but I am wondering what will happen if I lose physical access to my Macbook (e.g. if stolen).

My understanding of the security model of the Macbook is that the disk is encrypted with an encryption key that is different from my password. My password is simply used to retrieve the encryption key from the secure enclave, so even a weak password is sufficiently secure.

My questions:

  • What password/security key is the external disk encrypted with?
  1. If it is encrypted with my actual password, then the encryption is very weak.
  2. If it is encrypted with the key from the secure enclave, then this means if I lose physical access to my Macbook my data will remain forever encrypted?

Or is Apple using some other mechanism for the encryption?

3
  • Normally, an encrypted TM disk uses FileVault, doesn't it?
    – benwiggy
    Dec 18, 2022 at 13:01
  • It's up to the user when setting it up.
    – Ezekiel
    Dec 18, 2022 at 22:49
  • FileVault is the only supported option for encrypted TM disks. It's not really up to the user to choose, and you're not asked specifically for FileVault. You are only asked whether you want encrypted backups or not.
    – jksoegaard
    Dec 18, 2022 at 23:06

3 Answers 3

2

I'm assuming you're talking about the built-in Time Machine backup system.

When you setup Time Machine backups, you first need to select the external disk used for storing the backups. In the same window, you can checkmark "Encrypt backups". You need to do this to get encrypted backups.

If you do that, you're then prompted for a password to be used for encrypting the external disk. From the password, macOS derives the encryption key using a password-based key derivation function. This means that the weak 5 character password on your user account doesn't come into play here at all.

Had the data just been encrypted with the password as the key, it would be possible to directly brute-force the encryption by attempting each possible password. As you can test millions of passwords per second on a home computer, this makes the encryption relatively weak.

However, Apple does not do that - instead they run the password through a password-based key derivation function known as PBKDF2 in order to obtain the key. The idea is that you store a small amount of random data, called a salt, unencrypted on the external disk for backups. This data is passed along with the entered password to the key-derivation function, which then generates the encryption key.

The trick is now that the key-derivation function intentionally takes a long while to compute - and is constructed in such a way that no shortcuts exists to compute it faster. The salt makes sure that the function cannot be precomputed.

The net effect is that a hacker attempting a brute-force attack is no longer able to test millions of keys per second on a home computer, instead the problem becomes orders of magnitude harder.

To give an idea of the scale: instead of being able to try in the range of 100 million passwords per second on a standard home PC CPU, it is instead only possible to try 20 passwords/sec. Even if you add a dedicated GPU and specialized software, you're only going to be able to test in the range of 50.000 passwords/sec. You can throw more GPUs and power at the problem, but it is still much, much harder.

So to answer your point (1), the password is used as a base for creating the key, but the password is not the key itself. This means that the encryption is not "very weak".

To answer your point (2), the key is not stored solely in the secure enclave. This means that you can access the backup data from other Macs - even if you loose phyiscal access to your MacBook.

8
  • The encryption is as weak as the password, because the key is still only protected by the weak password.
    – Ezekiel
    Dec 19, 2022 at 3:19
  • No, that’s simply not correct. The whole idea is that you cannot brute force the encryption simply by trying password after password an instead you would have to brute force the encryption key, which is generally much harder. Do you need me to add an explanation of how password-based key derivation functions work?
    – jksoegaard
    Dec 19, 2022 at 5:51
  • I have added an explanation of how key-derivation functions work for you.
    – jksoegaard
    Dec 19, 2022 at 6:23
  • I see - you're saying that the PBKDF2 process makes each try take longer. However, a weak password is still a weak password even if searching takes longer than one might expect.
    – Ezekiel
    Dec 19, 2022 at 16:43
  • 1
    Well, if you want to be pedantic, then yes ofcourse you shouldn't use "1234" or "password" as your password. That goes without saying. However, I think you're grossly underestimating how much longer it takes to brute-force the password with PBKDF2 compared to without it. If the password was simply used as the key, a standard home PC could test in the range of 100 million passwords/sec. With PBKDF2 a standard home PC could test perhaps 20 passwords/sec on the CPU. Even if you add a dedicated GPU and specialized software, you're only going to get perhaps 50000 passwords/sec.
    – jksoegaard
    Dec 19, 2022 at 22:48
1

Your Time Machine backup has a password. For convenience your Mac will remember that password.

The important thing is that if your laptop is stolen or breaks you can buy a new one and restore your backup as long as you know the password. So don’t rely on your Mac remembering the password. You MUST remember the password or keep it in a safe place.

0

When you create a backup on external storage, the encryption is completely separate from your computer's internal storage encryption. The backup software (Time Machine, or any 3rd party software) reads the local file (which decrypts it) and writes it to the external storage. This means that you can connect to a new computer and re-enter your password to restore your files.

If you have encryption configured on your external storage, then when the file is written (backed up) to the external storage, it will become encrypted with the password configured for that storage medium.

If you don't have encryption configured on the external storage, it is backed up unencrypted.


I believe you have a misconception on how the secure enclave comes into play. If someone knows/guesses your password, they can access your files. The secure enclave does not prevent this.

You're correct that a separate key is used to encrypt the files, and this is to allows:

  1. easy password changes (avoiding the need to re-encrypt each file)
  2. easy erasure of data (discarding the key completely)
  3. Artificial computation requirements to extend time to convert a password into a key, extending time to brute force

This means that brute forcing password with no knowledge about the target might not be feasible, but a targeted attack against a terrible password would still be possible.


If you set your password to password on your laptop, and someone gets your laptop, they can guess password and access your files.

If you set your password to password for your Time Machine backup storage, and someone steals it, they can connect it to their computer and enter password and access your files.

This means that your backup can be read by another computer, so long as you know the password.

1
  • Thank you for your excellent response. The only thing missing is a guideline for how long the passwords needs to be to offer a comparable security to that of an AES 128-bit key used for encryption, commonly known to be unbreakable. Apr 6, 2023 at 12:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .