
跪求C语言高手帮忙做2道题目,非常紧急非常重要,请高手帮帮我 20
1.WriteaprogramtoimplementthekeygeneratoroftheS-DESsystem.Theinputis10bitsbinary,theo...
1.Write a program to implement the key generator of the S-DES system. The input is 10
bits binary, the outputs are two 8 bits keys.
Sample test data:
10 bits input: 1001010001, K1=10010011, K2=00101001
10 bits input: 1010000010, K1=10100100, K2=01000011
2.Write a program to implement the Die-Hellman Key Exchange Scheme. The inputs are
p, xA and xB in decimal, the output is the key in decimal as well. You need to write your
own program to decide if the inputs are reasonable. You are also required to write your
own procedure to nd the primitive root g of p. All modular calculations are required to
use the square and multiple algorithm.
Sample test data:
p:97, g:5, xA:36, xB:58, key=75
p:7, g:3, xA:2, xB:5, key=4 展开
bits binary, the outputs are two 8 bits keys.
Sample test data:
10 bits input: 1001010001, K1=10010011, K2=00101001
10 bits input: 1010000010, K1=10100100, K2=01000011
2.Write a program to implement the Die-Hellman Key Exchange Scheme. The inputs are
p, xA and xB in decimal, the output is the key in decimal as well. You need to write your
own program to decide if the inputs are reasonable. You are also required to write your
own procedure to nd the primitive root g of p. All modular calculations are required to
use the square and multiple algorithm.
Sample test data:
p:97, g:5, xA:36, xB:58, key=75
p:7, g:3, xA:2, xB:5, key=4 展开
4个回答
展开全部
到底是通过什么方式产生KEY的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
关注,期待高手
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
召唤E问高手
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
hjk
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询