Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> A newbie revelation: Guacamole is good for the ball-less DA Morgan
Ontruder PartII: The code:
Make a list of all known passwords; a good dictionary would do -- from the OMLET experience - virginia topped the list others like virginiaXXX, yehova, etc and variations like virginia99 are good possibilities:
Now, follow the code for the example scot/tiger and happy crackin'
static CONST_DATA ub4 knownk[2] = {
0x08192a3b,0x4c5d6e7f
};
static CONST_DATA ub4 testk[2] = {
0x25ddac3e, 0x96176467
};
static CONST_DATA ub4 encry[2] = {
0xfbf7f085, 0x9b6a3a7e
};
static CONST_DATA ub1 encrt[16] = {
0x1a, 0xc2, 0xc6, 0xba, 0xa4, 0x35, 0x30, 0xd7, 0x1f, 0x7e, 0x39, 0xe1, 0x82, 0xa9, 0x3f, 0x42};
/*-------------------------------- MAIN --------------------------------*/
this is to allow testing on ebcidic machines although string will not print on these machines */ static CONST ub1 passwd[] = { 0x74, 0x69, 0x67, 0x65, 0x72, 0x74, 0x69, 0x67, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
DISCARD printf("=== Password Encryption Test\n\n"); DISCARD printf("start string (in Ascii): %s\n\n", (char *)passwd);
/* what is the result for password? */ len = kzsrenp(result, passwd, passwdlen, knownk);
DISCARD printf("Expected cipher for pasword tiger: 1A C2 C6 BA A4 35
30 D7 1F 7E 39 E1 82 A9 3F 42\n");
DISCARD printf("Actual cipher for pasword tiger: ");
for (j = 0; j<len; j++)
DISCARD printf("%02X ",(unsigned)result[j] & 0xff); DISCARD printf("\n\n");
if (memcmp(result, encrt, passwdlen) == 0)
DISCARD printf("Password cipher text CORRECT\n\n");
else
DISCARD printf("*** Password cipher text FAILED ***\n\n");
len = kzsrdep(unresult, result, len, knownk);
DISCARD printf("result for decryption: %.*s\n\n",
(int)len, (char *)unresult);
if (memcmp(unresult, passwd, passwdlen) == 0)
DISCARD printf("Password encryption Test PASSED\n\n");
else
DISCARD printf("*** Password encryption Test FAILED ***\n\n");
/* test encryption of 64 bit keys and back */
in[0] = testk[0];
in[1] = testk[1];
DISCARD printf("=== Key Encryption Test\n\n");
DISCARD printf("Initial Key: %02X %02X\n\n", in[0], in[1]);
/* encrypt */
kzsrenc(in, out, knownk);
DISCARD printf("Expected cipher for pasword tiger: FBF7F085
9B6A3A7E\n");
DISCARD printf("Actual Cipher for Key: %02X %02X\n\n", out[0],
out[1]);
if (encry[0] == out[0] && encry[1] == out[1])
DISCARD printf("Encrypted cipher text CORRECT\n\n");
else
DISCARD printf("*** Encrypted cipher text FAILED ***\n\n");
/* null out in paramter */
in[0] = 0;
in[1] = 0;
kzsrdec(out, in, knownk);
DISCARD printf("Decrypted Key: %02X %02X\n\n", in[0], in[1]);
/* test to see if initial is same as out of decryption */
if (testk[0] == in[0] && testk[1] == in[1])
DISCARD printf("Key encryption Test PASSED\n\n");
else
DISCARD printf("*** Key encryption Test FAILED ***\n");
return(EX_SUCC);
}
DonBurlesonIsASackOfManur wrote:
> Oracle's Password Transform
> >
>
> >
> >
>
> >
>
> >
>
> >
> >
>
> >
> >
> k1 = checksum( k0, U || P )
> k2 = checksum( k1, U || P )
> >
>
> >
![]() |
![]() |