西安景区标识标牌制作:Microsoft CSP简介

来源:百度文库 编辑:九乡新闻网 时间:2024/04/30 19:06:50

Microsoft CSP简介

(2010-01-02 14:57:26)转载 标签:

it

分类: IT达人

目前,在国际上有两种比较通用的对加密设备进行管理的接口。一种是PKCS#11标准接口,另一种是由Microsoft制定的CSP(Cryptographic Service Provider)标准接口。其中CSP是微软专为Windows系列操作系统制定的底层加密接口,用于管理硬件或软件形式的加密设备,实现数据加密、解密,数字签名、验证和数据摘要(即HASH)等。

CSP是Windows安全应用的基础,在Windows操作系统上实现https安全浏览(即SSL安全数据通信)和实现安全隧道(如Ipsec)功能,都必需有CSP参与密码运算。

1 Microsoft CSP简介

Cryptographic Service Provider(简称CSP)是Microsoft公司用来在Windows平台上提供第三方加密模块的接口标准。一个CSP 模块包含了一些标准加密算法的实现,是CAPI 函数的具体执行者,同时CSP 模块也提供了密钥的安全存储和使用机制。

微软提出的 Cryptographic Service Provider(CSP)接口标准是一个包含了标准加密算法实现的软件模块。CSP在微软操作系统安全体系中是加解密操作的实际执行者,它直接同硬件加密设备(HSE)如smart card、安全协处理器交互。CSP模块实现了CryptoSPI 的一个子集,它实现的算法包括:

  • 非对称加密算法

RSA 1024 位

  • 对称加密算法  

DES 56 位

3DES 168 位

  • 摘要算法

MD2

MD5

SHA1

2 接口

CSP v1.0 实现的CryptoSPI 接口函数是:

CPAcquireContext

CPCreateHash

CPDecrypt

CPDeriveKey

CPDestroyHash

CPDestroyKey

CPEncrypt

CPExportKey

CPGenKey

CPGenRandom

CPGetHashParam

CPGetKeyParam

CPGetProvParam

CPGetUserKey

CPHashData

CPHashSessionKey

CPImportKey

CPReleaseContext

CPSetHashParam

CPSetKeyParam

CPSetProvParam

CPSignHash

CPVerifySignature

3 CSP体系结构

其中,微软基本CSP包括RSABase, DssBase等,还有提供128位以上加密密钥的增强型CSP。基本CSP只提供40位对称加密和512位RSA非对称加密,这样的密钥长度恰在可破密码的范围内,是不安全的。

第三方CSP可由加密设备厂商按照微软制定的标准接口开发,通过微软签名后安装到系统中使用。

CSP的种类可以有签名型(Signature)、密钥交换型(Key Exchange)和安全通道型(SChannel)等。

上图的中间层CryptoAPI是Windows提供的统一安全API接口,它由一组函数构成,该API的全部功能都需要调用下层的CSP服务模块来实现。

4 标准及协议

CAPI – Cryptographic Application Programming Interface

CSP – Cryptographic Service Provider

CSPI – Cryptographic Service Provider Interface

S/MIME - S/MIME is a specification for secure electronic mail. S/MIME stands for Secure/Multipurpose Internet Mail Extensions and was designed to add security to e-mail messages in MIME format. The security services offered are authentication (using digital signatures) and privacy (using encryption).

SSL/TLS – TLS(Transport Layer Security) 1.0 is a standardized, slightly modified version of SSL(Secure Sockets Layer) 3.0 that was issued by the Internet Engineering Task Force (IETF) in January 1999, in document RFC 2246. Because TLS has been standardized, developers are encouraged to use TLS rather than SSL. PCT is included for backward compatibility only and should not be used for new development. When the SChannel security package is used, DCOM automatically negotiates the best protocol, depending on the client and server capabilities.