ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
987
987
EMPFEHLEN
-
30.01.07 16:49 #1
Hellas,
also folgendes Beispiel aus dem RFC2195.
Code :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
Example: The examples in this document show the use of the CRAM mechanism with the IMAP4 AUTHENTICATE command [IMAP-AUTH]. The base64 encoding of the challenges and responses is part of the IMAP4 AUTHENTICATE command, not part of the CRAM specification itself. S: * OK IMAP4 Server C: A0001 AUTHENTICATE CRAM-MD5 S: + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+ C: dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw S: A0001 OK CRAM authentication successful In this example, the shared secret is the string 'tanstaaftanstaaf'. Hence, the Keyed MD5 digest is produced by calculating MD5((tanstaaftanstaaf XOR opad), MD5((tanstaaftanstaaf XOR ipad), <1896.697170952@postoffice.reston.mci.net>)) where ipad and opad are as defined in the keyed-MD5 Work in Progress [KEYED-MD5] and the string shown in the challenge is the base64 encoding of <1896.697170952@postoffice.reston.mci.net>. The shared secret is null-padded to a length of 64 bytes. If the shared secret is longer than 64 bytes, the MD5 digest of the shared secret is used as a 16 byte input to the keyed MD5 calculation. This produces a digest value (in hexadecimal) of b913a602c7eda7a495b4e6e7334d3890 The user name is then prepended to it, forming tim b913a602c7eda7a495b4e6e7334d3890 Which is then base64 encoded to meet the requirements of the IMAP4 AUTHENTICATE command (or the similar POP3 AUTH command), yielding dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
Wie komm ich jetzt, nachvollziehbar, zu diesem base64-codierten Ergebnis:
Code :1
dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
Also, base64 und md5 sind kein Problem, diese Berechnungen macht mir ja eine Systemfunktion. Aber das:
Code :1 2 3
MD5((tanstaaftanstaaf XOR opad), MD5((tanstaaftanstaaf XOR ipad), <1896.697170952@postoffice.reston.mci.net>))
Ist für mich einfach nicht nachvollziehbar... ach ja, in einem anderen RFC hab ich folgendes wegen ipad und opad gefunden:
Code :1 2
ipad = the byte 0x36 repeated B times opad = the byte 0x5C repeated B times
Ich hoffe ihr könnt mir helfen. Ich will einfach nur wissen, welchen String genau ich an meine md5-Funktion übergeben muss.Fann Ég Fjalli Fallega Steina
Faldi Dá Alla Vildi Deim Leyna
Huldi Dar Hellisskúta Heillasteina
Alla Mína Una eth slegu Óskasteina
Ähnliche Themen
-
HTTP-Authentication
Von electron0 im Forum PHPAntworten: 2Letzter Beitrag: 20.05.08, 13:57 -
SMTP Authentication mit PHP
Von Nemec im Forum PHPAntworten: 1Letzter Beitrag: 11.09.05, 18:00 -
Authentication IIS
Von flashOr im Forum Hosting & WebserverAntworten: 0Letzter Beitrag: 28.01.05, 08:12 -
IIS + SQL Authentication
Von flashOr im Forum Hosting & WebserverAntworten: 0Letzter Beitrag: 24.01.05, 12:56 -
mail authentication
Von matzseesi im Forum PHPAntworten: 2Letzter Beitrag: 25.07.04, 01:04





Zitieren
Login





