网络安全 L3 Symmetric cryptography 对称加密

文本表示与块密码加密算法解析

nformation is stored information is stored digitally - just 0s and 1s, so how is text represented?
        1. ASCII codes.

                1. 0 to 255 decimal or 0 to FF hexadecimal.
                2. 8 bits per ASCII character.
                3. ASCII table readily available on internet.
        2. 2 Hex characters used to represent each of 256 (FF).
        3. For example:
                1. lowercase ’a’ is 6116 or 011000012 in binary.
                2. uppercase ’A’ is 4116 or 010000012 in binary.

Block ciphers
1. A block cipher is a symmetric-key cipher that breaks up the plaintext message
into blocks of a fixed length and encrypts one block at a time.
2. Break the plaintext P into successive blocks:
        1. P1, P2, . . . of size n bits each
3. Encrypt each Pi with the same key K of size k bits:
        1. EK(P) = EK(P1)EK(P2) . . .

Main types of block ciphers
1. substitution cipher: replace symbols (or groups of symbols) by other symbols
(or groups of symbols).

  • 示例:凯撒密码是一种简单的替换密码,其中每个字母在字母表中向前或向后移动固定数量的位置。

2. transposition cipher: permutes the symbols within the block.

  • 示例:列转置密码是一种转置密码,其中消息的字母被写入一个矩阵
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值