garage4996 wrote:
.dmg files I used before and I failed to open it after sometimes ,it simply refused to open . That File Vault is ok ,I use that too . But I may need to know some other ways to encrypt files too .
Encrypted DMG files can and do work, and are widely used. What command and what errors are you encountering?
Encrypted sparse bundles will usually be the easiest (and most portable across Macs) way, potentially scripted with hdiutil and ilk where appropriate.
(a folder is a directory is a folder), how to understand this ? A folder is a directory in a folder ? Or a folder is also a directory?
Synonym.
I could not find anything on internet how to encrypt , in terminal , with openssl several files at one command ,that is why I cannot post anything useful here ,it is only a waste of time ,it is only a guessing - that it maybe so or not.
That seems a vastly different starting point from “I tried to encrypt some files at once with AES256 ,but it failed.”
Over the years I learned ,not to waste my time on stuffs which is not clear to me ,or which I cannot in any way understand .
That means increasing your familiarity with UNIX and zsh as a starting point, and then later some more experience around cryptography, as too many of the OpenSSL examples around are old or otherwise insecure.
There are books and documents and videos on these topics, depending on how you best learn.
Or maybe you have an idea how to use the terminal to encrypt several files at once with openssl ? That would be a great help.
Okay. Please post your code, and please post the errors. We’ll start from there. It’s usually easier to start from a non-working example than to start anew, particularly as some context can usually be acquired from the failing code, after all.
As for alternatives to OpenSSL, I’ve suggested using hdiutil and encrypted sparse images earlier, and have also suggested age. age avoids various of the pitfalls that can arise with other tools.
Some background on the subtleties of “encrypting a file”, this in the context of age:
https://words.filippo.io/dispatches/age-authentication/
Some docs:
https://htmlpreview.github.io/?https://github.com/FiloSottile/age/blob/main/doc/age.1.html
Exceedingly quick intro to zip:
zip -r filename.zip /path/to/directory
Prompting for a passphrase encryption and decryption:
$ age --passphrase filearchive.zip > filearchive.zip.age
$ age —-decrypt filearchive.zip > filearchivedecrypted.zip
Your unfamiliarity with UNIX and your familiarity with MD5 is an interesting juxtaposition here, too. Someone unfamiliar with files and folders and directories can get into trouble with tools such as OpenSSL or pgp (and from various cryptographic attacks), while someone familiar with he issues of MD5 undoubtedly already knows this.
Some light reading on pitfalls and considerations: https://research.checkpoint.com/2024/modern-cryptographic-attacks-a-guide-for-the-perplexed/