Deutsch
Forum

MD5-Checksummen

 
- Seite 1 -



Jac
de
Lad
Kann mir jemand sagen ob und wie ich MD5-Checksummen von Speicherbereichen erstellen kann?

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
25.11.2005  
 



 
- Seite 2 -


Bedarf ist da, sehr interessantes Thema...
 
06.12.2005  
 




Jac
de
Lad
Jaja, ich weiß. Aber allein, dass die Möglichkeit des Knackens/umgehens... besteht ist erschreckend!

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
06.12.2005  
 



...was sich vielleicht relativiert wenn Du weißt das ca. ~1.000.000.000 Computer gleichzeitig ca. 1.000.000.000 Jahre dafür rechnen müssten.
 
06.12.2005  
 




Michael
Wodrich
Nein, lies doch mal bei Wikipedia nach (Link ist weiter oben). Es haben schon mehrere Teams geschafft Doppelhashes zu finden.

Dort steht aber auch, daß dafür ein sehr hoher Aufwand betrieben wurde und MD5 immer noch als sicher gilt.

Zu Hause schlummert das fertige Teil - werds morgen früh mal über die Leitung schieben (ist aber noch ungetestet).

Schöne Grüße
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
07.12.2005  
 




Michael
Wodrich
Ich hoffe, das ich bei der Umsetzung nicht allzuviel Mist gebaut habe



(ungetestet)
KompilierenMarkierenSeparieren
;;
;; MD5mac.inc
;;
MD5RESULT		STRUCT
dtA		dd	?
dtB		dd	?
dtC		dd	?
dtD		dd	?
MD5RESULT		ENDS
MD5magic MACRO mag,dt_a,dt_b,dt_c,dt_d,x,s,t   ; a = b + ((a + mag(b,c,d) + x + t) << s )
mov eax,dt_b
mov ebx,dt_c
mov ecx,dt_d

.IF mag == 1

    ;; F(b,c,d) == (b and c) or ((not b) and d)
    and ebx,eax  ;; (b and c)
    not eax      ;; (not b)
    and eax,ecx  ;; ((not b) and d)
    or  eax,ebx  ;; (b and c) or ((not b) and d) == F(b,c,d)
    .ELSIF mag == 2
    ;; G(b,c,d) == (b and d) or (c and (not d))
    and eax,ecx  ;; (b and d)
    not ecx      ;; (not d)
    and ecx,ebx  ;; (c and (not d))
    or  eax,ecx  ;; (b and d) or (c and (not d)) == G(b,c,d)
    .ELSIF mag == 3
    ;; H(b,c,d) == b xor c xor d
    xor eax,ebx  ;; b xor c
    xor eax,ecx  ;; b xor c xor d == H(b,c,d)
    .ELSIF mag == 4
    ;; I(b,c,d) == c xor (b or (not d))
    not ecx       ;; (not d)
    or  eax,ecx   ;; (b or (not d))
    xor eax,ebx   ;; c xor (b or (not d)) == I(b,c,d)

.ENDIF

add eax,dt_a  ;; a + H(b,c,d)
add eax,x     ;; a + H(b,c,d) + x
add eax,t     ;; a + H(b,c,d) + x + t
mov cl,s
rol eax,cl    ;; (a + H(b,c,d) + x + t) << s
add eax,dt_b  ;; b + ((a + H(b,c,d) + x + t) << s)
mov dt_a,eax
ENDM

KompilierenMarkierenSeparieren
MD5hash.prf
 {$cliq}
 $I MD5mac.inc
Struct MD5 = A&,B&,C&,D&
Declare MD5#,MD5adr&
Dim MD5#,MD5
MD5adr& = Addr(MD5#)

If 0

    Declare mErg&,m&,a&,b&,c&,d&,x&,s&,t&
    Declare PufferAdr&,PufferLen&,MD5adr&
    ;;
    ;; MD5hash( Puffer#, SizeOf(Puffer#), MD5adr& )

    AsmStart MD5hash(PufferAdr&,PufferLen&,MD5adr&)

        LOCAL dta:DWORD
        LOCAL dtb:DWORD
        LOCAL dtc:DWORD
        LOCAL dtd:DWORD
        ;
        ; phase I · padding
        mov edi,Para1
        mov eax,Para2
        inc eax
        add edi,eax  ;; Zeiger hinter den String
        mov byte ptr [edi-1],080h
        xor edx,edx
        mov ebx,64
        div ebx
        neg edx
        add edx,64
        cmp edx,8
        jae @f
        add edx,64
        @@:
        mov ecx,edx
        xor al,al
        rep stosb
        mov eax,Para2
        inc edx
        add Para2,edx
        xor edx,edx
        mov ebx,8
        mul ebx
        mov dword ptr [edi-8],eax
        mov dword ptr [edi-4],edx
        mov edx,Para2
        mov edi,Para1
        ;
        ; phase II · chaining variables initialization
        mov esi,Para3
        assume esi:ptr MD5RESULT
        mov [esi].dtA,067452301h
        mov [esi].dtB,0efcdab89h
        mov [esi].dtC,098badcfeh
        mov [esi].dtD,010325476h
        ;
        ; phase III · hashing
        hashloop:
        mov eax,[esi].dtA
        mov dta,eax
        mov eax,[esi].dtB
        mov dtb,eax
        mov eax,[esi].dtC
        mov dtc,eax
        mov eax,[esi].dtD
        mov dtd,eax
        ;
        ; round 1
        MD5magic 1,dta,dtb,dtc,dtd,dword ptr [edi+00*4],07,0d76aa478h
        MD5magic 1,dtd,dta,dtb,dtc,dword ptr [edi+01*4],12,0e8c7b756h
        MD5magic 1,dtc,dtd,dta,dtb,dword ptr [edi+02*4],17,0242070dbh
        MD5magic 1,dtb,dtc,dtd,dta,dword ptr [edi+03*4],22,0c1bdceeeh
        MD5magic 1,dta,dtb,dtc,dtd,dword ptr [edi+04*4],07,0f57c0fafh
        MD5magic 1,dtd,dta,dtb,dtc,dword ptr [edi+05*4],12,04787c62ah
        MD5magic 1,dtc,dtd,dta,dtb,dword ptr [edi+06*4],17,0a8304613h
        MD5magic 1,dtb,dtc,dtd,dta,dword ptr [edi+07*4],22,0fd469501h
        MD5magic 1,dta,dtb,dtc,dtd,dword ptr [edi+08*4],07,0698098d8h
        MD5magic 1,dtd,dta,dtb,dtc,dword ptr [edi+09*4],12,08b44f7afh
        MD5magic 1,dtc,dtd,dta,dtb,dword ptr [edi+10*4],17,0ffff5bb1h
        MD5magic 1,dtb,dtc,dtd,dta,dword ptr [edi+11*4],22,0895cd7beh
        MD5magic 1,dta,dtb,dtc,dtd,dword ptr [edi+12*4],07,06b901122h
        MD5magic 1,dtd,dta,dtb,dtc,dword ptr [edi+13*4],12,0fd987193h
        MD5magic 1,dtc,dtd,dta,dtb,dword ptr [edi+14*4],17,0a679438eh
        MD5magic 1,dtb,dtc,dtd,dta,dword ptr [edi+15*4],22,049b40821h
        ;
        ; round 2
        MD5magic 2,dta,dtb,dtc,dtd,dword ptr [edi+01*4],05,0f61e2562h
        MD5magic 2,dtd,dta,dtb,dtc,dword ptr [edi+06*4],09,0c040b340h
        MD5magic 2,dtc,dtd,dta,dtb,dword ptr [edi+11*4],14,0265e5a51h
        MD5magic 2,dtb,dtc,dtd,dta,dword ptr [edi+00*4],20,0e9b6c7aah
        MD5magic 2,dta,dtb,dtc,dtd,dword ptr [edi+05*4],05,0d62f105dh
        MD5magic 2,dtd,dta,dtb,dtc,dword ptr [edi+10*4],09,002441453h
        MD5magic 2,dtc,dtd,dta,dtb,dword ptr [edi+15*4],14,0d8a1e681h
        MD5magic 2,dtb,dtc,dtd,dta,dword ptr [edi+04*4],20,0e7d3fbc8h
        MD5magic 2,dta,dtb,dtc,dtd,dword ptr [edi+09*4],05,021e1cde6h
        MD5magic 2,dtd,dta,dtb,dtc,dword ptr [edi+14*4],09,0c33707d6h
        MD5magic 2,dtc,dtd,dta,dtb,dword ptr [edi+03*4],14,0f4d50d87h
        MD5magic 2,dtb,dtc,dtd,dta,dword ptr [edi+08*4],20,0455a14edh
        MD5magic 2,dta,dtb,dtc,dtd,dword ptr [edi+13*4],05,0a9e3e905h
        MD5magic 2,dtd,dta,dtb,dtc,dword ptr [edi+02*4],09,0fcefa3f8h
        MD5magic 2,dtc,dtd,dta,dtb,dword ptr [edi+07*4],14,0676f02d9h
        MD5magic 2,dtb,dtc,dtd,dta,dword ptr [edi+12*4],20,08d2a4c8ah
        ;
        ; round 3
        MD5magic 3,dta,dtb,dtc,dtd,dword ptr [edi+05*4],04,0fffa3942h
        MD5magic 3,dtd,dta,dtb,dtc,dword ptr [edi+08*4],11,08771f681h
        MD5magic 3,dtc,dtd,dta,dtb,dword ptr [edi+11*4],16,06d9d6122h
        MD5magic 3,dtb,dtc,dtd,dta,dword ptr [edi+14*4],23,0fde5380ch
        MD5magic 3,dta,dtb,dtc,dtd,dword ptr [edi+01*4],04,0a4beea44h
        MD5magic 3,dtd,dta,dtb,dtc,dword ptr [edi+04*4],11,04bdecfa9h
        MD5magic 3,dtc,dtd,dta,dtb,dword ptr [edi+07*4],16,0f6bb4b60h
        MD5magic 3,dtb,dtc,dtd,dta,dword ptr [edi+10*4],23,0bebfbc70h
        MD5magic 3,dta,dtb,dtc,dtd,dword ptr [edi+13*4],04,0289b7ec6h
        MD5magic 3,dtd,dta,dtb,dtc,dword ptr [edi+00*4],11,0eaa127fah
        MD5magic 3,dtc,dtd,dta,dtb,dword ptr [edi+03*4],16,0d4ef3085h
        MD5magic 3,dtb,dtc,dtd,dta,dword ptr [edi+06*4],23,004881d05h
        MD5magic 3,dta,dtb,dtc,dtd,dword ptr [edi+09*4],04,0d9d4d039h
        MD5magic 3,dtd,dta,dtb,dtc,dword ptr [edi+12*4],11,0e6db99e5h
        MD5magic 3,dtc,dtd,dta,dtb,dword ptr [edi+15*4],16,01fa27cf8h
        MD5magic 3,dtb,dtc,dtd,dta,dword ptr [edi+02*4],23,0c4ac5665h
        ;
        ; round 4
        MD5magic 4,dta,dtb,dtc,dtd,dword ptr [edi+00*4],06,0f4292244h
        MD5magic 4,dtd,dta,dtb,dtc,dword ptr [edi+07*4],10,0432aff97h
        MD5magic 4,dtc,dtd,dta,dtb,dword ptr [edi+14*4],15,0ab9423a7h
        MD5magic 4,dtb,dtc,dtd,dta,dword ptr [edi+05*4],21,0fc93a039h
        MD5magic 4,dta,dtb,dtc,dtd,dword ptr [edi+12*4],06,0655b59c3h
        MD5magic 4,dtd,dta,dtb,dtc,dword ptr [edi+03*4],10,08f0ccc92h
        MD5magic 4,dtc,dtd,dta,dtb,dword ptr [edi+10*4],15,0ffeff47dh
        MD5magic 4,dtb,dtc,dtd,dta,dword ptr [edi+01*4],21,085845dd1h
        MD5magic 4,dta,dtb,dtc,dtd,dword ptr [edi+08*4],06,06fa87e4fh
        MD5magic 4,dtd,dta,dtb,dtc,dword ptr [edi+15*4],10,0fe2ce6e0h
        MD5magic 4,dtc,dtd,dta,dtb,dword ptr [edi+06*4],15,0a3014314h
        MD5magic 4,dtb,dtc,dtd,dta,dword ptr [edi+13*4],21,04e0811a1h
        MD5magic 4,dta,dtb,dtc,dtd,dword ptr [edi+04*4],06,0f7537e82h
        MD5magic 4,dtd,dta,dtb,dtc,dword ptr [edi+11*4],10,0bd3af235h
        MD5magic 4,dtc,dtd,dta,dtb,dword ptr [edi+02*4],15,02ad7d2bbh
        MD5magic 4,dtb,dtc,dtd,dta,dword ptr [edi+09*4],21,0eb86d391h
        ;
        mov eax,dta
        add [esi].dtA,eax
        mov eax,dtb
        add [esi].dtB,eax
        mov eax,dtc
        add [esi].dtC,eax
        mov eax,dtd
        add [esi].dtD,eax
        add edi,64
        sub edx,64
        jnz hashloop
        ;
        ; phase IV · results
        mov ecx,4
        @@:
        mov eax,dword ptr [esi]
        xchg al,ah
        rol eax,16
        xchg al,ah
        mov dword ptr [esi],eax
        add esi,4
        loop @b

    AsmEnd()

EndIf

 
Programmieren, das spannendste Detektivspiel der Welt.
07.12.2005  
 




Jac
de
Lad
Irgendwie klappt das bei mir nicht...

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
10.12.2005  
 



Nun, um die Thematik zu beenden: [...] 
 
04.03.2006  
 



 
- Seite 3 -



Jac
de
Lad
Das ist wunderbar! Funktioniert auch gut. Aber wäre es vielleicht möglich die DLL extra zu speichern? Damit das Profan-Prog nicht so groß wird. Und ist es möglich MD5-Checksummen von Bereichen zu erstellen? Ich will nämlich Checksummen von Dateien bilden!

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
04.03.2006  
 



Klar - kein Problem.

Sprich es einfach etwas später nochmal an bitte.
 
04.03.2006  
 



Ich habe der neuen Version beigebracht Summen auch von Dateiinhalten errechnen zu können.
 
04.03.2006  
 




Jac
de
Lad
DANKE!!!

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
05.03.2006  
 




Jac
de
Lad
Hm, funktioniert gut, aber ich meinte wirklich Bereiche, weil ich zum Beispiel Checksummen von Dateiteilen erstellen will. Könnteste das eventuell auch noch einrichten???*Ningel*Und gehts vielleicht doch die DLL extra dazuzupacken???*ningel*ich finds immer schlimm, wenn sich die XProfan-Dateien durch DLLs so aufblähen (und hier ists grad jede Menge!).

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
10.03.2006  
 




Antworten


Thementitel, max. 100 Zeichen.
 

Systemprofile:

Kein Systemprofil angelegt. [anlegen]

XProfan:

 Beitrag  Schrift  Smilies  ▼ 

Bitte anmelden um einen Beitrag zu verfassen.
 

Themenoptionen

3.145 Betrachtungen

Unbenanntvor 0 min.
Walter20.11.2022
Member 361000504.08.2022
RudiB.27.10.2021
Sven Bader10.09.2021
Mehr...

Themeninformationen



Admins  |  AGB  |  Anwendungen  |  Autoren  |  Chat  |  Datenschutz  |  Download  |  Eingangshalle  |  Hilfe  |  Händlerportal  |  Impressum  |  Mart  |  Schnittstellen  |  SDK  |  Services  |  Spiele  |  Suche  |  Support

Ein Projekt aller XProfaner, die es gibt!


Mein XProfan
Private Nachrichten
Eigenes Ablageforum
Themen-Merkliste
Eigene Beiträge
Eigene Themen
Zwischenablage
Abmelden
 Deutsch English Français Español Italia
Übersetzungen

Datenschutz


Wir verwenden Cookies nur als Session-Cookies wegen der technischen Notwendigkeit und bei uns gibt es keine Cookies von Drittanbietern.

Wenn du hier auf unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung von Informationen in unseren Cookies auf XProfan.Net zu.

Weitere Informationen zu unseren Cookies und dazu, wie du die Kontrolle darüber behältst, findest du in unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Ich möchte keinen Cookie