Autor Beitrag
ralfi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mi 25.08.04 04:59 
Hallo!

Hate jemand einen guten sicheren Verschlüsselungsalgorytmus, mit dem ich Strings verschlüsseln kann?


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Mi 22.06.2005 um 22:14


Zuletzt bearbeitet von ralfi am Mi 25.08.04 11:22, insgesamt 1-mal bearbeitet
opfer.der.genauigkeit
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754
Erhaltene Danke: 1



BeitragVerfasst: Mi 25.08.04 08:25 
Zitat:

Wie sicher ist eigentlich XOR?


Was meinst du damit?
Ein Operator an sich ist sicherlich garnicht sicher.
Kommt drauf an was du draus machst. Shaka!

Verschlüßelungsalgos gibt's n haufen. Kommt immer drauf an wofür du
die brauchst.

P.S.: Kennt jemand ne Komponentenbibliothek, die SSH unterstützt?

_________________
Stellen Sie sich bitte Zirkusmusik vor.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 26.08.04 21:22 
XOR ist unsicher wie du hier nachlesen kannst.. ;)

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

Win XP Home, Win XP Pro
D6 Prof, D7 Ent, K3 Ent
BeitragVerfasst: Fr 27.08.04 15:12 
Nimm AES (Advanced encryption standard), das ist eigentlich momentan der Standard! Ich empfehle dir das DCCrypt Package, da ist alles drin was man zum verschlüsseln braucht! Einfach mal mit Google suchen, kenn den link leider nicht auswendig!!
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Fr 27.08.04 15:16 
Und ich empfehle immer noch das DEC (Delphi Encryption Compendium) von Hagen Reddmann! ;) Auch einfach mal Googeln, bekommt man so gut wie überall (zB Torry)..

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Böser Borstel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 154



BeitragVerfasst: Di 31.08.04 14:21 
verschlüsseln
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
  function EncodePassword(const APassword: String): String;
  const
    Key = 'MoISenbÖ53rBorST3LBoeHNicken';
  var
    i,
    L,
    X: Integer;
    UserName: String;
  begin
    Result := '';
    L := Length(APassword);
    UserName := Key;
    while Length(Username) < L + 1 do
      Username := Username + Username;
    for i:=1 to L do
    begin
      X := Ord(APassword[i]);
      UserName[i] := Chr(Ord(UserName[i]) shl (Ord(UserName[i+1]) mod 3) + i);
      if i Mod 2 = 0 then
        X := X + Ord(UserName[i])
      else
        X := X - Ord(UserName[i]);
      while X < 0 do
        X := X + 255;
      while X > 255 do
        X := X - 255;
      Result := Result + IntToHex(X, 2);
    end;
  end//EncodePassword

aufgabe: den weg zurück herausfinden

Moderiert von user profile iconUGrohne: Code- durch Delphi-Tags ersetzt.
stiftmaster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 149



BeitragVerfasst: Mi 22.06.05 21:32 
ist dein Code hier die AES-Verschlüsselung? Wenn ja, könntest du noch das entschlüsseln hinschreiben - wäre dir dafür sehr dankbar.

Stefan
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mi 22.06.05 21:43 
Nur so nebenbei: "XOR-Verschlüsselung" kannst du 100% sicher machen, falls es du schaffst, ein zufälliges One-Time-Pad zu erstellen. (Z.B. mit verschränkten Photonen kannst du dir eine sichere Datenleitung bauen ;) Jedoch musst du einzelne Photonen erzeugen und messen können ;))
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 22.06.05 22:19 
Das nennt sich dann auch quantenkryptographie, ist zwar 100%ig sicher, wenn gut gemacht, aber leider recht kompliziert, wie man aus delphifans post rauslesen konnte... :roll: tja. mit einem zufälligen one time pad ist allerdings jeder symetrische algo 100%ig sicher... und in sofern würde es auch ein simples text:=text+char(byte(ord(passwort[i])+(plaintext[i]))); tun... ^^
was ich ja ganz witzig finde ist
ausblenden Delphi-Quelltext
1:
2:
3:
asm
ror eax, lc
end;

aber sicherer als ein + ist es nicht ^^

Was AES betrifft: ich glaube, ohne es zu wissen, dass ein solcher algo etwas länger ist, als der gepostete source... oder auch nicht, aber aes ist sicher asymetrisch, und da diese variante mit einem key arbeitet, vermute ich, dass sie symetrisch ist. Ist also höchstwahrscheinlich etwas anderes.

Man bedenke: die sicherheit eines algorithmuses sollte nicht auf seiner geheimhaltung beruhen. Man sollte ihn genauso schwer entschlüsseln können, wenn er bekannt ist... ^^

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 22.06.05 22:48 
user profile iconJayEff hat folgendes geschrieben:
Was AES betrifft: ich glaube, ohne es zu wissen, dass ein solcher algo etwas länger ist, als der gepostete source... oder auch nicht, aber aes ist sicher asymetrisch, und da diese variante mit einem key arbeitet, vermute ich, dass sie symetrisch ist. Ist also höchstwahrscheinlich etwas anderes.

AES = Advanced Encryption Standard - und diesen Standard stellt moment an der Algorithmus "Rijandel" dar, welcher sehr wohl symmetrisch ist. Der oben gepostete Code ist aber ganz sicher nicht Rijandel!! ;)

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

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 22.06.05 23:25 
tatsächlich? ich dachte die symetrischen algos sind "out", seit es die asymmetrischen gibt. Diese sind ja nun schon etwas sicherer, oder? aber gut, wäre ja möglich dass dann der Symetrische schlüssel asymetrisch verschlüsselt übertragen wird oder sowas. nun ja, wie auch immer, dass das nicht aes war, hatte ich so im gefühl ;)

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 23.06.05 00:00 
Warum sollten symmetrische Verfahren out sein?? Symmetrische und Asymmetrische Verfahren sind grundverschieden und werden für gänzlich unterschiedliche Aufgaben eingesetzt. Jedes Verfahren hat Vor- und Nachteile gegenüber dem andren, daher sind sowohl symmetrische als auch asymmetrische Verfahren wichtig!
Am besten du liest dir mal meine Fachbereichsarbeit zum Thema Public-Key-Kryptographie durch: www.manuel-poeter.de

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Leifcp
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Mo 21.11.05 00:23 
Danke Böser Borstel für den schönen Code, eignet sich sehr gut, um Dateinamen zu verschlüsseln...

Hier die Entschlüsselung:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
function HexToInt(s: string): Longword; // Source of this function is Torry.net
var
  b: Byte;
  c: Char;
begin
  Result := 0;
  s := UpperCase(s);
  for b := 1 to Length(s) do
  begin
    Result := Result * 16;
    c := s[b];
    case c of
      '0'..'9': Inc(Result, Ord(c) - Ord('0'));
      'A'..'F': Inc(Result, Ord(c) - Ord('A') + 10);
      else
        raise EConvertError.Create('No Hex-Number');
    end;
  end;
end;

function DecPw(const APassword: String): String;
const  
  Key = 'MoISenbÖ53rBorST3LBoeHNicken'
var
  c,e, b1: Integer;
  a,b, Username: String;
begin
 result := '';
 e := 0;
 UserName := Key;
 while Length(Username) < round(length(APassword)/2) + 1 do
  Username := Username + Username;
 for c:= 1 to round(length(APassword)/2do begin
  UserName[c] := Chr(Ord(UserName[c]) shl (Ord(UserName[c+1]) mod 3) + c);
  b := APassword[c+e]+APassword[c+e+1];
  b1 := hextoint(b);
  if c Mod 2 = 0 then
   b1 := b1 - Ord(UserName[c])
  else
   b1 := b1 + Ord(UserName[c]);
  while b1 < 0 do
   b1 := b1 + 255;
  while b1 > 255 do
   b1 := b1 - 255;
  a := a + chr(b1);
  inc(e);
 end;
 result := a;
end;