James.Ji
驱动老牛
驱动老牛
  • 注册日期2001-09-17
  • 最后登录2006-05-16
  • 粉丝0
  • 关注0
  • 积分-9分
  • 威望-8点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:4066回复:5

PKCS5 padding 是怎样的?(分组算法)

楼主#
更多 发布于:2002-07-08 09:41
如体。
车到山前必有路。 虽然有些土,却是我最有感触的一句话。
moqingsong
论坛版主
论坛版主
  • 注册日期2002-04-07
  • 最后登录2011-02-03
  • 粉丝0
  • 关注0
  • 积分74分
  • 威望71点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-07-08 09:48
有点关系么?不过是java的。

Overview  Package   Class  Use  Tree  Deprecated  Index  Help  
  
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

--------------------------------------------------------------------------------

com.dstc.security.provider
Class DSTC
java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--java.security.Provider
                          |
                          +--com.dstc.security.provider.DSTC


--------------------------------------------------------------------------------

public final class DSTC
extends Provider

Master class for the JCSI Crypto Provider

Standard Names Supported by this Provider
The standard names that can be used when importing from the JCSI Provider package are specified below

AlgorithmParameterGenerator
The following algorithm names can be specified when requesting an instance of AlgorithmParameterGenerator :


DiffieHellman, DH
DSA
AlgorithmParameters
The following algorithm names can be specified when requesting an instance of AlgorithmParameters :


DESede/CBC
DSA
DiffieHellman, DH
PBEWithMD5AndDES
PBEwithSHAand3-KeyTripleDES-CBC
PBEwithSHAand128BitRC2-CBC
PBEwithSHAand128BitRC4
PBEwithSHAand40BitRC2-CBC
PBEwithSHAand40BitRC4
RC2/CBC
Cipher
Algorithm
AES : Advanced Encryption Standard
Blowfish Block cipher designed at Counterpane Labs
DES : The Digital Encryption Standard as described in FIPS PUB 46-2
DESede : Triple DES
IDEA : IDEATM (International Data Encryption Algorithm) produced by IT_Security AG
PBEWithMD5AndDES : Password Based Encryption as defined in RSA Laboratories, \"PKCS #5: Password-Based Encryption Standard,\" version 2.0, Mar. 1999
PBEwithSHAand3-KeyTripleDES-CBC
PBEwithSHAand40BitRC2-CBC
PBEwithSHAand40BitRC4
PBEwithSHAand128BitRC2-CBC
PBEwithSHAand128BitRC4
RC2 See RFC 2268
RC4 (No padding necessary)
RSA
Mode
ECB Electronic Codebook Mode (see DES Modes of Operation : FIPS PUB 81)
CBC Cipher Block Chaining Mode
CFB Cipher FeedBack Mode
Note: Output FeedBack Mode (OFB) is not supported.

Padding
NoPadding
PKCS5
PKCS1
Zeroes
KeyAgreement
The following algorithm names can be specified when requesting an instance of KeyAgreement :


DiffieHellman, DH: Diffie-Hellman Key Agreement (and multi-party generalization thereof) as defined in RSA Laboratories, \"PKCS #3: Diffie-Hellman Key Agreement Standard,\" version 1.4
ESDH : Diffie-Hellman Ephemeral-Static - Key Agreement based on ANSI X9.42 draft RFC 2631
KeyFactory
The following algorithm names can be specified when requesting an instance of KeyFactory :


DiffieHellman, DH
DSA
RSA
KeyGenerator
The following algorithm names can be specified when requesting an instance of KeyGenerator :


AES
Blowfish
DES
DESede
IDEA
RC2
RC4
KeyPairGenerator
The following algorithm names can be specified when requesting an instance of KeyPairGenerator :


DiffieHellman, DH
DSA
RSA
MAC algorithms
The following names can be specified when requesting an instance of MAC :


HmacMD5
HmacRIPEMD-160
HmacSHA1
MessageDigest algorithms
The following algorithm names can be specified when requesting an instance of MessageDigest :


MD2 See RFC 1319
MD4 See RFC 1320
MD5 : See RFC 1321
RIPEMD-160 See this page
SHA, SHA-1, SHA1 See FIPS 180-1
SHA-256
SHA-384
SHA-512
SecretKeyFactory
The following algorithm names can be specified when requesting an instance of SecretKeyFactory :


AES
Blowfish
DES
DESede
IDEA
PBEWithMD5andDES
PBEwithSHAand3-KeyTripleDES-CBC
PBEwithSHAand128BitRC2-CBC
PBEwithSHAand128BitRC4
PBEwithSHAand40BitRC2-CBC
PBEwithSHAand40BitRC4
RC2
RC4
Signature
The following names can be specified when requesting an instance of Signature :


SHA1withDSA, DSA Digital Signature Standard based on FIPS 186. Implements DSA with SHA-1 hashing.
MD2withRSA : Implements RSA signature algorithm with MD2 hashing.
MD5withRSA : Implements RSA signature algorithm with MD5 hashing.
RawDSA : Implements DSA without hashing.
RawRSA : Implements RSA signature algorithm without hashing.
RIPEMD-160withRSA : Implements RSA signature algorithm with RIPEMD160 hashing.
SHA1withRSA : Implements RSA signature algorithm with SHA-1 hashing.
Default Parameters and Key Lengths
This Provider uses the following default parameters:
KeyGenerator
AES : 128 bits
Blowfish : 128 bits
DES : 56 bits
DESede : 168 bits
IDEA : 128 bits
RC2 : 64 bits
RC4 : 128 bits
KeyPairGenerator
DiffieHellman :
Private Key - 1024 bits
Public Key - 1024 bits
Modulus: 1024 bits
DSA :
Private Key - 160 bits
Public Key - 1024 bits
Modulus: 1024 bits
RSA :
Keylength (modulus): 1024 bits
Private Exponent: 65537

See Also:
Serialized Form

--------------------------------------------------------------------------------

Fields inherited from class java.util.Properties
defaults
  Constructor Summary
DSTC()
            
  Methods inherited from class java.security.Provider
clear, entrySet, getInfo, getName, getVersion, keySet, load, put, putAll, remove, toString, values
  Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, propertyNames, save, setProperty, store
  Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, keys, rehash, size
  Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
  

Constructor Detail


DSTC
public DSTC()

--------------------------------------------------------------------------------
Overview  Package   Class  Use  Tree  Deprecated  Index  Help  
  
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

--------------------------------------------------------------------------------
按第一贴的“给分”键,给分。
James.Ji
驱动老牛
驱动老牛
  • 注册日期2001-09-17
  • 最后登录2006-05-16
  • 粉丝0
  • 关注0
  • 积分-9分
  • 威望-8点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-07-08 09:55
没有学过java,看不懂,不过就是这个意思。
我想知道具体这样的padding是如何添加的?


NoPadding
PKCS5
PKCS1
Zeroes

车到山前必有路。 虽然有些土,却是我最有感触的一句话。
James.Ji
驱动老牛
驱动老牛
  • 注册日期2001-09-17
  • 最后登录2006-05-16
  • 粉丝0
  • 关注0
  • 积分-9分
  • 威望-8点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-07-08 10:57
Here:

This padding scheme is defined by RSA Data Security, Inc. and is documented in Public-Key Cryptography Standards (PKCS), PKCS #5, section 6.2.

When this method is used, a padding string is always added, even if the plaintext message divides evenly into blocks. The padding string consists of a sequence of bytes, each of which is equal to the total number of bytes in the padding string. If 24 bits of padding need to be added, then the padding string is \"03 03 03\" (3 bytes times 8 bits equals 24 bits). Therefore, if 64 bits of padding needs to be added, then the string is \"08 08 08 08 08 08 08 08.\"

 
车到山前必有路。 虽然有些土,却是我最有感触的一句话。
moqingsong
论坛版主
论坛版主
  • 注册日期2002-04-07
  • 最后登录2011-02-03
  • 粉丝0
  • 关注0
  • 积分74分
  • 威望71点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-07-08 10:58
我也没完过这些玩艺,瞎灌水而已。等别人来给你讲吧。
按第一贴的“给分”键,给分。
zhuzc
驱动中牛
驱动中牛
  • 注册日期2001-09-01
  • 最后登录2005-04-03
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2002-07-17 13:54
可以问一下搞过证书的哦
我是树上的那只鸟,整理着自己的羽毛,看着城市的喧嚣……
游客

返回顶部