I want to add RSA and RC5 functions into the 3ui's wtls package. I use the fake_wtls
(as client) and wtls_box(as server) to test my modification. When two sides are
compute the master_secret, calling the function in Openssl-0.9.5a
HMAC(EVP_sha1(),secret,secret_len,seed,seed_len,a,&t_len);
the "secret" and "seed" are same in two sides, but the results of "a" are different.
And, if I run the client and server another time, the results of "a" are different
with the last time.
Who can tell me why?
CLIENT:
---------------------
secret's fragment at 8079318.
length: 155 bytes.
data: 01 14 13 e9 e2 2d 51 8e 1f 56 08 57 27 a7 05 -Q V W'
data: d4 d0 52 82 77 00 03 01 00 01 00 80 e4 40 38 R w @8
data: d3 06 27 bc 49 3b b1 2b 65 8f e1 a6 a2 93 24 ' I; +e $
data: 53 1d 46 a9 85 33 14 a0 4b d6 02 60 a9 be 05 S F 3 K `
data: 72 c0 3d eb 30 c3 74 46 f9 af ee d9 4b 2d 8c r = 0 tF K-
data: 96 bd ef ae cb 31 70 a9 35 b3 e8 29 6e 5e ad 1p 5 )n^
data: 3b 4d 6e 90 65 c9 0b ca 06 da 5f b6 1e 70 02 ;Mn e _ p
data: e4 d3 df a0 1b 60 0a 33 24 ff bf b9 73 73 2d ` 3$ ss-
data: e1 4a d8 70 1e b7 3b 1c 5e bb a4 a8 a8 6d 43 J p ; ^ mC
data: 36 1c a5 4e 53 ce e5 cc 0f a8 77 2f 4c 8a 3d 6 NS w/L =
data: 0d b3 09 59 e5 Y
---------------------
---------------------
seed's fragment at 8079660.
length: 45 bytes.
data: 6d 61 73 74 65 72 20 73 65 63 72 65 74 39 6a master secret9j
data: 17 85 67 c6 69 73 51 ff 4a ec 29 cd ba ab 39 g isQ J ) 9
data: 6a 17 85 67 c6 69 73 51 ff 4a ec 29 cd ba ab
---------------------
---------------------
a's fragment at bffefb90.
length: 20 bytes.
data: 68 7a 88 a5 ef 81 5e 78 9b a8 0c e1 61 96 63 hz ^x a c
data: 7a a7 60 ab d1 z `
---------------------
SERVER:
---------------------
secret's fragment at 807c588.
length: 155 bytes.
data: 01 14 13 e9 e2 2d 51 8e 1f 56 08 57 27 a7 05 -Q V W'
data: d4 d0 52 82 77 00 03 01 00 01 00 80 e4 40 38 R w @8
data: d3 06 27 bc 49 3b b1 2b 65 8f e1 a6 a2 93 24 ' I; +e $
data: 53 1d 46 a9 85 33 14 a0 4b d6 02 60 a9 be 05 S F 3 K `
data: 72 c0 3d eb 30 c3 74 46 f9 af ee d9 4b 2d 8c r = 0 tF K-
data: 96 bd ef ae cb 31 70 a9 35 b3 e8 29 6e 5e ad 1p 5 )n^
data: 3b 4d 6e 90 65 c9 0b ca 06 da 5f b6 1e 70 02 ;Mn e _ p
data: e4 d3 df a0 1b 60 0a 33 24 ff bf b9 73 73 2d ` 3$ ss-
data: e1 4a d8 70 1e b7 3b 1c 5e bb a4 a8 a8 6d 43 J p ; ^ mC
data: 36 1c a5 4e 53 ce e5 cc 0f a8 77 2f 4c 8a 3d 6 NS w/L =
data: 0d b3 09 59 e5 Y
---------------------
---------------------
seed's fragment at 807b760.
length: 45 bytes.
data: 6d 61 73 74 65 72 20 73 65 63 72 65 74 39 6a master secret9j
data: 17 85 67 c6 69 73 51 ff 4a ec 29 cd ba ab 39 g isQ J ) 9
data: 6a 17 85 67 c6 69 73 51 ff 4a ec 29 cd ba ab
---------------------
---------------------
a's fragment at bffffac0.
length: 20 bytes.
data: 12 a9 f0 22 2e 09 9d 91 97 0b 2e 4e 95 5a 51 ". .N ZQ
data: 27 95 99 1d f1 '
---------------------
changkun
[EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]