Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security 如何使用给定的Hashfunction和一些参数计算MAC的密钥?_Security_Key_Ascii - Fatal编程技术网

Security 如何使用给定的Hashfunction和一些参数计算MAC的密钥?

Security 如何使用给定的Hashfunction和一些参数计算MAC的密钥?,security,key,ascii,Security,Key,Ascii,我正在尝试计算消息身份验证码(MAC)的密钥。 现提供以下资料: c_i = h(c_i-1, x_i) = c_i-1 xor x_i for i from 1 to z. Furthermore MAC_k(m) = c_z + key mod 2^8 And now I have These values: m = KINOSAAL (ASCII 8 Bit) MAC_k(m) = 01101011 and c_0 = 11111111 现在我尝试了这种方法,但我确信它一定是错的:(但

我正在尝试计算消息身份验证码(MAC)的密钥。 现提供以下资料:

 c_i = h(c_i-1, x_i) = c_i-1 xor x_i for i from 1 to z.
Furthermore MAC_k(m) = c_z + key mod 2^8
And now I have These values: m = KINOSAAL (ASCII 8 Bit)
MAC_k(m) = 01101011 and c_0 = 11111111
现在我尝试了这种方法,但我确信它一定是错的:(但也许有些方法是正确的,所以如果你们能帮我的话,我会很高兴

K = 4B
I = 49
N = 4E
O = 4F
S = 53
A = 41
A = 41
L = 4C
? = 3F

c0 = 11111111 = FF

MAC_k(m) = 01101011 = 6B

c1 = c0 xor x1 = FF xor 4B = B4
c2 = c1 xor x2 = B4 xor 49 = FD
c3 = c2 xor x3 = FD xor 4E = B3
c4 = c3 xor x4 = B3 xor 4F = FC
c5 = c4 xor x5 = FC xor 53 = AF
c6 = c5 xor x6 = AF xor 41 = EE
c7 = c6 xor x7 = EE xor 41 = AF
c8 = c7 xor x8 = AF xor 4C = E3
c9 = c8 xor x9 = E3 xor 3F = DC  => c_z = DC (hex)

=> k = m xor cz = 6B xor DC = B7 (HEX)
这是我的方法。提前谢谢你,并致以亲切的问候