Push-Nachrichten von MacTechNews.de
Würden Sie gerne aktuelle Nachrichten aus der Apple-Welt direkt über Push-Nachrichten erhalten?
Forum>Software>Textdatei nur über das Terminal ver- und entschlüsseln

Textdatei nur über das Terminal ver- und entschlüsseln

mac.apple
mac.apple09.08.0500:04
Hallo Freunde!
Ich würde gerne eine reine Textdatei nur über das Terminal ver- und entschlüsseln können.
Hat jemand vielleicht so ein (möglichst einfaches) Terminalprogramm?

Danke im Voraus,

Walter,
PowerBook Titanium G4, 500Mhz, 512 Ram, OSX 10.2.8
0

Kommentare

rofl
rofl09.08.0500:33
Die Frage ist auf welche Art und Weise verschlüsseln. Also richtig hefitg oder einen Wald- und Wiesen-Algorithmus.

Sollte es sicher sein, so schlage ich dir ein verschlüsseltes Disk-Image vor.
0
Harun09.08.0500:33
geht das nicht mit openssl? installiere es mal und probiere es aus:

0
mac.apple
mac.apple09.08.0500:51
nein, nein, das muß nicht extrem verschlüsselt werden. Ich muß diese Textdatei nur auch von anderen Apple Computern aufmachen können, wo ich nicht weiß was dort alles für Programme installiert sind.
Deshalb dachte ich, dass es das Terminal überall gibt, und ich so sicher diese Textdatei entschlüsseln könnte.
0
Ties-Malte
Ties-Malte09.08.0500:54
Eine andere Möglichkeit wäre GPGDropThing @@ (wobei ich ein verschl. Disk-Image für die einfachste Variante hielte).
„The early bird catches the worm, but the second mouse gets the cheese.“
0
rofl
rofl09.08.0500:56
Google mal:
0
mac.apple
mac.apple09.08.0501:06
'Google mal' ist wirklich ein guter Tip;)
natürlich habe ich schon im Google nachgeschaut, ich hab auch schon alle Treads in dieser Liste durchgefoerstet.
Und erst dann diesen Tread eröffnet, weil ich wirklich nix, absolut kein Terminal Programm gefunden habe, welches eine einfache Textdatei entschlüsseln kann.
0
rofl
rofl09.08.0501:08
Ok, wusste ich nicht.

Aber ehrlich gesagt würde ich es über ein Disk-Image regeln, das Festplatte-Dienstprogramm ist wirklich auch immer installiert.
0
Ties-Malte
Ties-Malte09.08.0501:11
Das ist wohl auch nicht so ohne…

I encrypted a file, and now the decrypted result is unusable.

Gpg Tools uses a UNIX tool for encryption and decryption, so using it on mac files with a resource fork may cause the encrypted file to not contain all the information of the original. This is because UNIX tools generally don't understand about resource forks. Most new Mac OS X applications steer clear from resource forks, but not all. Classic applications and files use them much more frequently. In effect, if you can't copy the file successfully with the UNIX 'cp' command, you can't encrypt it either. You can work around this by using a tool like DropStuff (from Aladdin Systems) to MacBinary encode the file first.

Gpg Tools won't let me encrypt certain files, eg .rtfd files.

This is because these type of file are not really files. They are in fact a special type of folder, called a package, which the Mac OS displays as if they were files. Because they are in fact folders, gpg cannot encrypt them, so Gpg Tools won't let you select them. You can tell what files are in fact packages by right-clicking on them in the Finder - if the item 'Show Package Contents' is present then it's a package. If you really want to encrypt a package then you must convert it into a single file first, for example by tar-ing it or using DropStuff.
Q: @@
„The early bird catches the worm, but the second mouse gets the cheese.“
0
mac.apple
mac.apple09.08.0501:18
rofl
Ok, wusste ich nicht.

Aber ehrlich gesagt würde ich es über ein Disk-Image regeln, das Festplatte-Dienstprogramm ist wirklich auch immer installiert.


ja, das werde ich jetzt einmal durchspielen, werde morgen dann hier berichten, ob das überall funktioniert hat.
danke inzwischen!
0
mac.apple
mac.apple10.08.0514:42
Also mit dem Festplatten-Dienstprogramm komme ich leider gar nicht zurecht.
Wie soll ich denn damit eine einzelne Datei Verschlüsseln??

0
Ties-Malte
Ties-Malte10.08.0515:19
Festplatten-Dienstprogramm @@ neues Image @@ ein Fenster öffnet sich @@ Name wählen, Speicherort angeben, Größe einstellen, Verschlüsselung AES-128, Format wählen: Beschreibbares Image oder, falls viele Dateien nach und nach dazu kommen sollen, Mitwachsendes Image @@ fertig stellen. Image öffnen (mit PW), Dateien reinlegen und schließen, fertig.
„The early bird catches the worm, but the second mouse gets the cheese.“
0
Ties-Malte
Ties-Malte10.08.0515:20
Nachtrag: nicht die Dateien werden verschlüsselt, sondern das DMG, in dem die Dateien liegen.
„The early bird catches the worm, but the second mouse gets the cheese.“
0
_mäuschen
_mäuschen10.08.0515:28
Hier ein Tipp zur Verschlüsselung einer Datei im Terminal

Open up Terminal (Applications-*gt;UtilitiesTerminal) and create a tar archive of the files and folders you want to transfer. In this instance, I'm going to archive and encrypt the contents of a folder called "HTML for Dummies":

$ tar cf html.tgz ./HTML\ for\ Dummies/
$ ls -l html.tgz
-rw-r--r-- 1 taylor staff 2662400 28 Nov 09:25 html.tgz

The end result is that I now have a file called "html.tgz" that's a compressed tar archive, containing a copy of all the files and folders within the original HTML directory. It's still not encrypted, however, and to accomplish that, we're going to rely on the powerful encryption utilities included with the SSL library that's built-in to Mac OS X.
These SSL utilities are accessed via the rather confusing openssl function, like this:

$ openssl des3 -salt -in html.tgz -out html.tgz.des3
enter des-ede3-cbc encryption password:
Verifying - enter des-ede3-cbc encryption password:

$ ls -l html*
-rw-r--r-- 1 taylor staff 2662400 28 Nov 09:25 html.tgz
-rw-r--r-- 1 taylor staff 2662424 28 Nov 09:26 html.tgz.des3

Now there's a new tar archive, one that's actually encrypted using the powerful DES3 cipher. Still with me? Let's just confirm that this new archive file doesn't actually work with tar (which it shouldn't, since it's encrypted):

$ tar tzf *des3

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

Good! That's the file that I'd copy across to my flash drive, knowing that it's safely encrypted from prying eyes, yet quite easily to decrypt and restore on my other computer:

$ openssl des3 -d -salt -in html.tgz.des3 -out html.tgz
enter des-ede3-cbc decryption password:

$ tar xf html.tgz
$

That's all there is to it.
If this appeals to you, then it could be a very useful shell script to write, one that would let you have a folder on your Desktop called, say, BackAndForth, where everything therein would be automatically archived with tar, encrypted with openssl, and then copied onto the flash drive, all with a single typed command.

However, given that this wouldn't be too difficult, I am surprised that there aren't any nice sync utilities designed specifically for flash drives and Mac OS X. If you know of one, please do add a link and I'll check it out!

siehe @@ man openssl
-salt
This option will add a salt (random) value to the encryption. It is advised to use this option when encrypting files.
0
mac.apple
mac.apple10.08.0520:22
Ties-Malte, Danke, mit dem Festplatten-Dienstprogramm funktioniert das Ver- und Entschlüsseln. Die mindestgröße kann ich zwar nicht kleiner als 5 MB einstellen, aber mit dem kann ich leben.

_mäuschen, OK, jetzt probiere ich noch die Verschlüsselung über das Terminal - schaut aber ein bisserl kompliziert aus ...

0
mac.apple
mac.apple10.08.0520:57
Ups, da sind die Dateien in dem *.dmg Image gar nicht verschlüsselt?
Gibts denn da nicht Möglichkeiten das dann doch auszulesen?
0
_mäuschen
_mäuschen10.08.0521:23
Im *.des3 ist im Buchstabensalat nur @@Salted auffindbar.
Kein Passwort ist zu erkennen.

[i]Salted__ü¶óÏ”Œ¨Chf¶K?@??‡A?ã?In %ÿ?A?éŸÄØSKÏB+Å®Pm?Æo",˜yòñ›ÊE?&£?Hÿ
Oú¬¨
-7¿.3ƒˆŒ?ÓOàs„2†É7MËêá81HªÓÏœ¢}ónU
0
_mäuschen
_mäuschen10.08.0521:35
Ja, ist ja auch eine versalzene Suppe
0
Don Quijote10.08.0521:08
Die gibt es immer…wie einfach ist halt die Frage.

Da war mal etwas mit Kompression, die dann auch nur per Code eingabe zu entpacken war.

Nur im Editor geöffnet, war das Passwort im Klartext zu lesen…

Vielleicht trotzdem mal Alladin, Gzip, usw. anschauen.
0
Don Quijote10.08.0521:31
sry _mäuschen, hatte es erst jetzt gesehen, das du es schon gepostet hattest, Salted wird angezeigt ?

mac.apple

Das dauert mit Hausmitteln ewig bis man es lesen kann…
0

Kommentieren

Diese Diskussion ist bereits mehr als 3 Monate alt und kann daher nicht mehr kommentiert werden.