Password protect a file?

Everything related to our flagship word processor.
Post Reply
editor10
Posts: 35
Joined: 2010-09-18 12:24:52

Password protect a file?

Post by editor10 »

Is there a way to do this in NWP?
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Password protect a file?

Post by adryan »

G'day, editor10 et al

Not as far as I am aware. It would be top of my list for feature requests.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

Re: Password protect a file?

Post by credneb »

Wouldn't that require both parties using Nisus? None of my clients ever did.

Alternatively, you could encrypt the file with pgp/gpg, zip, or other encryptable format.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Password protect a file?

Post by martin »

credneb wrote: 2021-06-28 18:17:55 Wouldn't that require both parties using Nisus? None of my clients ever did.
Password protection has been a popular request from our users over the years, but credneb is exactly right: there's no way for us to add such a feature that will remain compatible with other apps. RTF does have password protection, but it's only used to mark documents as read-only; it can't be used to deny access to the file's content entirely.

If you need to password-protect a file then using a zip archive is the way to go. We even provide a macro that does this via the menu Macro > Document > Compress Files. It will prompt you to choose the file to compress, and optionally set a password.
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Password protect a file?

Post by adryan »

G'day, Martin et al

Thanks for the tip about compressing files, Martin. I hadn't realized that setting a password was an option there. It will suit my purpose.

Compatibility with other applications was not a problem for me. Apple's Pages application doesn't seem to worry about this either, as it offers password protection of its files.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
Amontillado
Posts: 41
Joined: 2019-06-20 11:13:06

Re: Password protect a file?

Post by Amontillado »

Another way would be to create an encrypted dynamic-sized disk image. Mount the image by double-clicking it, then put one or more files in it.

The image file starts out small and grows as needed to the maximum you set when you create the image. It won't shrink. If you need to reclaim space, you have to create a second encrypted image and copy the files into it. The new image starts out at the minimum needed size.

Create encrypted images in Disk Utility - File->Blank Image. Set a filename for the image, a maximum size and format, turn on encryption, and choose "sparse disk image" for the format.

Not that cumbersome once you do it the first time.
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Password protect a file?

Post by adryan »

G'day, Amontillado et al

The idea of using a sparse image here is interesting.

As I understand it, one of the problems with sparse images is that they don't automatically shrink in size when contained data is deleted. However, there is a Terminal command that can accomplish this.

I confess, though, that I've never been quite sure what encryption entails in this context. Is an encrypted file the same as a password-protected one, or are the file contents of an encrypted file themselves rendered inscrutable by some sort of scrambling algorithm? In the latter situation, I wonder whether there is a greater chance of mishap with consequent irretrievability of the data.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

Re: Password protect a file?

Post by credneb »

Hi, Adrian.

I knew nothing about sparse disk images, so diddled a google and up popped

https://computing.sas.upenn.edu/natsci/sparse

Item 4 says "You should now choose the type of encryption, the recommended 128-bit AES encryption should be fine."

so there should be no loss of data upon decryption, and the file should be as secure as far as any normal wombat is concerned.

Now when it comes to decryption specialists... (Note the 'unbreakable' encryption of the iPhone was broken by a private contractor for the FBI for a couple of million dollars and not that much time a few years ago. Not to mention the traced untraceable Bitcoin recovery of late.)

Cliff
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Password protect a file?

Post by adryan »

G'day, Cliff et al

Thanks for that.

> "secure as far as any normal wombat is concerned"

Your brute force allusion is very apt. Given that Australian folklore has it that hitting a wombat with a car does far more damage to the car than the size of the animal would suggest, it is indeed reassuring.

(As an aside, do enough night driving in non-metropolitan Australia and you're bound to hit some poor animal at some stage. It's one of the tragedies of life here. I once had a kangaroo run out of the dark and into the side of my vehicle in the Outback at night — nothing you can do about it. So far, I've avoided the wombats, though.)

But it's more the possibility of decryption's failing that I'm interested in. Even if you knew the decryption key, it's conceivable that the decryption process goes astray and the data is irretrievable forever. I'm just wondering whether this is possible with a "simple" password-protection situation.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
Amontillado
Posts: 41
Joined: 2019-06-20 11:13:06

Re: Password protect a file?

Post by Amontillado »

An encrypted disk image is like an encrypted filesystem.

Without the password, it's meaningless, random-looking, data.

Decrypted with the password, your OS can treat it as if it were a disk drive. You see it in the Finder just like you would an external USB device, or your internal drive. It's just a disk, for all intents.

Encryption is done on the fly. When you mount an encrypted image or an encrypted device, your computer reads jumbled data, decrypts it, and presents the decrypted data to the application. Writing is in reverse. The data is encrypted before it's written to the device or disk image file. At no point is the file or disk itself decrypted.

I use an encrypted filesystem on a USB drive as my personal "cloud." I don't have anything to protect, really, it just chills my creativity to think someone at Dropbox would look at a short story in progress and think, "Why would any mature adult write that kind of silly drivel?"

If I lose the drive at the burger stand, I haven't exposed my bank records (or my silly drivel).

The password is in Mac's Keychain Access, so I mount it without the delay of typing a password. The same will work for an encrypted disk image.

I think of losing the password as functionally the same as a catastrophic device failure. Disks will eventually fail, so loss of any one copy of data is always a certainty. I keep important passwords manually synched to a second password manager.
Post Reply