WO2013064063A1 - 加密机模拟测试装置及方法 - Google Patents

加密机模拟测试装置及方法 Download PDF

Info

Publication number
WO2013064063A1
WO2013064063A1 PCT/CN2012/083805 CN2012083805W WO2013064063A1 WO 2013064063 A1 WO2013064063 A1 WO 2013064063A1 CN 2012083805 W CN2012083805 W CN 2012083805W WO 2013064063 A1 WO2013064063 A1 WO 2013064063A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
encryption machine
simulation test
machine simulation
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2012/083805
Other languages
English (en)
French (fr)
Inventor
陆辉
吴金坛
吕苏
尹祥龙
许丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Publication of WO2013064063A1 publication Critical patent/WO2013064063A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1433Vulnerability analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general

Definitions

  • the present invention relates to a simulation test apparatus and method, and more particularly to an encryption machine simulation test apparatus and method. Background technique
  • encryption machines especially hardware encryption machines
  • security information that is, information requiring high security
  • the present invention proposes an encryption machine simulation test apparatus and method.
  • An encryption machine simulation test device configured to receive a request message from an external system in a predetermined communication format, and transmit the request message to the encryption a machine simulation module, and transmitting a response message from the encryption machine analog module to the external system in the predetermined communication format;
  • An encryption machine simulation module configured to parse the received request message, transmit the parsed message data to a security module, and construct a response based on the security processing result data from the security module Transmitting, and transmitting the response message to the communication interface;
  • a security module configured to process the parsed message data to obtain the security processing result data, and transmit the security processing result data back to the encryption machine simulation module;
  • a main control module configured to initialize the encryption machine simulation test device based on a predetermined configuration file when the encryption machine simulation test device is started, and monitor information related to the data processing process and maintain a log file.
  • the communication interface is further for receiving a control command from the user terminal and transmitting the control command to the main control module.
  • the main control module is further configured to execute the received control instruction and transmit the execution result back to the user terminal via the communication interface.
  • the communication interface further includes a message transmission unit, wherein the message transmission unit is configured to extract a message body from the request message based on the predetermined communication format. Transmitting the message body to the encryption machine analog module, and transmitting the received response message to the external system in the predetermined communication format.
  • the communication interface further comprises an instruction forwarding and data transmission unit.
  • the instruction forwarding and data transmission unit is configured to receive a control instruction from the user terminal, and transmit the control instruction to the main control module, and transmit an execution result from the main control module to the user terminal.
  • the execution result includes an execution result status indication and/or execution result data.
  • the encryption machine simulation module further includes: a message parsing unit, configured to parse the received request message based on a predetermined parameter, and parse out Message data is transmitted to the security module; a message construction unit, configured to construct the response message based on the predetermined parameter and the received security processing result data, and transmit the response message to the communication interface.
  • a message parsing unit configured to parse the received request message based on a predetermined parameter, and parse out Message data is transmitted to the security module
  • a message construction unit configured to construct the response message based on the predetermined parameter and the received security processing result data, and transmit the response message to the communication interface.
  • the predetermined parameter includes a key parameter and/or an abnormal simulation control parameter.
  • the parsed message data includes an instruction code, a key, and security data.
  • control instruction comprises a configuration instruction and/or a log instruction.
  • the main control module further includes:
  • a configuration unit configured to initialize the encryption machine simulation test device based on a predetermined configuration file when the encryption machine simulation test device is started;
  • the log recording unit is configured to monitor information related to the data processing process and record the information related to the data processing process in the log file.
  • the main control module further includes an instruction processing unit, the instruction processing unit is configured to update and/or re-read the configuration file based on the received configuration instruction, and The statistical information is output to the log file based on the received log instruction.
  • the security module is further configured to process the security data according to the parsed message data by using the key according to the parsed message data, to obtain the Safely process result data.
  • the predetermined communication format is one of the following communication formats: a message communication interface is formed by a message length field, a message header field, and a message body field; (b) The text length field and the message body field constitute a message communication interface; (C) only the message body field constitutes a message communication interface (ie, no message length field and message header field).
  • the configuration unit configures the predetermined communication format based on the configuration file.
  • the configuration unit configures the predetermined parameter based on the configuration file.
  • the configuration file includes an environment variable, a log path, At least one of the level flag and the number of threads.
  • the log file includes a communication log for recording a communication message and an application log for recording abnormal condition information during processing.
  • the instruction processing unit is further configured to transmit the log file to the user terminal via the communication interface based on the control instruction.
  • the configuration unit configures a secure encryption algorithm used by the security module based on the configuration file.
  • the encryptor emulation module is further configured to define a dynamic link library for each of the plurality of encrypter interface specifications, each of the dynamic link libraries being used for corresponding
  • the encryptor interface specification parses the request message and constructs the response message.
  • the encrypting machine simulation module is further configured to load one of the dynamic link libraries as a working dynamic link library based on the configuration file, so as to correspond to the working dynamic link library.
  • the encryptor interface specification parses the request message and constructs the response message.
  • An encryption machine simulation test method comprising the following steps:
  • the method further comprises: receiving and executing a control instruction from the user terminal, and transmitting the execution result back to the user terminal.
  • the step (A1) further comprises: extracting a message body from the request message based on the predetermined communication format.
  • the execution result includes an execution result status indication and/or execution result data.
  • the step (A2) further comprises: parsing the received request message based on a predetermined parameter.
  • the predetermined parameter includes a key parameter and/or an abnormality simulation control parameter.
  • the parsed message data includes an instruction code, a key, and security data.
  • control instruction comprises a configuration instruction and/or a log instruction.
  • the method further comprises: performing an initialization operation based on the predetermined configuration file.
  • the method further comprises: monitoring information related to the data processing procedure and recording the information related to the data processing procedure in a log file.
  • the method further comprises: updating and/or re-reading the configuration file based on the received configuration instruction, and outputting the statistical information based on the received log instruction Go to the log file.
  • the step (A3) further includes: processing, according to the parsed message data, the security data according to the instruction code to obtain the security data to obtain The security processing result data.
  • the step (A4) further comprises: constructing the response message based on the predetermined parameter and the security processing result data.
  • the predetermined communication format is one of the following communication formats: a message communication interface is formed by a message length field, a message header field, and a message body field; (b) The text length field and the message body field constitute a message communication interface; (c) only the message body field constitutes a message communication interface (ie, no message length field and message header field).
  • the method further comprises: configuring the predetermined communication format based on the configuration file.
  • the method further comprises: configuring the predetermined parameter based on the configuration file.
  • the configuration file includes at least one of an environment variable, a log path, a log level flag, and a number of threads.
  • the log file includes a message for recording a communication message.
  • Communication log and application log for recording abnormal situation information during processing.
  • the method further comprises: transmitting the log file to the user terminal based on the control command.
  • the method further comprises: configuring a secure encryption algorithm to be used based on the configuration file.
  • the method further comprises: defining a dynamic link library for each of the plurality of encryptor interface specifications, each of the dynamic link libraries being for encrypting with the corresponding
  • the machine interface specification parses the request message and constructs the response message.
  • the method further includes: loading one of the dynamic link libraries as a working dynamic link library based on the configuration file, thereby using an encryption machine corresponding to the working dynamic link library
  • the interface specification parses the request message and constructs the response message.
  • the encryption machine simulation test device and method disclosed by the invention have the following advantages: (1) Support three common encryption machine communication interface specifications, and can be flexibly configured; (2) Support multiple security encryption algorithms, and can be free according to requirements Configure security processing results; (3) Record communication logs and application logs in real time, thus having high analysis accuracy; (4) High data processing performance.
  • the encryption simulator simulation test apparatus and method disclosed by the present invention can more freely simulate various behaviors of the encryption machine than testing with a real encryption machine.
  • FIG. 1 is a structural diagram of an encryption machine simulation test apparatus according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of a method of encrypting a simulator test in accordance with an embodiment of the present invention. detailed description
  • the communication interface 1 is configured to receive a request message from an external system in a predetermined communication format, and transmit the request message to the encryption machine simulation module 3, and A response message from the encryptor analog module 3 is transmitted back to the external system in the predetermined communication format.
  • the encryption machine simulation module 3 is configured to parse the received request message, transmit the parsed message data to the security module 4, and construct a response based on the security processing result data from the security module 4. And transmitting the response message to the communication interface 1.
  • the security module 4 is configured to process the parsed message data to obtain the security processing result data, and transmit the security processing result data back to the encryption machine simulation module 3.
  • the main control module 2 is configured to initialize the encryption machine simulation test device based on a predetermined configuration file when the encryption machine simulation test device is started, and monitor information related to the data processing process and maintain a log file.
  • the communication interface 1 is further configured to receive a control command from the user terminal and transmit the control command to the main control module 2.
  • the main control module 2 is further configured to execute the received control instruction, and transmit the execution result back to the user terminal via the communication interface 1. .
  • the communication interface 1 further includes a message transmission unit 5.
  • the message transmission unit 5 is configured to extract a message body from the request message based on the predetermined communication format, and transmit the message body to the encryption machine simulation module 3, and receive the message body.
  • the response message is transmitted to the external system in the predetermined communication format.
  • the communication interface 1 further includes an instruction forwarding and data transmission unit 6.
  • the instruction forwarding and data transmission unit 6 is configured to receive a control instruction from the user terminal, and transmit the control instruction to the main control module 2, and transmit an execution result from the main control module 2 to The user terminal.
  • the execution result includes an execution result status indication (i.e., execution success or execution failure) and/or execution result data.
  • the encryption machine simulation module in the encryption machine simulation test device disclosed by the present invention, the encryption machine simulation module
  • the 3 further includes a message parsing unit 7 and a message constructing unit 8.
  • the message parsing unit 7 is configured to parse the received request message based on the predetermined parameter, and transmit the parsed message data to the security module 4.
  • the message construction unit 8 is configured to perform the security processing based on the predetermined parameters and the received The data constructs the response message and transmits the response message to the communication interface 1.
  • the predetermined parameters include a key parameter and/or an abnormality simulation control parameter.
  • the parsed message data includes an instruction code, a key, and security data (i.e., encryption and decryption data).
  • control instruction includes a configuration instruction and/or a log instruction.
  • the main control module 2 further includes a configuration unit 9 and a log recording unit 11.
  • the configuration unit 9 is configured to initialize the encryption machine simulation test device based on a predetermined configuration file when the encryption machine simulation test device is started (for example, initializing the communication interface 1 and the encryption machine based on a predetermined configuration file). Analog module 3 and the security module 4, etc.).
  • the log recording unit 11 is configured to monitor information related to the data processing process and record the information related to the data processing process in the log file.
  • the main control module 2 further includes an instruction processing unit 10.
  • the instruction processing unit 10 is configured to update and/or re-read the configuration file based on the received configuration instruction, and output statistical information to the log file based on the received log instruction.
  • the security module 4 is further configured to perform the security data by using the key according to the instruction code based on the parsed message data. Processing to obtain the security processing result data.
  • the predetermined communication format is one of the following communication formats: a message communication interface is formed by a message length field, a message header field, and a message body field; (b) The message length interface and the message body field form a message communication interface; (c) Only the message body field constitutes a message communication interface (ie, no message length field and message header field).
  • the configuration unit 9 configures the predetermined communication format based on the configuration file.
  • the configuration unit 9 configures the predetermined parameter based on the configuration file.
  • the configuration file includes At least one of an environment variable, a log path, a log level flag, and a number of threads.
  • the log file includes a communication log for recording a communication message and an application log for recording abnormality information during processing, preferably in the present
  • the instruction processing unit 10 is further configured to transmit the log file to the user terminal via the communication interface 1 based on the control instruction.
  • the configuration unit 9 configures the security encryption algorithm used by the security module 4 based on the configuration file.
  • the encryption machine simulation module 3 is further configured to define a dynamic link library for each of a plurality of encryptor interface specifications (eg, a message assembly format specification).
  • encryptor interface specifications eg, a message assembly format specification.
  • Each of the dynamic link libraries is configured to parse the request message with the corresponding encryptor interface specification and construct the response message.
  • the encryption machine simulation module 3 is further configured to load one of the dynamic link libraries as a work dynamic link library based on the configuration file, thereby
  • the encryptor interface specification corresponding to the working dynamic link library parses the request message and constructs the response message.
  • the encryption machine simulation module 3 adopts a unified interface function definition, and defines a corresponding parsed dynamic link library for each encryption machine interface specification. Then, according to the configuration parameters, it is decided which dynamic link library is specifically loaded, so that the different function processing functions of the unified interface are linked to simulate the processing behavior of different types of encryption machines (especially hardware encryption machines). It can be seen from the above that due to the adoption of a unified public interface, the tester can implement the processing function according to the specific needs to complete the corresponding test, thus having high application flexibility.
  • the basic working principle of the encryption machine simulation test apparatus disclosed in the present invention is as follows: (1) The communication interface 1 receives a request message from an external system in a predetermined communication format, and the request message is Transmitting to the encryption machine analog module 3 (for example, reading two bytes of length bit data from TCP based on the TCP/IP protocol, converting it to the length of the message, and then extracting the data of the instruction length from the TCP, thereby Transmitting the extracted message body to the encryption machine simulation module 3); (2) The encryption machine simulation module 3 parses the received request message, and transmits the parsed message data to the security module 4; (3) the security module 4 processes the parsed message data.
  • the encryption machine analog module 3 for example, reading two bytes of length bit data from TCP based on the TCP/IP protocol, converting it to the length of the message, and then extracting the data of the instruction length from the TCP, thereby Transmitting the extracted message body to the encryption machine simulation module 3
  • the encryption machine simulation module 3 parses the received request message, and
  • the encryption machine simulation module 3 is constructed based on the security processing result data from the security module 4 Responding to the message, and transmitting the response message to the communication interface 1; (5) the communication interface 1 transmits the response message from the encryption machine analog module 3 back to the predetermined communication format The external system.
  • the encryption test simulation test method disclosed by the present invention comprises the following steps: (A1) receiving a request message from an external system in a predetermined communication format; (A2) parsing the received request message by Obtaining the parsed message data; (A3) processing the parsed message data to obtain security processing result data; (A4) constructing a response message based on the security processing result data; (A5) reporting the response message The text is transmitted back to the external system in the predetermined communication format.
  • the method further comprises: receiving and executing a control instruction from the user terminal, and transmitting the execution result back to the user terminal.
  • the step (A1) further comprises: extracting a message body from the request message based on the predetermined communication format.
  • the execution result includes an execution result status indication (i.e., execution success or execution failure) and/or execution result data.
  • the step (A2) further comprises: parsing the received request message based on a predetermined parameter.
  • the predetermined parameters include a key parameter and/or an abnormality simulation control parameter.
  • the parsed message data includes an instruction code, a key, and security data (ie, encryption and decryption data).
  • control instruction includes a configuration instruction and/or a log instruction.
  • the method further comprises: performing an initialization operation based on a predetermined configuration file.
  • the method further comprises: monitoring information related to the data processing process and recording the information related to the data processing process in the file.
  • the method further comprises: updating and/or re-reading the configuration file based on the received configuration instruction, and based on the received log The instruction outputs statistical information to the log file.
  • the step (A3) further includes: using the key pair to use the security data according to the parsed message data according to the parsed code data. Processing is performed to obtain the security processing result data.
  • the step (A4) further comprises: constructing the response message based on the predetermined parameter and the security processing result data.
  • the predetermined communication format is one of the following communication formats: a message communication interface is formed by a message length field, a message header field, and a message body field; (b) The message length interface and the message body field form a message communication interface; (c) Only the message body field constitutes a message communication interface (ie, no message length field and message header field).
  • the method further comprises: configuring the predetermined communication format based on the configuration file.
  • the method further comprises: configuring the predetermined parameter based on the configuration file.
  • the configuration file includes at least one of an environment variable, a log path, a log level flag, and a number of threads.
  • the log file includes a communication log for recording a communication message and an application log for recording abnormal situation information during processing, preferably in the present
  • the method further comprises: transmitting the log file to the user terminal based on the control instruction.
  • the method further comprises: configuring a security encryption algorithm used based on the configuration file.
  • the method further includes Comprising: defining a dynamic link library for each of a plurality of encryptor interface specifications (eg, message assembly format specifications), each of the dynamic link libraries being configured to parse the request with a corresponding the encryptor interface specification The message and the response message are constructed.
  • encryptor interface specifications eg, message assembly format specifications
  • the method further includes: loading one of the dynamic link libraries as a work dynamic link library based on the configuration file, thereby dynamically linking the work
  • the cipher interface specification corresponding to the library parses the request message and constructs the response message.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明提出了一种加密机模拟测试装置及方法,所述加密机模拟测试装置包括:通信接口、加密机模拟模块、安全模块和主控制模块。其中,所述加密机模拟模块用于解析接收到的请求报文,并将解析出的报文数据传送到安全模块,以及基于来自所述安全模块的安全处理结果数据构造应答报文,并将所述应答报文经所述通信接口传送到外部系统。本发明所公开的加密机模拟测试装置及方法配置灵活且具有高的分析精确度。

Description

加密机模拟测试装置及方法 技术领域
本发明涉及模拟测试装置及方法, 更具体地, 涉及加密机模拟测试装置及 方法。 背景技术
目前, 随着数据应用的日益广泛以及不同领域(例如金融领域)的业务种 类的日益丰富, 使用加密机(特别是硬件加密机)以完成安全性信息(即对安 全性要求较高的信息)的交互日益普遍, 因而, 针对加密机(特别是硬件加密 机) 的测试系统及方法变得越来越重要。
现有的加密机(特别是硬件加密机)测试装置及方法通常将测试终端连接 到真实的加密机上, 进而实施相关测试。
然而, 上述现有的方案具有如下问题: (1 )无法自由模拟各种加密机的 输出(即真实的加密机通常只能输出正确处理的结果, 但在测试过程中, 往往 需要测试系统对错误结果是否正确处理) ; (2 ) 由于加密机种类繁多且调试 设置步骤通常并不相同,故针对不同的加密机需要掌握不同的操作方法,从而 导致使用不便且成本增加; (3 )从安全角度出发, 常规的加密机通常被集成 在机箱内, 并且除通信接口外不提供其他交互通道, 因而在常规测试中, 虽然 测试人员可以通过解析通信日志和 /或应用日志来分析测试过程中产生的问 题,但是如果遇到加密机返回错误, 则通常难于仅根据加密机的错误应答码来 较准确地定位所述问题(即难于模拟错误结果的输出 ) 。
因此,存在如下需求: 提供一种配置灵活且具有高的分析精确度的加密机 模拟测试装置及方法。 发明内容
为了解决上述现有技术方案所存在的问题,本发明提出了一种加密机模拟 测试装置及方法。
本发明的目的是通过以下技术方案实现的: 一种加密机模拟测试装置, 所述加密机模拟测试装置包括: 通信接口,所述通信接口用于以预定的通信格式接收来自外部系统的请求 报文, 并将所述请求报文传送到加密机模拟模块, 以及将来自所述加密机模拟 模块的应答报文以所述预定的通信格式传送回所述外部系统;
加密机模拟模块, 所述加密机模拟模块用于解析接收到的所述请求报文, 并将解析出的报文数据传送到安全模块,以及基于来自所述安全模块的安全处 理结果数据构造应答报文, 并将所述应答报文传送到所述通信接口;
安全模块,所述安全模块用于处理所述解析出的报文数据以获得所述安全 处理结果数据, 并将所述安全处理结果数据传送回所述加密机模拟模块;
主控制模块,所述主控制模块用于在所述加密机模拟测试装置启动时基于 预定的配置文件初始化所述加密机模拟测试装置,以及监控与数据处理过程相 关的信息并维护日志文件。
在上面所公开的方案中,优选地, 所述通信接口进一步用于接收来自用户 终端的控制指令, 并将所述控制指令传送到所述主控制模块。
在上面所公开的方案中,优选地, 所述主控制模块进一步用于执行接收到 的所述控制指令, 并将执行结果经所述通信接口传送回所述用户终端。
在上面所公开的方案中,优选地,所述通信接口进一步包括报文传输单元, 其中,所述报文传输单元用于基于所述预定的通信格式从所述请求报文中提取 出报文体, 并将所述报文体传送到所述加密机模拟模块, 以及将接收到的所述 应答报文以所述预定的通信格式传送到所述外部系统。
在上面所公开的方案中,优选地, 所述通信接口进一步包括指令转发及数 据传输单元。所述指令转发及数据传输单元用于接收来自所述用户终端的控制 指令, 并将所述控制指令传送到所述主控制模块, 以及将来自所述主控制模块 的执行结果传送到所述用户终端。
在上面所公开的方案中,优选地, 所述执行结果包括执行结果状态指示和 /或执行结果数据。
在上面所公开的方案中, 优选地, 所述加密机模拟模块进一步包括: 报文解析单元,所述报文解析单元用于基于预定参数解析接收到的所述请 求报文, 并将解析出的报文数据传送到所述安全模块; 报文构造单元,所述报文构造单元用于基于预定参数和接收到的所述安全 处理结果数据构造所述应答报文, 并将所述应答报文传送到所述通信接口。
在上面所公开的方案中, 优选地, 所述预定参数包括密钥参数和 /或异常 模拟控制参数。
在上面所公开的方案中, 优选地, 所述解析出的报文数据包括指令码、 密 钥和安全数据。
在上面所公开的方案中, 优选地, 所述控制指令包括配置指令和 /或日志 指令。
在上面所公开的方案中, 优选地, 所述主控制模块进一步包括:
配置单元,所述配置单元用于在所述加密机模拟测试装置启动时基于预定 的配置文件初始化所述加密机模拟测试装置;
曰志记录单元,所述日志记录单元用于监控与数据处理过程相关的信息并 将所述与数据处理过程相关的信息记录在所述日志文件中。
在上面所公开的方案中,优选地, 所述主控制模块进一步包括指令处理单 元, 所述指令处理单元用于基于接收到的所述配置指令更新和 /或重新读取所 述配置文件, 以及基于接收到的所述日志指令将统计信息输出到所述日志文 件。
在上面所公开的方案中,优选地, 所述安全模块进一步用于基于所述解析 出的报文数据,根据所述指令码使用所述密钥对所述安全数据进行处理, 以获 得所述安全处理结果数据。
在上面所公开的方案中,优选地, 所述预定的通信格式是以下通信格式之 一: )由报文长度字段、报文头字段和报文体字段构成报文通信接口; (b ) 由报文长度字段、 报文体字段构成报文通信接口; (C )仅由报文体字段构成 报文通信接口 (即无报文长度字段和报文头字段) 。
在上面所公开的方案中,优选地, 所述配置单元基于所述配置文件配置所 述预定的通信格式。
在上面所公开的方案中,优选地, 所述配置单元基于所述配置文件配置所 述预定参数。
在上面所公开的方案中,优选地,所述配置文件包括环境变量、 日志路径、 曰志级别标志以及线程数目中的至少一个。
在上面所公开的方案中,优选地, 所述日志文件包括用于记录通信报文的 通信日志和用于记录处理过程中的异常情况信息的应用日志。
在上面所公开的方案中,优选地, 所述指令处理单元还用于基于所述控制 指令而将所述日志文件经所述通信接口传送到所述用户终端。
在上面所公开的方案中,优选地, 所述配置单元基于所述配置文件配置所 述安全模块使用的安全加密算法。
在上面所公开的方案中,优选地, 所述加密机模拟模块进一步用于为多个 加密机接口规范中的每个定义动态链接库,所述动态链接库中的每个用于以对 应的所述加密机接口规范解析所述请求报文以及构造所述应答报文。
在上面所公开的方案中,优选地, 所述加密机模拟模块进一步用于基于所 述配置文件加载所述动态链接库中的一个作为工作动态链接库 ,从而以所述工 作动态链接库所对应的加密机接口规范解析所述请求报文以及构造所述应答 报文。
本发明的目的也可以通过以下技术方案实现:
一种加密机模拟测试方法, 所述加密机模拟测试方法包括以下步骤:
( A1 ) 以预定的通信格式接收来自外部系统的请求报文;
( A2 )解析接收到的所述请求报文以获得解析出的报文数据;
( A3 )处理所述解析出的报文数据以获得安全处理结果数据;
( A4 )基于所述安全处理结果数据构造应答报文;
( A5 )将所述应答报文以所述预定的通信格式传送回所述外部系统。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 接收并执行来自 用户终端的控制指令, 并将执行结果传送回所述用户终端。
在上面所公开的方案中, 优选地, 所述步骤(A1 )进一步包括: 基于所述 预定的通信格式从所述请求报文中提取出报文体。
在上面所公开的方案中,优选地, 所述执行结果包括执行结果状态指示和 /或执行结果数据。
在上面所公开的方案中, 优选地, 所述步骤(A2 )进一步包括: 基于预定 参数解析接收到的所述请求报文。 在上面所公开的方案中, 优选地, 所述预定参数包括密钥参数和 /或异常 模拟控制参数。
在上面所公开的方案中, 优选地, 所述解析出的报文数据包括指令码、 密 钥和安全数据。
在上面所公开的方案中, 优选地, 所述控制指令包括配置指令和 /或日志 指令。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于预定的配置 文件执行初始化操作。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 监控与数据处理 过程相关的信息并将所述与数据处理过程相关的信息记录在日志文件中。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于接收到的所 述配置指令更新和 /或重新读取所述配置文件, 以及基于接收到的所述日志指 令将统计信息输出到所述日志文件。
在上面所公开的方案中, 优选地, 所述步骤(A3 )进一步包括: 基于所述 解析出的报文数据, 根据所述指令码使用所述密钥对所述安全数据进行处理, 以获得所述安全处理结果数据。
在上面所公开的方案中, 优选地, 所述步骤(A4 )进一步包括: 基于预定 参数和所述安全处理结果数据构造所述应答报文。
在上面所公开的方案中,优选地, 所述预定的通信格式是以下通信格式之 一: )由报文长度字段、报文头字段和报文体字段构成报文通信接口; (b ) 由报文长度字段、 报文体字段构成报文通信接口; (c )仅由报文体字段构成 报文通信接口 (即无报文长度字段和报文头字段) 。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于所述配置文 件配置所述预定的通信格式。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于所述配置文 件配置所述预定参数。
在上面所公开的方案中,优选地,所述配置文件包括环境变量、 日志路径、 曰志级别标志以及线程数目中的至少一个。
在上面所公开的方案中,优选地, 所述日志文件包括用于记录通信报文的 通信日志和用于记录处理过程中的异常情况信息的应用日志。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于所述控制指 令而将所述日志文件传送到所述用户终端。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于所述配置文 件配置所使用的安全加密算法。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 为多个加密机接 口规范中的每个定义动态链接库,所述动态链接库中的每个用于以对应的所述 加密机接口规范解析所述请求报文以及构造所述应答报文。
在上面所公开的方案中, 优选地, 所述方法进一步包括: 基于所述配置文 件加载所述动态链接库中的一个作为工作动态链接库,从而以所述工作动态链 接库所对应的加密机接口规范解析所述请求报文以及构造所述应答报文。
本发明所公开的加密机模拟测试装置及方法具有如下优点: (1 ) 支持 3 种常用的加密机通讯接口规范, 并可灵活配置; (2 )支持多种安全加密算法, 并可根据需求自由配置安全处理结果; ( 3 ) 实时记录通信日志及应用日志, 从而具有高的分析精确度; (4 )具有高的数据处理性能。 综上所述, 相对于 使用真实的加密机进行测试,本发明所公开的加密机模拟测试装置及方法可以 更自由模拟加密机的各种行为。 附图说明
结合附图, 本发明的技术特征以及优点将会被本领域技术人员更好地理 解, 其中:
图 1为根据本发明的实施例的加密机模拟测试装置的结构图;
图 2为根据本发明的实施例的加密机模拟测试方法的流程图。 具体实施方式
图 1是根据本发明的实施例的加密机模拟测试装置的结构图。 如图 1所示, 本发明所公开的加密机模拟测试装置包括通信接口 1、主控制模块 2、加密机模 拟模块 3和安全模块 4。 其中, 所述通信接口 1用于以预定的通信格式接收来自 外部系统的请求报文, 并将所述请求报文传送到所述加密机模拟模块 3 , 以及 将来自所述加密机模拟模块 3的应答报文以所述预定的通信格式传送回所述外 部系统。 所述加密机模拟模块 3用于解析接收到的所述请求报文, 并将解析出 的报文数据传送到所述安全模块 4 ,以及基于来自所述安全模块 4的安全处理结 果数据构造应答报文, 并将所述应答报文传送到所述通信接口 1。 所述安全模 块 4用于处理所述解析出的报文数据以获得所述安全处理结果数据, 并将所述 安全处理结果数据传送回所述加密机模拟模块 3。所述主控制模块 2用于在所述 加密机模拟测试装置启动时基于预定的配置文件初始化所述加密机模拟测试 装置, 以及监控与数据处理过程相关的信息并维护日志文件。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述通信接口 1进一 步用于接收来自用户终端的控制指令,并将所述控制指令传送到所述主控制模 块 2。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述主控制模块 2进 一步用于执行接收到的所述控制指令, 并将执行结果经所述通信接口 1传送回 所述用户终端。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述通信接口 1进一 步包括报文传输单元 5。其中, 所述报文传输单元 5用于基于所述预定的通信格 式从所述请求报文中提取出报文体,并将所述报文体传送到所述加密机模拟模 块 3 , 以及将接收到的所述应答报文以所述预定的通信格式传送到所述外部系 统。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述通信接口 1进一 步包括指令转发及数据传输单元 6。所述指令转发及数据传输单元 6用于接收来 自所述用户终端的控制指令, 并将所述控制指令传送到所述主控制模块 2 , 以 及将来自所述主控制模块 2的执行结果传送到所述用户终端。 示例性地, 所述 执行结果包括执行结果状态指示 (即执行成功或执行失败)和 /或执行结果数 据。
优选地,在本发明所公开的加密机模拟测试装置中, 所述加密机模拟模块
3进一步包括报文解析单元 7和报文构造单元 8。其中, 所述报文解析单元 7用于 基于预定参数解析接收到的所述请求报文,并将解析出的报文数据传送到所述 安全模块 4。所述报文构造单元 8用于基于预定参数和接收到的所述安全处理结 果数据构造所述应答报文, 并将所述应答报文传送到所述通信接口 1。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述预定参数包括 密钥参数和 /或异常模拟控制参数。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述解析出的报文 数据包括指令码、 密钥和安全数据 (即加解密数据) 。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述控制指令包括 配置指令和 /或日志指令。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述主控制模块 2进 一步包括配置单元 9和日志记录单元 11。 其中, 所述配置单元 9用于在所述加密 机模拟测试装置启动时基于预定的配置文件初始化所述加密机模拟测试装置 (例如基于预定的配置文件初始化所述通信接口 1、 所述加密机模拟模块 3以及 所述安全模块 4等) 。 所述日志记录单元 11用于监控与数据处理过程相关的信 息并将所述与数据处理过程相关的信息记录在所述日志文件中。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述主控制模块 2进 一步包括指令处理单元 10。所述指令处理单元 10用于基于接收到的所述配置指 令更新和 /或重新读取所述配置文件, 以及基于接收到的所述日志指令将统计 信息输出到所述日志文件。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述安全模块 4进一 步用于基于所述解析出的报文数据,根据所述指令码使用所述密钥对所述安全 数据进行处理, 以获得所述安全处理结果数据。
优选地,在本发明所公开的加密机模拟测试装置中, 所述预定的通信格式 是以下通信格式之一: ) 由报文长度字段、 报文头字段和报文体字段构成 报文通信接口; ( b ) 由报文长度字段、 报文体字段构成报文通信接口; ( c ) 仅由报文体字段构成报文通信接口 (即无报文长度字段和报文头字段) 。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述配置单元 9基于 所述配置文件配置所述预定的通信格式。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述配置单元 9基于 所述配置文件配置所述预定参数。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述配置文件包括 环境变量、 日志路径、 日志级别标志以及线程数目中的至少一个。 优选地,在本发明所公开的加密机模拟测试装置中, 所述日志文件包括用 于记录通信报文的通信日志和用于记录处理过程中的异常情况信息的应用日 士 优选地,在本发明所公开的加密机模拟测试装置中, 所述指令处理单元 10 还用于基于所述控制指令而将所述日志文件经所述通信接口 1传送到所述用户 终端。
优选地, 在本发明所公开的加密机模拟测试装置中, 所述配置单元 9基于 所述配置文件配置所述安全模块 4使用的安全加密算法。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述加密机模拟模 块 3进一步用于为多个加密机接口规范(例如报文组装格式规范) 中的每个定 义动态链接库,所述动态链接库中的每个用于以对应的所述加密机接口规范解 析所述请求报文以及构造所述应答报文。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述加密机模拟模 块 3进一步用于基于所述配置文件加载所述动态链接库中的一个作为工作动态 链接库,从而以所述工作动态链接库所对应的加密机接口规范解析所述请求报 文以及构造所述应答 ^艮文。
示例性地,在本发明所公开的加密机模拟测试装置中, 所述加密机模拟模 块 3采用了统一的接口函数定义, 并且对于每一种加密机接口规范, 定义对应 的解析的动态链接库, 随后根据配置参数, 决定具体加载哪一个动态链接库, 从而链接采用统一接口的不同功能处理函数, 以实现模拟不同种类的加密机 (特别是硬件加密机) 的处理行为。 由上可见, 由于采用了统一的公开接口, 测试人员可以根据特定的需要, 自行实现处理功能, 以完成相应的测试, 因此 具有较高的应用灵活性。
示例性地, 在本发明所公开的加密机模拟测试装置的基本工作原理如下: ( 1 )所述通信接口 1 以预定的通信格式接收来自外部系统的请求报文, 并将 所述请求报文传送到所述加密机模拟模块 3 (例如基于 TCP/ IP协议从 TCP上 读取两字节的长度位数据, 并将其转换为报文的长度, 随后从 TCP中提取指令 长度的数据, 从而将提取出的报文体传送到所述加密机模拟模块 3 ) ; ( 2 ) 所述加密机模拟模块 3解析接收到的所述请求报文,并将解析出的报文数据传 送到所述安全模块 4; ( 3 )所述安全模块 4处理所述解析出的报文数据以获 得所述安全处理结果数据,并将所述安全处理结果数据传送回所述加密机模拟 模块 3; ( 4 )所述加密机模拟模块 3基于来自所述安全模块 4的安全处理结 果数据构造应答报文, 并将所述应答报文传送到所述通信接口 1 ; ( 5 )所述 通信接口 1将来自所述加密机模拟模块 3的应答报文以所述预定的通信格式传 送回所述外部系统。
图 2为根据本发明的实施例的加密机模拟测试方法的流程图。 如图 2所示, 本发明所公开的加密机模拟测试方法包括如下步骤: ( A1 )以预定的通信格式 接收来自外部系统的请求报文; ( A2 )解析接收到的所述请求报文以获得解析 出的报文数据; ( A3 )处理所述解析出的报文数据以获得安全处理结果数据; ( A4 )基于所述安全处理结果数据构造应答报文; ( A5 )将所述应答报文以所 述预定的通信格式传送回所述外部系统。
优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 接收并执行来自用户终端的控制指令, 并将执行结果传送回所述用户终端。
优选地, 在本发明所公开的加密机模拟测试方法中, 所述步骤(A1 )进一 步包括: 基于所述预定的通信格式从所述请求报文中提取出报文体。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述执行结果包括 执行结果状态指示 (即执行成功或执行失败)和 /或执行结果数据。
优选地, 在本发明所公开的加密机模拟测试方法中, 所述步骤(A2 )进一 步包括: 基于预定参数解析接收到的所述请求报文。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述预定参数包括 密钥参数和 /或异常模拟控制参数。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述解析出的报文 数据包括指令码、 密钥和安全数据 (即加解密数据) 。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述控制指令包括 配置指令和 /或日志指令。
优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 基于预定的配置文件执行初始化操作。 优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 监控与数据处理过程相关的信息并将所述与数据处理过程相关的信息记录在 曰志文件中。
优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 基于接收到的所述配置指令更新和 /或重新读取所述配置文件, 以及基于接收 到的所述日志指令将统计信息输出到所述日志文件。
优选地, 在本发明所公开的加密机模拟测试方法中, 所述步骤(A3 )进一 步包括: 基于所述解析出的报文数据,根据所述指令码使用所述密钥对所述安 全数据进行处理, 以获得所述安全处理结果数据。
优选地, 在本发明所公开的加密机模拟测试方法中, 所述步骤(A4 )进一 步包括: 基于预定参数和所述安全处理结果数据构造所述应答报文。
优选地,在本发明所公开的加密机模拟测试方法中, 所述预定的通信格式 是以下通信格式之一: ) 由报文长度字段、 报文头字段和报文体字段构成 报文通信接口; ( b ) 由报文长度字段、 报文体字段构成报文通信接口; ( c ) 仅由报文体字段构成报文通信接口 (即无报文长度字段和报文头字段) 。
优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 基于所述配置文件配置所述预定的通信格式。
优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 基于所述配置文件配置所述预定参数。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述配置文件包括 环境变量、 日志路径、 日志级别标志以及线程数目中的至少一个。
优选地,在本发明所公开的加密机模拟测试方法中, 所述日志文件包括用 于记录通信报文的通信日志和用于记录处理过程中的异常情况信息的应用日 士 优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 基于所述控制指令而将所述日志文件传送到所述用户终端。
优选地,在本发明所公开的加密机模拟测试方法中,所述方法进一步包括: 基于所述配置文件配置所使用的安全加密算法。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述方法进一步包 括: 为多个加密机接口规范(例如报文组装格式规范)中的每个定义动态链接 库,所述动态链接库中的每个用于以对应的所述加密机接口规范解析所述请求 报文以及构造所述应答报文。
示例性地,在本发明所公开的加密机模拟测试方法中, 所述方法进一步包 括: 基于所述配置文件加载所述动态链接库中的一个作为工作动态链接库,从 而以所述工作动态链接库所对应的加密机接口规范解析所述请求报文以及构 造所述应答报文。
尽管本发明是通过上述的优选实施方式进行描述的,但是其实现形式并不 局限于上述的实施方式。 应该认识到: 在不脱离本发明主旨和范围的情况下,

Claims

权利要求
1. 一种加密机模拟测试装置, 所述加密机模拟测试装置包括:
通信接口,所述通信接口用于以预定的通信格式接收来自外部系统的请求 报文, 并将所述请求报文传送到加密机模拟模块, 以及将来自所述加密机模拟 模块的应答报文以所述预定的通信格式传送回所述外部系统;
加密机模拟模块, 所述加密机模拟模块用于解析接收到的所述请求报文, 并将解析出的报文数据传送到安全模块,以及基于来自所述安全模块的安全处 理结果数据构造应答报文, 并将所述应答报文传送到所述通信接口;
安全模块,所述安全模块用于处理所述解析出的报文数据以获得所述安全 处理结果数据, 并将所述安全处理结果数据传送回所述加密机模拟模块; 主控制模块,所述主控制模块用于在所述加密机模拟测试装置启动时基于 预定的配置文件初始化所述加密机模拟测试装置,以及监控与数据处理过程相 关的信息并维护日志文件。
2. 根据权利要求 1所述的加密机模拟测试装置, 其特征在于, 所述通信接 口进一步用于接收来自用户终端的控制指令,并将所述控制指令传送到所述主 控制模块。
3. 根据权利要求 2所述的加密机模拟测试装置, 其特征在于, 所述主控制 模块进一步用于执行接收到的所述控制指令,并将执行结果经所述通信接口传 送回所述用户终端。
4. 根据权利要求 3所述的加密机模拟测试装置, 其特征在于, 所述通信接 口进一步包括报文传输单元, 其中, 所述报文传输单元用于基于所述预定的通 信格式从所述请求报文中提取出报文体,并将所述报文体传送到所述加密机模 拟模块,以及将接收到的所述应答报文以所述预定的通信格式传送到所述外部 系统。
5. 根据权利要求 4所述的加密机模拟测试装置, 其特征在于, 所述通信接 口进一步包括指令转发及数据传输单元。所述指令转发及数据传输单元用于接 收来自所述用户终端的控制指令, 并将所述控制指令传送到所述主控制模块, 以及将来自所述主控制模块的执行结果传送到所述用户终端。
6. 根据权利要求 5所述的加密机模拟测试装置, 其特征在于, 所述执行结 果包括执行结果状态指示和 /或执行结果数据。
7. 根据权利要求 6所述的加密机模拟测试装置, 其特征在于, 所述加密机 模拟模块进一步包括:
报文解析单元,所述报文解析单元用于基于预定参数解析接收到的所述请 求报文, 并将解析出的报文数据传送到所述安全模块;
报文构造单元,所述报文构造单元用于基于预定参数和接收到的所述安全 处理结果数据构造所述应答报文, 并将所述应答报文传送到所述通信接口。
8. 根据权利要求 7所述的加密机模拟测试装置, 其特征在于, 所述预定参 数包括密钥参数和 /或异常模拟控制参数。
9. 根据权利要求 8所述的加密机模拟测试装置, 其特征在于, 所述解析出 的报文数据包括指令码、 密钥和安全数据。
10. 根据权利要求 9所述的加密机模拟测试装置, 其特征在于, 所述控制 指令包括配置指令和 /或日志指令。
11. 根据权利要求 10所述的加密机模拟测试装置, 其特征在于, 所述主控 制模块进一步包括:
配置单元,所述配置单元用于在所述加密机模拟测试装置启动时基于预定 的配置文件初始化所述加密机模拟测试装置;
曰志记录单元,所述日志记录单元用于监控与数据处理过程相关的信息并 将所述与数据处理过程相关的信息记录在所述日志文件中。
12. 根据权利要求 11所述的加密机模拟测试装置, 其特征在于, 所述主控 制模块进一步包括指令处理单元,所述指令处理单元用于基于接收到的所述配 置指令更新和 /或重新读取所述配置文件, 以及基于接收到的所述日志指令将 统计信息输出到所述日志文件。
1 3. 根据权利要求 12所述的加密机模拟测试装置, 其特征在于, 所述安全 模块进一步用于基于所述解析出的报文数据,根据所述指令码使用所述密钥对 所述安全数据进行处理, 以获得所述安全处理结果数据。
14. 根据权利要求 1 3所述的加密机模拟测试装置, 其特征在于, 所述预定 的通信格式是以下通信格式之一: ) 由报文长度字段、 报文头字段和报文 体字段构成报文通信接口; (b ) 由报文长度字段、 报文体字段构成报文通信 接口; ( c )仅由报文体字段构成报文通信接口 (即无报文长度字段和报文头 字段) 。
15. 根据权利要求 14所述的加密机模拟测试装置, 其特征在于, 所述配置 单元基于所述配置文件配置所述预定的通信格式。
16. 根据权利要求 15所述的加密机模拟测试装置, 其特征在于, 所述配置 单元基于所述配置文件配置所述预定参数。
17. 根据权利要求 16所述的加密机模拟测试装置, 其特征在于, 所述配置 文件包括环境变量、 日志路径、 日志级别标志以及线程数目中的至少一个。
18. 根据权利要求 17所述的加密机模拟测试装置, 其特征在于, 所述日志 文件包括用于记录通信报文的通信日志和用于记录处理过程中的异常情况信 息的应用日志。
19. 根据权利要求 18所述的加密机模拟测试装置, 其特征在于, 所述指令 处理单元还用于基于所述控制指令而将所述日志文件经所述通信接口传送到 所述用户终端。
20. 根据权利要求 19所述的加密机模拟测试装置, 其特征在于, 所述配置 单元基于所述配置文件配置所述安全模块使用的安全加密算法。
21. 根据权利要求 20所述的加密机模拟测试装置, 其特征在于, 所述加密 机模拟模块进一步用于为多个加密机接口规范中的每个定义动态链接库,所述 动态链接库中的每个用于以对应的所述加密机接口规范解析所述请求报文以 及构造所述应答报文。
22. 根据权利要求 21所述的加密机模拟测试装置, 其特征在于, 所述加密 机模拟模块进一步用于基于所述配置文件加载所述动态链接库中的一个作为 工作动态链接库,从而以所述工作动态链接库所对应的加密机接口规范解析所 述请求报文以及构造所述应答报文。
23. 一种加密机模拟测试方法, 所述加密机模拟测试方法包括以下步骤: ( A1 ) 以预定的通信格式接收来自外部系统的请求报文;
( A2 )解析接收到的所述请求报文以获得解析出的报文数据;
( A3 )处理所述解析出的报文数据以获得安全处理结果数据; ( A4 )基于所述安全处理结果数据构造应答报文;
( A5 )将所述应答报文以所述预定的通信格式传送回所述外部系统。
24. 根据权利要求 23所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 接收并执行来自用户终端的控制指令, 并将执行结果传送回所述 用户终端。
25. 根据权利要求 24所述的加密机模拟测试方法, 其特征在于, 所述步骤 ( A1 )进一步包括: 基于所述预定的通信格式从所述请求报文中提取出报文体。
26. 根据权利要求 25所述的加密机模拟测试方法, 其特征在于, 所述执行 结果包括执行结果状态指示和 /或执行结果数据。
27. 根据权利要求 26所述的加密机模拟测试方法, 其特征在于, 所述步骤 ( A2 )进一步包括: 基于预定参数解析接收到的所述请求报文。
28. 根据权利要求 27所述的加密机模拟测试方法, 其特征在于, 所述预定 参数包括密钥参数和 /或异常模拟控制参数。
29. 根据权利要求 28所述的加密机模拟测试方法, 其特征在于, 所述解析 出的报文数据包括指令码、 密钥和安全数据。
30. 根据权利要求 29所述的加密机模拟测试方法, 其特征在于, 所述控制 指令包括配置指令和 /或日志指令。
31. 根据权利要求 30所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 基于预定的配置文件执行初始化操作。
32. 根据权利要求 31所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括:监控与数据处理过程相关的信息并将所述与数据处理过程相关的 信息记录在日志文件中。
33. 根据权利要求 32所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 基于接收到的所述配置指令更新和 /或重新读取所述配置文件, 以及基于接收到的所述日志指令将统计信息输出到所述日志文件。
34. 根据权利要求 33所述的加密机模拟测试方法, 其特征在于, 所述步骤 ( A3 )进一步包括: 基于所述解析出的报文数据, 根据所述指令码使用所述密 钥对所述安全数据进行处理, 以获得所述安全处理结果数据。
35. 根据权利要求 34所述的加密机模拟测试方法, 其特征在于, 所述步骤 ( A4 )进一步包括: 基于预定参数和所述安全处理结果数据构造所述应答报文。
36. 根据权利要求 35所述的加密机模拟测试方法, 其特征在于, 所述预定 的通信格式是以下通信格式之一: ) 由报文长度字段、 报文头字段和报文 体字段构成报文通信接口; (b ) 由报文长度字段、 报文体字段构成报文通信 接口; ( c )仅由报文体字段构成报文通信接口 (即无报文长度字段和报文头 字段) 。
37. 根据权利要求 36所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 基于所述配置文件配置所述预定的通信格式。
38. 根据权利要求 37所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 基于所述配置文件配置所述预定参数。
39. 根据权利要求 38所述的加密机模拟测试方法, 其特征在于, 所述配置 文件包括环境变量、 日志路径、 日志级别标志以及线程数目中的至少一个。
40. 根据权利要求 39所述的加密机模拟测试方法, 其特征在于, 所述日志 文件包括用于记录通信报文的通信日志和用于记录处理过程中的异常情况信 息的应用日志。
41. 根据权利要求 40所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 基于所述控制指令而将所述日志文件传送到所述用户终端。
42. 根据权利要求 41所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 基于所述配置文件配置所使用的安全加密算法。
43. 根据权利要求 42所述的加密机模拟测试方法, 其特征在于, 所述方法 进一步包括: 为多个加密机接口规范中的每个定义动态链接库, 所述动态链接 库中的每个用于以对应的所述加密机接口规范解析所述请求报文以及构造所 述应答报文。
44. 根据权利要求 43所述的加密机模拟测试方法, 其特征在于, 所 述方法进一步包括: 基于所述配置文件加载所述动态链接库中的一个作 为工作动态链接库, 从而以所述工作动态链接库所对应的加密机接口规 范解析所述请求报文以及构造所述应答报文。
PCT/CN2012/083805 2011-11-02 2012-10-31 加密机模拟测试装置及方法 Ceased WO2013064063A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110341828.X 2011-11-02
CN201110341828.XA CN103095513B (zh) 2011-11-02 2011-11-02 加密机模拟测试装置及方法

Publications (1)

Publication Number Publication Date
WO2013064063A1 true WO2013064063A1 (zh) 2013-05-10

Family

ID=48191331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/083805 Ceased WO2013064063A1 (zh) 2011-11-02 2012-10-31 加密机模拟测试装置及方法

Country Status (2)

Country Link
CN (1) CN103095513B (zh)
WO (1) WO2013064063A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483177B (zh) * 2017-07-07 2020-10-23 苏州浪潮智能科技有限公司 一种验证加密设备加密数据真实性的方法及系统
CN109408393B (zh) * 2018-11-07 2021-07-27 深圳市腾讯网络信息技术有限公司 应用测试方法、装置及设备和计算机可读存储介质
CN110380932B (zh) * 2019-07-17 2021-11-12 中国工商银行股份有限公司 用于安全设备的测试方法和装置、以及测试系统
CN113065150B (zh) * 2021-05-06 2024-03-01 中国工商银行股份有限公司 一种加密算法模块的测试方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060206906A1 (en) * 2005-03-10 2006-09-14 International Business Machines Corporation Web client endpoint emulator
WO2007073623A1 (en) * 2005-12-29 2007-07-05 Zte Corporation A method of downloading digital certification and key
US20080137543A1 (en) * 2006-12-12 2008-06-12 Cisco Technology, Inc. Remote testing of an electronic device via network connection
CN101534227A (zh) * 2009-04-16 2009-09-16 北京星网锐捷网络技术有限公司 网络管理软件测试方法及系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164365A (zh) * 2011-03-14 2011-08-24 上海华腾软件系统有限公司 移动通票仿真测试系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060206906A1 (en) * 2005-03-10 2006-09-14 International Business Machines Corporation Web client endpoint emulator
WO2007073623A1 (en) * 2005-12-29 2007-07-05 Zte Corporation A method of downloading digital certification and key
US20080137543A1 (en) * 2006-12-12 2008-06-12 Cisco Technology, Inc. Remote testing of an electronic device via network connection
CN101534227A (zh) * 2009-04-16 2009-09-16 北京星网锐捷网络技术有限公司 网络管理软件测试方法及系统

Also Published As

Publication number Publication date
CN103095513A (zh) 2013-05-08
CN103095513B (zh) 2017-05-31

Similar Documents

Publication Publication Date Title
Voyiatzis et al. A Modbus/TCP fuzzer for testing internetworked industrial systems
CN101179438B (zh) 一种远程诊断系统及方法
CN110580225A (zh) 业务系统的模拟方法及装置
CN106209515B (zh) 接入网设备自动化测试系统
CN116382968B (zh) 外部设备的故障检测方法以及装置
CN106294102A (zh) 应用程序的测试方法、客户端、服务器及系统
US7827531B2 (en) Software testing techniques for stack-based environments
CN110650035A (zh) 用于生成和管理工业网络中的虚拟工业设备的方法和系统
WO2013064063A1 (zh) 加密机模拟测试装置及方法
US8843786B2 (en) System for injecting protocol specific errors during the certification of components in a storage area network
CN112148537B (zh) 总线监控装置及方法、存储介质、电子装置
CN109471763A (zh) 抓取NVME硬盘trace的方法、装置、设备及系统
Ma et al. LLM-assisted IoT testing: Finding conformance bugs in matter SDKs
CN112363975B (zh) 组态软件与fpga的交互方法及交互系统
CN119783597A (zh) 一种dpu的rdma仿真验证方法及系统
CN100384286C (zh) 智能卡的测试方法
CN110825538A (zh) 一种基于mq可自定义数据类型动态进行数据交互的方法
Ilgner et al. Fuzzing ICS Protocols: Modbus Fuzzer Framework
Huang et al. LLM-Assisted Model-Based Fuzzing of Protocol Implementations
CN115964835B (zh) 基于uvm的链路加密模块验证方法和装置、存储介质和终端
CN117392929A (zh) 画面仿真测试方法、装置及电子设备
Dobler et al. A software fault injector to validate implementations of a safety communication protocol
CN119690697A (zh) 基于通信桥的Web端与Native端交互方法、装置、设备及介质
Akhtar Embedded MPU based test bench for communication lines used in industrial electrical and electronics products
KR20250159531A (ko) 분산 환경 시스템에 대한 테스트 방법 및 이를 위한 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12846751

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM1205 DATED 21/08/2014)

122 Ep: pct application non-entry in european phase

Ref document number: 12846751

Country of ref document: EP

Kind code of ref document: A1