0x01 题目

MSG1:
e55e3e24a3ae7797808fdca05a16ac15eb5fa2e6185c23a814a35ba32b4637c2
MAC1:
0712c867aa6ec7c1bb2b66312367b2c8
-----------------------------------------------------
MSG2:
d8d94f33797e1f41cab9217793b2d0f02b93d46c2ead104dce4bfec453767719
MAC2:
43669127ae268092c056fd8d03b38b5b
-----------------------------------------------------
请输入您的MSG3(64字节,128个Hex,不要添加空格!)(Please input your 64bytes MSG3(64 bytes,128 hexs,don't using space)):

0x02分析

初始 iv 是全零

【1】SM4 CBC-MAC 机制_5e

       既然没有密钥,那么这题肯定是要用现有的信息了。另外注意到,两个消息都是32字节,却让我们给一个64字节的消息,题目已经推着我们把两个消息合并到一起了。

MAC1其实也行)好了,于是我们就需要处理一下拼接处的问题。

p1 :e55e3e24a3ae7797808fdca05a16ac15

p2 :eb5fa2e6185c23a814a35ba32b4637c2

p3 :d8d94f33797e1f41cab9217793b2d0f0

p4 :2b93d46c2ead104dce4bfec453767719

明文 :p1 || p2  || MAC1 XOR P3 || p4  -------》对应MAC值:MAC2

得到最终的消息:e55e3e24a3ae7797808fdca05a16ac15eb5fa2e6185c23a814a35ba32b4637c2dfcb8754d310d88071924746b0d562382b93d46c2ead104dce4bfec453767719

0x03 答案

请输入您的MSG3(64字节,128个Hex,不要添加空格!)(Please input your 64bytes MSG3(64 bytes,128 hexs,don't using space)):
e55e3e24a3ae7797808fdca05a16ac15eb5fa2e6185c23a814a35ba32b4637c2dfcb8754d310d88071924746b0d562382b93d46c2ead104dce4bfec453767719
请输入您的MAC3(Please input your MAC3):
43669127ae268092c056fd8d03b38b5b
-----------------------------------------------------
**恭喜!谜题答案验证正确!(Congratulations!Puzzle verified correctly!)**
下面是您的战利品,请妥善记录后再关闭程序,(Your Spoils of war is follow,Please copy that before shutdown this program!)**
-----------------------------------------------------
Flag:
flag{N1lC9AuYQaPZo68G4ZSkw9PBgTMRFkkh}

-----------------------------------------------------
Gitea User Name:
TFCTEVTION
-----------------------------------------------------
Gitea Password:
#s@f3ty2024
-----------------------------------------------------
请按回车键结束谜题程序(Please press "Enter" key to end)