RFC 1423 - Privacy Enhancement for Internet Electronic Mail: Part III: Algorithms, Modes, and Identifiers https://tools.ietf.org/html/rfc1423

The input to the DES CBC encryption process shall be padded to a
   multiple of 8 octets, in the following manner.  Let n be the length
   in octets of the input.  Pad the input by appending 8-(n mod 8)
   octets to the end of the message, each having the value 8-(n mod 8),
   the number of octets being added.  In hexadecimal, the possible
   paddings are:  01, 0202, 030303, 04040404, 0505050505, 060606060606,
   07070707070707, and 0808080808080808.  All input is padded with 1 to
   8 octets to produce a multiple of 8 octets in length.  The padding
   can be removed unambiguously after decryption.

As described in PKCS #1, all quantities input as data values to the RSAEncryption process shall be properly justified and padded to the length of the modulus prior to the encryption process. In general, an RSAEncryption input value is formed by concatenating a leading NULL octet, a block type BT, a padding string PS, a NULL octet, and the data quantity D, that is, RSA input value = 0x00 || BT || PS || 0x00 || D.

   The input to the DES CBC encryption process shall be padded to a
multiple of 8 octets, in the following manner. Let n be the length
in octets of the input. Pad the input by appending 8-(n mod 8)
octets to the end of the message, each having the value 8-(n mod 8),
the number of octets being added. In hexadecimal, the possible
paddings are: 01, 0202, 030303, 04040404, 0505050505, 060606060606,
07070707070707, and 0808080808080808. All input is padded with 1 to
8 octets to produce a multiple of 8 octets in length. The padding
can be removed unambiguously after decryption.

加密填补 填充 pad padding的更多相关文章

  1. NLP 装桶(Bucketing)和填充(padding)

    翻译模型也是用了装桶(bucketing)和填充(padding),这两种方法是用于高效地处理不同长度句子的情况.我们首先来弄清楚是怎么一回事.当我们从英语翻译成法语的时候,假设我们的输入英语的长度为 ...

  2. AES加密补位填充的一个问题

    AES加密支持多种填充方式,NoPadding,PKCS5Padding,ISO10126Padding,ZerosPadding,PKCS7Padding. 其中PKCS7Padding 就是数据个 ...

  3. 加密数据的填充方式(Padding)

    1.填充数据为填充字节的长度 这种填充方式中,填充字符串由一个字节序列组成,每个字节填充该字节序列的长度.假定块长度为8,原文数据长度9,则填充字节数等于0x07:如果明文数据长度为8的整数倍,则填充 ...

  4. Pytorch 四种边界填充方式(Padding)

    1. 选用卷积之前填充(强烈建议) 小生非常推荐大家不再使用卷积所带的填充方式,虽然那种方式简单,但缺陷太多.① 不能根据自己的需要来决定上与下填充不等的边界,左右填充不等的边界:② 边界填充零容易出 ...

  5. (转)IHS配置安全漏洞: 支持不推荐使用的 SSL 版本、在降级的旧加密上填充 Oracle、检测到 RC4 密码套件、支持弱 SSL 密码套件、 重构 RSA 导出键(又称为 FREAK)

    原文:https://blog.csdn.net/lyd135364/article/details/52179426 都是由于ihs配置中支持不推荐使用的ssl版本和弱密码套件引起的. 只要在配置文 ...

  6. padding Oracle attack(填充Oracle攻击)

    最近学习到一种老式的漏洞,一种基于填充字节的漏洞.就想记录下来,早在2010年的blackhat大会上,就介绍了padding Oracle漏洞,并公布了ASP.NET存在该漏洞.2011年又被评选为 ...

  7. TripleDES之C#和PHP之间加密解密

    在C#常用加密解密一文中,介绍了几个加密解密方法,其中有个如何使用对称加密算法DES,此次说下DES的升级版,TripleDES. DES和TripleDES之间的关系可以参考下面的博文. 对称加密D ...

  8. js 加密 crypto-js des加密

    js 加密 crypto-js    https://www.npmjs.com/package/crypto-js   DES  举例:   js 引入:   <script src=&quo ...

  9. 前后端API交互数据加密——AES与RSA混合加密完整实例

    前言 前段时间看到一篇文章讲如何保证API调用时数据的安全性(传送门:https://blog.csdn.net/ityouknow/article/details/80603617),文中讲到利用R ...

随机推荐

  1. ATT&CK实战系列——红队实战(二)

    一.环境搭建 靶场下载地址:http://vulnstack.qiyuanxuetang.net/vuln/detail/3/ DC IP:10.10.10.10OS:Windows 2012应用:A ...

  2. Go操作Redis实战

    目录 安装Redis客户端 连接redis 基本指令 Keys():根据正则获取keys Type():获取key对应值得类型 Del():删除缓存项 Exists():检测缓存项是否存在 Expir ...

  3. springboot日志输出到文件

    今天来谈一谈日志,主要是说一说springboot的日志,因为最近在学习springboot.首先在写代码的时候,要养成记日志的习惯,这点真的很重要,因为之前吃了很多亏.过去我对日志很不在意,该有的日 ...

  4. HTML中,大小不确定图片的水平垂直居中

    html: css: div{ width:400px;height:300px;text-align:center;font-size:0;*font-size:200px;} div:after{ ...

  5. Java学习日报7.21

    package leap;import java.util.Scanner;public class Leap {public static void main(String args[]) { in ...

  6. (class: org/apache/jasper/runtime/PageContextImpl, method: getELResolver signature: ()Ljavax/el/ELResolver;) Incompatible argument to

    网上大多都说是jsp版本原因: 引用: .............................................. ................................. ...

  7. TurtleBot3 Waffle (tx2版华夫)(11)建图-karto建图

    1)[Remote PC] 启动roscore $ roscore 2)[TurBot3] 启动turbot3 $ roslaunch turbot3_bringup minimal.launch 3 ...

  8. 数据库索引的基石----B树

    数据结构相对来说比较枯燥, 我尽量用最易懂的话,来把B树讲清楚.学过数据结构的人都接触过一个概念二叉树,简单来说,就是每个父节点最多有两个子节点.为了在二叉树上更快的进行元素的查找,人们通过不断的改进 ...

  9. linux下用户管理命令、用户组管理命令

    useradd 添加新用户 1.基本语法 useradd 用户名                   (功能描述:添加新用户) useradd -g 组名 用户名      (功能描述:添加新用户到某 ...

  10. C语言指针-从底层原理到花式技巧,用图文和代码帮你讲解透彻

    这是道哥的第014篇原创 目录 一.前言 二.变量与指针的本质 1. 内存地址 2. 32位与64位系统 3. 变量 4. 指针变量 5. 操作指针变量 5.1 指针变量自身的值 5.2 获取指针变量 ...