Is there a way to give different names to an OpenSSL encrypted tar file on Mac?

Is there any way to give different names to an OpenSSL encrypted tar file. All these has the same name archive.tar.enc or archive.tar


Fortunately I could decrypt them all as I put them in different folders and put the name on those folders, so I could find them easily , But it would be better if there could be some commands so that I can put a decided name on them ,as it is now all ends with the same name tar or tar.enc


I do not know either if I can send these files to another Mac and decrypt them there too ? I do not think so version openssl are not the same .


This is also interesting ,to send openssl encrypted files to another Mac and decrypt them there ,but this I think maybe not that feasible - now I have libre SSL on one Mac and the other and older version - so this will not be so easy .Or for that reason sending these files to some in mail would be nice to - but Macs have different versions of openssl.


What is more important for me is to get some possibilities to differentiate between these tar files - set a name on them - now they have a name on them - in a folder - but this is not the good either .



[Re-Titled by Moderator]

Original Title: ARCHIVE.TAR.ENC

Posted on Sep 10, 2025 4:27 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 10, 2025 4:38 AM

Open Terminal.app, then type:

tar -czvf - your_directory/ | openssl enc -aes-256-cbc -pbkdf2 -salt -out your_encrypted_file_name.enc


  • tar -czvf - your_directory/: This creates a compressed tar archive (using gzip) and sends it to standard output (the pipe |). 
  • openssl enc: This is the OpenSSL command for symmetric encryption. 
  • -aes-256-cbc: Specifies the encryption algorithm (AES-256 in Cipher Block Chaining mode). 
  • -pbkdf2: Uses a strong key derivation function to derive the key from your password. 
  • -salt: Adds a random salt to the encryption process, which is good practice for security. 
  • -out your_encrypted_file_name.enc: This is the crucial part that tells OpenSSL to name the encrypted output file your_encrypted_file_name.enc


25 replies

Is there a way to give different names to an OpenSSL encrypted tar file on Mac?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.