Symmetric encryption padding

 

Today still debug MAC algorithm in Java card with Xuxu, I have to implement the MAC algorithm but there are so little document on it, I can only try time after time.

Girls are always girls, always play a passive role, such as in political, in leadership, in family life, and still, on beds. Thanks to Old Dou, who creak the problem with two sentences: “M 1 padding with all 0, M 2 padding with 0x 80 and 0” . Well just as the Chinese old saying “it’s great fortune to have a old at home”. With the hint I finished the MAC alg of ALG_DES_MAC8_NOPAD, ALG_DES_MAC8_ISO9797_M1,ALG_DES_MAC8_ISO9797_M2, but the ALG_DES_MAC8_ISO9797_1_M2_ALG3 is hard to deal with, I will try later.

 

There is the summary on padding:

 

    PKCS5: Pad with bytes all of the same value as the number of padding bytes. it’s also the same as PKCS5 and RFC 3852 Cryptographic Message Syntax (CMS)

    ISO 9797 method 1: Pad with zero (null) characters.

    ISO 9797 method 2:   Pad with 0x80 followed by zero bytes. if the last block is full, need to add an extra block begin with 0x80.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值