题目
Mr. Anshel and Mr. Goldfeld were trying to exchange some asymmetric keys to get a shared key. They aren't very good at math, so they decided to use a Rubik's Cube instead to do the crypto. I don't think it's very secure though, I think you might be able to guess some of their keys :hmm:
Mr. A public key: [B' U', F B F, R' D, B D']
Mr. G public key: [R D L', D U' B, U F', L' F]
Mr. A sends: [B D' R' D R D L' D' R D B', B D' R' D D U' B D' R D B', B D' R' D U F' D' R D B', B D' R' D L' F D' R D B']
Mr. G sends: [U F' R D L' B' U' L D' R' F U', U F' R D L' F B F L D' R' F U', U F' R D L' R' D L D' R' F U', U F' R D L' B D' L D' R' F U']
Anshel–Anshel–Goldfeld key exchange
由上图可知,Alice的公钥是a组成的元组,私钥是a和它的逆组成的序列
Bob的公钥是b组成的元组,,私钥是b和它的逆组成的序列
他们的共享密钥e=A-1 B-1 A B
由于协议基于非阿贝尔群,所以不满足交换
通过Alice与Bob发出的信息,我们可以很容易的看出A-1 A B-1 B
flag即为共同密钥e
解题
(a1, a2, a3)=[B' U', F B F, R' D, B D']
(B-1 a1 B,B-1 a2 B,B-1 a3 B,B-1 a4 B)=[U F' R D L' B' U' L D' R' F U', U F' R D L' F B F L D' R' F U', U F' R D L' R' D L D' R' F U', U F' R D L' B D' L D' R' F U']
联立->
B-1 = U F' R D L'
B=L D' R' F U'
同理求得A A-1