Autor Beitrag
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Di 12.07.05 06:46 
Kann mir jemand einen sicheren Weg zeigen, den Inhalt eines TMemoryStream zu verschlüsseln?

Ich arbeite an einem kleinen Programm, dass entweder mit einer Datei oder mit Text zurechtkommen muss. Der damit gefüllte MemoryStream wird dann komprimiert und soll danach noch verschlüsselt werden.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Di 12.07.05 09:23 
Wo genau ist jetzt das Problem? Der Zugriff auf den Suche in: Delphi-Forum, Delphi-Library "TMEMORYSTREAM", das Suche in: Delphi-Forum, Delphi-Library "VERSCHLÜSSELN" oder das Suche in: Delphi-Forum, Delphi-Library "KOMPRIMIEREN" ;)

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
derDoc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Di 12.07.05 15:52 
Nun, mein Problem ist das Verschlüsseln.

Das Verwenden von MemoryStreams ist eigentlich einfach und auch das Komprimieren verläuft dank ZLib wunderbar, aber ich finde keine praktikable Verschlüsselungslösung, die wenigstens halbwegs sicher ist. Es sollte kein einfach verschobenes Alphabet oder ähnlich harmlose Sachen sein.
Natürlich findet man einige Komponenten, die soetwas können, aber ich benutzte lieber richtigen Quellcode (Units) und keine Fremdkomponenten.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Di 12.07.05 16:14 
Sollte es ein Verfahren mit oder ohne Passworteingabe sein?

Alstar
derDoc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Di 12.07.05 17:04 
Ich hatte an ein Verfahren mit Passwort gedacht.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Di 12.07.05 17:14 
Schau mal hier: www.delphi-forum.de/...ncoder+10_45104.html

Wenn dir das da beschriebene Verschlüsselungsverfahren gefällt (ich kann nicht sagen ob es sicher genug für dich ist), kann ich es für dich an einen Stream anpassen und die Units posten.

Alstar
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 12.07.05 17:22 
ich hab hier mal eine Suche in: Delphi-Forum, Delphi-Library RC4 funktion gepostet, die verschlüssellung ist recht sicher bei einer ausreichend langen keylänge

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 12.07.05 18:10 
RC4 ist ein Streamcipher, der nicht unbedingt gerade sicher ist (ok, er ist relativ sicher, aber moderne Blockcipher sind besser!), und das Verfahren von dir Alstar gefällt mir auch nicht so ganz. Ich hab es zwar nur überflogen, aber ich würde doch lieber auf einen bewährten Standard-Algo wie IDEA oder Rijandel zurückgreifen. Beide sind im Suche in: Delphi-Forum, Delphi-Library DEC von Hagen Reddmann implementiert.

Gruß, Motzi

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Di 12.07.05 18:33 
Hallo Motzi,

auch wenn es nicht in diesen Thread gehört, möchte ich dich bitten im dafür Vorgesehenden zu posten, was dir an meiner Methode nicht gefällt.
Schonmal danke!

Alstar
derDoc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mi 13.07.05 06:25 
Ich habe jetzt erstmal eine RCx-Verschlüsselung eingebaut. Damit funktioniert das Ganze recht gut. Das ist allerdings auch ein Streamcipher.
Kann mir jemand etwas zur Sicherheit von RCx sagen? Diese Verschlüsselung ist auf jeden Fall sicherer als RC4.

Ich werde mal eine Testversion mit dem IDEA schreiben und dann schauen, welche besser läuft.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.