格式 Public 键

Format Public key

我正在使用 HSM 签署证书,我需要格式化 CA public 密钥并输出它。我看了EMV Book,格式如下:

Field Name                      Length                   Description                       Format 

Registered 
Application Provider              5                Identifies the payment system to           b 
Identifier (RID)                                   which the  Certification Authority 
                                                   Public Key is associated 


Certification                                      
Authority Public Key              1                Identifies the Certification 
Index                                              Authority Public Key in                    b 
                                                   conjunction with the RID



Certification 
Authority Hash                    1                Identifies the hash algorithm used         b
Algorithm Indicator                                to produce the Hash Result in the 
                                                   digital signature scheme 



Certification 
Authority Public Key              1                Identifies the digital signature 
Algorithm Indicator                                algorithm to be used with the              b 
                                                   Certification Authority Public Key 



Certification 
Authority Public Key             Var.              Value of the modulus part of the           b 
Modulus                          (max              Certification Authority Public Key 
                                 248)



Certification 
Authority Public Key             1 or 3            Value of the exponent part of the          b 
Exponent                                           Certification Authority Public Key, 
                                                   equal to 3 or 216 + 1



Certification 
Authority Public Key             20                A check value calculated on the            b
Check Sum36                                        concatenation of all parts of the 
                                                   Certification Authority Public Key 
                                                   (RID, Certification Authority 
                                                   Public Key Index, Certification 
                                                   Authority Public Key Modulus,   
                                                   Certification Authority Public Key 
                                                   Exponent) using SHA-1 

我正在用 Visual 编写代码 Basic.net.How 我可以在代码中格式化并输出吗?我做了一个Class,名字叫PublicKey,里面有三个函数,ExportPublicKey,FormatPublicKey,WritePublicKeyToFile。

有人能帮忙吗?非常感谢。

您所提供的是终端中可用于验证颁发者 Public 由 CA 私钥签名的密钥证书所需的最少数据。在终端上,您将拥有 CA Public 密钥列表,您将其与卡中的数据相匹配(使用卡中的 RID 和指数),获取正确的 CA 公钥并打开证书。但是你的要求 "format the CA public key and output it" 对我来说毫无意义。 Issuer Public 密钥证书的格式如下。

在 HSM Racal 9000 上,生成证书的命令是 EW,但我从未使用过它。

注意 : 以上是我对你的问题的理解。如果您认为我的理解符合您的要求,请阅读整个解释离线数据身份验证的部分。这很有趣。否则轻轻无视;)