Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ���ܵ�Сʨ
Sat, 18 Apr 1998 00:00
��̸DES�㷨��Ӧ�ò�RSA�����㷨
Author: ���ܵ�Сʨ
Date: Sat, 18 Apr 1998 00:00
Date: Sat, 18 Apr 1998 00:00
95 lines
8437 bytes
8437 bytes
DES�㷨
DES�㷨��1975��3��IBM��˾���������,1977��,�����ұ�
��(ANSI)�������ڷǹ�ұ��ܻ��,�����˹���ȫ�������㷨������
���䰲ȫ��һֱ�����ǹ��ĵ��ȵ�,���������ұ��־ͳ�����ר
���о�С������о�,1978�깫�����о�������Ϊ,10��15����DES��
���İ�ȫ�Բ������⡣
�����ѹ���20��,��˵��û�п�������DES�����㷨�ı���,����
�Ƕ�DES��ȫ�ԵĹ���һֱ���ڡ���������˹̹����ѧ���о�С����
ΪS�е������Ȼ�������Ե�,Ȼ��Ҳ��������,�ƺ������ijһ��
Ŀ�Ķ���Ƶ�,���ܻ����������㡣��Ȼÿ�����һ�������Կ�ļ�
���Ҫ����ȫ����Կ��2285��,��һ����̨�������й���,������һ̨
ÿ��1012����Կ��ר�û��������������,����һ��Ϳ�����,����
���������Ѿ���ת��ʹ����Կ����Ϊ128λ�Ĺ����ݼ����㷨IDE
A(International Data Encryption Algorithm),���DES�㷨Ҫ��ȫ
�ö�,��ֻʹ��8�ε������,��ʹ��16�ε�������DES�㷨���ٶ���
Ҳ����ѷɫ��
DES�㷨Ŀǰ���й����û�,��ͨ����Ӧ�ö�����RSA�㷨����
���,�����ȶԱ���M����������У��(Message Integrity Check),��
��Ψһ�ı��������Կ�����MICO,�ٲ���8��7 bit�Ķ����������,��
ͬÿ���У��λ����64bit����������Ϊ����M��DES�㷨��ԿK,�Ա�
��M�����������C,����K��RSA�㷨������Ϊ����ͷ���ĵ�һ����,
��MICO��RSA�㷨���е���ǩ����ټ�����Ϊ����ͷ���ĵڶ�����,��
������C��ǰ��,ͬʱ���͡����շ����յ����ĺ�,��RSA�㷨����K��M
ICO,ͬʱͨ����ܵ���ǩ��ȷ�������������,������ԿK������C ��
DES�㷨���ܵõ�����M,�Ա���M����������У��ñ��������Կ�����
MIC,����MIC�Ƿ���MICO�����ȷ�ϱ��ĵ������ԡ�
Ӧ�ر�ָ������,DES�㷨��û�й�6������˵��"Ӧ������",
64bit�����ƿ���8��b ytes,ÿ��byteΪ8bit,ͨ����Ϊλ0��λ7,��
������������,�����˵,64bitӦ���г�һ��8 ��8�еľ���,��ͨ��
����ͬ�����������������ŷ�Ϊ�������϶���,������������,��
0 x0��0x1��0x2��0x4��0x8��0x10��0x20��0x40,��8���ֽڹ��ɵ�64
bit����Ϊ:
�ڵڵڵڵڵڵڵ�
I, J��8 7 6 5 4 3 2 1
�� ����������������
��1�� 0 0 0 0 0 0 0 0����0x0 �� 1byte
��2�� 0 0 0 0 0 0 0 1����0x1 �� 2byte
��3�� 0 0 0 0 0 0 1 0����0x2 �� 3byte
��4�� 0 0 0 0 0 1 0 0����0x4 �� 4byte
��5�� 0 0 0 0 1 0 0 0����0x8 �� 5byte
��6�� 0 0 0 1 0 0 0 0����0x10 �� 6byte
��7�� 0 0 1 0 0 0 0 0����0x20 �� 7byte
��8�� 0 1 0 0 0 0 0 0����0x40 �� 8byte
λλλλλλλλ
7 6 5 4 3 2 1 0
�������С��зֱ���I��J��ʾ,��64bitÿλ���Ӧ��λ��Z��I
��J�Ĺ�ϵΪ:
Z=J+(I-1)*8
DES�㷨�еĵ�8��16��24��32��40��48��56��64λ��Ϊ����ͨ��
���ʾ�ĸ��ֽڵ�λ7 ,λ7ͨ����������+/-���,����DES�㷨����
Կ��������Ϊ��żУ��λ,ȥ�����Dz���Լӡ������γ��κ�"Ӧ����
��",�ձ���ֻ��������Щλ����ԿK����У��,�����ЩλȫΪ0,һ��
˵��û�ж���ԿK������żУ��,�����Ҫ����8���ֽ�ȫ��������ż
У��,�����Ƿ�һ��,�粻һ�¾�˵����ԿK�ڴ������д?��ν"Ӧ��
����"�����ڴ�����λ��˳�����¡�
RSA�㷨
RSA�����㷨��ȫ�����һ��������Կ����ϵͳ,����Rivet��Sha
mir��Adleman������1 978������ġ�RSA�㷨���õ���һЩ����:
1.����p��q(���ܵ�);
2.n=p*q(������);
3.��(n)=(p-1)*(q-1)(���ܵ�);
4.������Կe(������)Ҫ����0��e����(n),��e�ͦ�(n)�����
Լ��Ϊ1(����);
5.������Կd(���ܵ�)Ҫ����0��d����(n),��d*e mod ��(n)=1(m
od��ģ����,Ҳ��ȡ������)��
�����M�������,C�������,E(M)�������������,D(C)��
������Ľ�������,����:
E(M)=M^e mod n=C
D(C)=C^d mod n=M
RSA�㷨��ȫ�Ե����ۻ��Ǵ�������ӷֽ���������û�кܺ�
���㷨,���e��n�������p��q��d��RSA�㷨Ҫ��p��q��������
���������(����100λʮ������)�ҳ������Ƚ�С��
����ǩ��
����֪���ڹ�����Կ������ϵ��,���ڹ��������벾(�������)
�в鵽�û�A�Ĺ�����ԿnA��eA,��������ԿdAֻ���û�A�Լ���֪��
���û�AҪ���û�B��һ��ǩ�����ϢM,�����û�A�����Լ��Ľ�����
ԿdA������M�������ǩ������FA:
DA(M)=M^dA mod nA=FA
Ϊȷ��ֻ���û�B����֪��������,�����û�B�ļ�����ԿnB��eB
��FA�����������:
EB(FA)=FA^eB mod nB=C
�û�B�յ��û�A������C����н���:
DB(C)=C^dB mod nB=FA
֪�����û�A��ǩ������,���������û�A�ļ�����Կ����:
EA(FA)=FA^eA mod nA=M
�����û�B֪��ֻ���û�A���ܰ�����M�������FA,��Ϳ���ȷ��
�������û�A�����ġ����ּ��ܷ���������Ϊ�û�A��ݵ�˵��,���
��������ǩ��
RSA�㷨�İ�ȫ�Ա�DES�㷨�ߵö�,�����������ʱԼ��DES�㷨
��100��,���߽��ʹ��,�����ﳤ�ܶ�,������á�
--
[m[1;32m�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: hsia.nju.edu.cn][m
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads