107 lines
3.2 KiB
XML
107 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
|
||
<command>
|
||
<hex>E4</hex>
|
||
</command>
|
||
<data extend="data">
|
||
<nid len="4" cn="曲线nid">
|
||
ECC的NID
|
||
415:prime256v1
|
||
715:secp384r1
|
||
</nid>
|
||
<flg len="1" required="false" cn="是否存储标志">
|
||
可选,存在,则固定值为‘P’
|
||
</flg>
|
||
<index len="4" cn="索引" :if=" null != $packet.data.flg">
|
||
存储标志存在时存在,4位数字,以此索引存储生成的密钥。0001-9998
|
||
</index>
|
||
<startTime len="8" cn="生效时间" :if=" null != $packet.data.flg">
|
||
存储标志存在时存在,密钥生效时间
|
||
</startTime>
|
||
<endTime len="8" cn="失效时间" :if=" null != $packet.data.flg">
|
||
存储标志存在时存在,密钥失效时间
|
||
</endTime>
|
||
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
|
||
可选项。如果显示消息尾域,则该域必须显示。值为
|
||
“X’19”。
|
||
<hex>19</hex>
|
||
</tailSep>
|
||
|
||
<tail maxLen="32" required="false" cn="尾部">
|
||
可选项。最大长度为 32个字符。
|
||
</tail>
|
||
</data>
|
||
|
||
|
||
</req>
|
||
<res>
|
||
|
||
<command>
|
||
<hex>E5</hex>
|
||
</command>
|
||
<data>
|
||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||
<options>
|
||
<option cn="无错误">
|
||
<hex>00</hex>
|
||
</option>
|
||
<option cn="无效的哈希标识">
|
||
<hex>05</hex>
|
||
</option>
|
||
<option cn="生成密钥错误">
|
||
<hex>13</hex>
|
||
</option>
|
||
<option cn="输入数据错">
|
||
<hex>15</hex>
|
||
</option>
|
||
<option cn="DSP 错误">
|
||
DSP 错误;报告给管理员。
|
||
<hex>47</hex>
|
||
</option>
|
||
<option cn="输入数据长度错误">
|
||
<hex>80</hex>
|
||
</option>
|
||
</options>
|
||
</error>
|
||
|
||
<privateKeyLength len="4" cn="私钥长度">
|
||
私钥的密文长度
|
||
</privateKeyLength>
|
||
|
||
<privateKey :len="getPriKeyLen()" cn="私钥">
|
||
LMK 加密下的私钥(LMK34-35)
|
||
</privateKey>
|
||
|
||
<publicKeyLength len="4" cn="公钥长度">
|
||
公钥长度(DER)
|
||
</publicKeyLength>
|
||
|
||
<publicKey :len="getPubKeyLen()" cn="公钥">
|
||
公钥的 DER 编码
|
||
</publicKey>
|
||
|
||
<tailSep len="1" required="false" cn="尾分隔">
|
||
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
|
||
<hex>19</hex>
|
||
</tailSep>
|
||
|
||
<tail maxLen="32" required="false" cn="尾部">
|
||
可选项。最大长度为 32个字符。
|
||
</tail>
|
||
</data>
|
||
|
||
|
||
|
||
</res>
|
||
<script>
|
||
function getPubKeyLen() {
|
||
return Util.a2i( $final.getSection('data').getSection('publicKeyLength') )
|
||
}
|
||
|
||
function getPriKeyLen() {
|
||
return Util.a2i( $final.getSection('data').getSection('privateKeyLength') )
|
||
}
|
||
</script>
|
||
</packet> |