AES and DES
Key generation methods:
*CSPRNG *- Cryptographically Secure Pseudo Random Number Generator, using a seed derived from Ks.
-fpr CSPRNG, impossible to predict the remaining bits of the key stream given some initial bits.
LFSR - Linear Feedback Shift Register e.g. in A5/1 cipher for GSM
Trivium cipher – uses 80 bit key, three shift registers
Block ciphers in OFB, CTR modes
LFSR:
- Consider LFSR with 3 Flip-flops(电子触发器): FF0, FF1, FF2, i.e. degree m = 3
- Assume initial states: s2 = 1, s1 = 0, s0 = 0
- Output: si+3 ≡ si+1 + si mod 2
- Theorem: The maximum sequence length generated by an LFSR of degree m is 2^m − 1(NO.6 第七个后开始重复)
Summary
- Stream ciphers simple and require less resources
- Requires long, random keystream derived from the shared key
- Careful use of LFSR, CSPRNG to obtain keystreams with good statistical properties(统计特性).
,
2DES,3DES
2des
因为中间相遇攻击:首先生成2^56的key,
1.用key解密C -> 用key加密d,匹配结果
2.可能有不止一对键值对匹配
3des