信息加密与解密

实训背景
“密码”或“加密系统”用于“加密”数据。
对于原始的未加密的数据,我们称之为“明文”。
对于加密的结果,我们称之为“密文”。
通过称为“解密”的过程,我们把密文恢复成原始的明文。
古典密码算法历史上曾被广泛应用,大都比较简单,使用手工和机械操作来实现加密和解密。它的主要应用对象是文字信息,利用密码算法实现文字信息的加密和解密。古典密码学的两种加密思路如下:
1. 替换密码
简单替换密码加密是通过将当前字母替换为在常规字母表中第n个位置之后的那个字母来完成的。较复杂的替换密码是为字母表建立映射关系,由此可以产生更大的密钥空间。
2. 换位密码
换位密码不对任何明文内容进行替换,而是通过换位(打乱顺序)的方法进行加密。典型的换位密码是双换位密码,这种加密方案首先要将明文写在一个给定大小的矩阵中,然后对行和列依据特定的序列进行置换操作。
混淆(confusion):使密文与密钥的关系尽可能复杂化,使得对手即使获取了许多明文和对应的密文,以及关于密文的一些统计特性,也无法推测密钥。
扩散(diffusion):让明文中的每一位影响密文中的许多位,或者说让密文中的每一位受明文中的许多位的影响。这样可以隐蔽明文的统计特性。当然,理想的情况是让明文中的每一位影响密文中的所有位,或者说让密文中的每一位受明文中所有位的影响。
分组密码:可以看成经典的电报密码本加密技术的现代传承,其中由密钥来决定电报密码本的选择。一次加密一组数据,密钥长度为一组数据的长度。
DES加密:
DES加密是三大著名且经典的加密算法之一,为分组对称加密算法。DES算法(或国产等效算法)在P

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
RSA-Tool 2 Copyright ?2000-2002 by tE! [TMG] Introduction Please read this text carefully. This utility has been made for those who want to use the RSA public key algorithm in their own programs. It offers creation of strong keypairs and a nice integer factorization feature which makes use of several differnt factoring methods including the MPQS. It's possible to factor integers +256 bits in size but please keep in mind that this can take a *lot* of memory and time ! Thus it's not recommended to try factoring bigger numbers on slow machines with a few MB of physical Memory. Don't even think of trying to factor 512 bit numbers for example.. RSA-Tool 2 Features: - Secure keypair generation - Key test dialog - Support of multiple number bases - Auto base-conversion on select - Support of numbers up to 4096 Bits 1. About RSA RSA is a Public Key Cryptosystem developed in 1977 by Ronald Rivest, Adi Shamir and Leonard Adleman. Since 09-20-2000 the U.S. Patent #4,405,829 on this Algorithm EXPIRED! That means that the Algorithm is Public Domain now and can be used by everyone for free, even in commercial software. 2. Parameters P = 1st large prime number Q = 2nd large prime number (sizes of P and Q should not differ too much!) E = Public Exponent (a random number which must fulfil: GCD(E, (P-1)*(Q-1))==1) N = Public Modulus, the product of P and Q: N=P*Q D = Private Exponent: D=E^(-1) mod ((P-1)*(Q-1)) Parameters N and E are public whereas D is -private- and must NEVER be published! P and Q are not longer needed after keygeneration and should be destroyed. To obtain D from the public key (N, E) one needs to try splitting N in its both prime factors P and Q. For a large Modulus N (512 bit and more) with carefully chosen primefactors P and Q this is a very difficult problem. All the security of the RSA encryption scheme relies on that integer factorization problem (tough there's no mathematical proof for it). To fin

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值