EP3603013A1 - Method and apparatus for exchanging messages - Google Patents

Method and apparatus for exchanging messages

Info

Publication number
EP3603013A1
EP3603013A1 EP18727208.3A EP18727208A EP3603013A1 EP 3603013 A1 EP3603013 A1 EP 3603013A1 EP 18727208 A EP18727208 A EP 18727208A EP 3603013 A1 EP3603013 A1 EP 3603013A1
Authority
EP
European Patent Office
Prior art keywords
message
checksum
digital signature
communication partner
last
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.)
Withdrawn
Application number
EP18727208.3A
Other languages
German (de)
French (fr)
Inventor
Hans Aschauer
Steffen Fries
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.)
Siemens AG
Original Assignee
Siemens AG
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 Siemens AG filed Critical Siemens AG
Publication of EP3603013A1 publication Critical patent/EP3603013A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/326Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the transport layer [OSI layer 4]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)

Definitions

  • the invention relates to a method and a device for the computer-aided exchange of messages.
  • Security protocols such as TLS and others use random numbers during the negotiation of a session key to increase entropy in the actual key negotiation.
  • it enables both communication partners to contribute to the key negotiation, especially in the case of the use of a unilaterally authenticated connection, in which the client sends the server encrypted information with the public key of the server.
  • An object of the present invention is to realize a method and a device for the computer-aided exchange of cryptographically protected messages as efficiently as possible.
  • the invention relates to a method for exchanging messages with the following method steps:
  • a second checksum is formed over the second message parts except for a last message part of the second message parts
  • the second checksum is formed on the basis of the second checksum and taking into account the last message part;
  • the terms “perform”, “compute”, “computationally”, “compute”, “establish”, “generate”, “configure”, “reconstruct” and the like preferably to actions and / or processes and / or processing steps that modify and / or generate data and / or transfer the data into other data, the data being presented or may be present in particular as physical quantities, for example as electrical impulses.
  • the term “computer” should be interpreted as broadly as possible, in particular all electronic ones Cover devices with data processing capabilities. Computers can thus, for example, personal computers, servers, programmable logic controllers (PLCs), handheld computer systems, Pocket PC devices, mobile phones and other communication devices that can process data with computer assistance, its processors and other electronic equipment for data ⁇ processing ,
  • computer-aided can-making in connection with the inventions, for example, be an implementation of the method ver ⁇ stood, in which in particular a processor to execute at least one step of the method.
  • a "processor” may in connection with the invention, for example, a machine or an electronic
  • a processor may, in particular, be a central processing unit (CPU), a microprocessor or a microcontroller, for example an application-specific integrated circuit or a digital signal processor, possibly in combination with a memory unit for storing program instructions, etc act.
  • a processor may, for example, also be an IC (integrated circuit ⁇ circular, engl. Integrated Circuit), in particular an FPGA (engl. Field Programmable Gate Array) or an ASIC (application specific integrated circuit, engl. Application- Specific Integrated Circuit) , or a DSP (Digital Sig ⁇ nal revitalizor, English Digital Signal Processor) or a graphics processor GPU (Graphic Processing Unit) act.
  • CPU central processing unit
  • microprocessor or a microcontroller for example an application-specific integrated circuit or a digital signal processor, possibly in combination with a memory unit for storing program instructions, etc act.
  • IC integrated circuit ⁇ circular, engl. Integrated Circuit
  • FPGA engl. Field Programmable Gate Array
  • ASIC application specific
  • a processor can be understood as a virtualized processor, a virtual machine or a soft CPU. It can also be, for example, a programmable processor which is equipped with configuration steps for carrying out said method according to the invention or is configured with configuration steps in such a way that the programmable processor has the inventive features of the method, the component, the modules or other aspects and / or or partial aspects of the invention realized.
  • a “storage unit” or a “memory module” and the like in connection with the invention for example a volatile memory in the form of RAM (engl. Random-Access Memory, RAM) or a persistent storage such as a hard disk or a disk can be understood ⁇ the ,
  • a "checksum” can be understood, for example, as a cryptographic checksum or a cryptographic hash or a hash, which is formed or calculated in particular by means of a hash function or a cryptographic hash function via messages or message parts. special also a cryptographic message authentication code to be understood.
  • a “nonce” in the context of the invention for example, a cryptographic nonce (abbreviation for “used only once”) “number used once”) is understood, which is used in particular only once in the respective context.
  • the method is advantageous, for example, to achieve a cryptographic protection of multiple messages in a message exchange, in particular, the cryptographic protection is realized by means of digital signatures and nonces.
  • the nonces are not transmitted directly, but can be calculated from previous messages reproducible in particular, wherein a sum of a previous After ⁇ report is taken into account for the respective nonce itself.
  • This take into account is realized such that, in particular for creating the particular digital signature and the nonce certain cryptographic calculations are preferably a single time ⁇ be calculated and in particular not fully separately for the respective nonce and the respective digital signature.
  • the procedure is particularly relevant in the context of a key Negotiation between communication partners advantageous. This is particularly advantageous, since embedded systems Weni ⁇ ger effort for the calculation of the digital signature key negotiation messages is needed. Preferably, the effort for the hash operation in the actual digital signature can thereby be neglected.
  • the message exchange (eg in a key negotiation) reduces the required bandwidth for the messages, in particular, since the nonces in particular do not have to be sent along. In addition, especially by the inclusion of the previous message in the calculation of the current nonce chaining of messages is achieved in the appropriate order.
  • the following method steps are carried out by the first communication partner before receiving in method step a):
  • the first message is divided into first message parts
  • a first sub-checksum on the first message ⁇ parts is formed to a last message part of the first message parts
  • the first checksum is formed on the basis of the first sub-checksum and taking into account a last message part of the first message parts;
  • an initialization value is added to the last message part of the first message; ad) sending the first message with the first digital signature to the second communication partner.
  • the method is advantageous to a nonce for the first message to be ⁇ expected without this with the message mitzunch particularly simple manner. It can be added in the calculation initialization to attach, for example, at initialization of the process in step ac) to the true ⁇ probability of a multiple use of the nonce is minimized for the first nonce.
  • the initialization value is preferably the same length as the first checksum, e.g. Eg 256 bit.
  • a fixed message component length is specified for the message parts, and the result for the last message parts is in each case a residual message component length which is less than or equal to the message component length.
  • the method is advantageous in order, in particular, to calculate the corresponding checksums more easily.
  • an item M of length m is split into message parts (or also part messages) of length 1.
  • the message is padded in particular by a so-called padding, so that the result is a message M x whose length ⁇ ⁇ is a multiple of 1.
  • the padding for example, has a minimum length p> 0 that the padding is no longer in the last block (also called After ⁇ directed in part) is for the case fits (ie when m modulo 1> 1 - p), another partial message attached, which consists only of padding.
  • the message length is an integer multiple of 64 bits and the message length in particular is 256 bits or 512 bits long.
  • the message key material for cryptographic's method between the communication partners ⁇ be exchanged or the result is included in a key derivation means of with-.
  • the method is advantageous in order to establish the key material between the communication partners, in particular with as few cryptographic hash operations as possible. In particular, you could also use the public key with the messages
  • the first checksum and / or the second checksum is a cryptographic hash.
  • the first checksum and / or the second checksum are calculated by means of a cryptographic hash function.
  • further digital signatures and further nonces are calculated by the first communication partner and / or the second communication partner according to method steps a) -e) for further messages, and the further messages are sent with their respective further digital signatures to the computer sent corresponding communication partner.
  • checksums are calculated in each case, and in particular when calculating the respective further nonce, the checksum of the previous message is taken into account.
  • the method is advantageous in that, in particular, to protect a plurality of messages cryptographically and to complicate a man-in-the-middle attack.
  • the invention relates to a device for transmitting a message, comprising: a first communication module for receiving a first message with the first digital signature;
  • a first test module for testing the first digital signature, wherein a first checksum is calculated for testing the first digital signature
  • a first provisioning module for providing a second check sum for a second message, wherein the second message is divided into second message parts
  • a second checksum is formed over the second message parts except for a last message part of the second message parts
  • the second checksum is formed on the basis of the second checksum and taking into account the last message part;
  • a first calculation module for forming a second di ⁇ digital signature for the second message based on the second checksum
  • a second calculation module for calculating a second nonce from the second Unterprüfsumme and Be ⁇ consideration of the last message part, wherein the first sum is added for this calculation to the last message part,
  • the first communication module averages the second message via ⁇ .
  • the device comprises at least one further module or several further modules for carrying out the method according to the invention (or one of its embodiments).
  • a computer program product with Programmbe ⁇ is missing for carrying said drive ⁇ claimed invention Ver wherein each one of the methods according to the invention, all the methods of the invention or a combination of the methods of the invention can be carried out by means of the computer program product.
  • a variant of the computer program product is claimed with program instructions for configuring a creation device, for example a 3D printer, a computer system or a production machine suitable for creating processors and / or devices, wherein the creation device is configured with the program instructions such that the inventive Device to be created.
  • a provisioning device for storing and / or providing the computer program product.
  • the provisioning device is, for example, a data carrier which stores and / or makes available the computer program product.
  • the provisioning device is for example a network service, a computer system, a server system, in particular a distributed computer system, a cloud-based computer system and / or virtual computer system, which preferably stores and / or provides the computer program product in the form of a data stream.
  • This provision takes place, for example, as a download in the form of a program data block and / or command data block, preferably as a file, in particular as a download file, or as a data stream, in particular as a download data stream, of the complete computer program product.
  • this provision can also be carried out, for example, as a partial download, which consists of several parts and in particular is downloaded via a peer-to-peer network or provided as a data stream.
  • a computer program product is read into a system using the data carrier providing device and executes the program instructions so that the method according to the invention is executed on a computer or the authoring device is configured such that the device according to the invention is created.
  • Fig. 2 shows another embodiment of the invention
  • FIG. 3 shows another embodiment of the invention
  • 4 shows a further embodiment of the invention
  • a combination of hardware (components) and software (components) according to the invention can occur in particular if some of the effects according to the invention are preferably exclusively due to special hardware (eg a processor in the form of an ASIC or FPGA) and / or another part by the (processor and / or memory-based) software is effected.
  • special hardware eg a processor in the form of an ASIC or FPGA
  • the processing and / or memory-based software is effected.
  • all the following exemplary embodiments are intended to show, by way of example only, some ways in which such implementations of the teaching according to the invention could, in particular, be considered.
  • Fig. 1 shows a first embodiment of the invention as a flow chart of the inventive method for exchanging messages.
  • the method is preferably realized computer-aided, wherein in particular the messages are cryptographically protected by the method.
  • the method may be, for example, a first communication. partners and a second communication partner are realized, for example, to exchange cryptographic key material for a cryptographically protected communication with each other.
  • the method comprises a method step 110 in which a first message for a key exchange is generated by a first communication partner. This is similar to the known method such as the Diffie-Hellman key exchange method.
  • the method comprises a method step 112 for calculating the first checksum for a first message by the first communication partner, wherein the first message is divided into first message parts.
  • the message parts is preferably a fixed message length z. B. predetermined 512 bits.
  • a message M of length m can be decomposed into submessages of length 1.
  • the message is usually padded by padding, so that the result is a message M x whose length m is a multiple of 1. If the padding has a minimum length p> 0, then in case the padding no longer fits into the last block (ie if m modulo 1> 1 - p), another padding message part consisting of only padding is appended.
  • a number of message parts for a message eg message ⁇ ⁇
  • padding bits
  • d g m / 1 + g
  • g 0 means that no additional padding sub-message is required, consisting only of padding bits
  • g 1 means that an additional padding sub-message is required.
  • this is secondary to the inventive core, since these are in particular conventional padding methods which are known to a person skilled in the art.
  • the corresponding first (or second or subsequent) message parts may then be numbered from 0 to d (for example, if d is rounded down) or indexed, where d is the last message part of the (first) message parts and 0 is the first message part of the (first ) Is message parts.
  • d is the last message part of the (first) message parts
  • 0 is the first message part of the (first ) Is message parts.
  • z. B. is rounded up
  • a first checksum is formed over the first message parts except for a last message part d of the first message parts.
  • the first sub-checksum is formed over the first message parts 0 to d-1.
  • a cryptographic hash function can be used to calculate these partial checksums, such as. SHA256, which is available through the OpenSSL library. Specifically, first the cryptographic hash function is initialized, e.g. By calling SHA256_Init (CTX, (7), where CTX is context data for the SHA algorithm.
  • CTX is context data for the SHA algorithm.
  • the respective partial checksums are calculated for the corresponding message parts. This can be done, for example, by calling SHA256_Update (CTX, message part, ...) for the respective corresponding message part.
  • the SHA_Update function works as follows. This spei ⁇ chert all data not yet give a full message part (ie, the length of which does not correspond to the fixed josenteil- length) between in order to be considered at the next call SHA update or SHA_Final. These data are stored in particular in the context data.
  • CTX_K The copied context data are also referred to as CTX_K.
  • CTX_K There are at this time preference ⁇ as that is, two data structures stored CTX and CTX_K the education each part of the respective Unterprüfsumme to.
  • a sub-checksum can include, for example, the context information (including context or context data) or, in the case of a concrete implementation, this can also correspond, for example, if the sub-checksum for the penultimate message part d-1 has been calculated.
  • the context information CTX for the SHA implementation of OpenSSL corresponds to the sub-checksum or forms at least part of the respective sub-checksum (eg first / second sub-checksum).
  • the preceding partial checksum (if present) of a particular message part can be taken into account, in particular for the respective partial checksum.
  • the first checksum is formed based on the first Unterprüf ⁇ sum and taking into account a last message part, the first parts of the message in a step 130 by the first communication partner.
  • the last message part d is padded with padding first to the last message component length, if the remaining message part length e is not equal to 0.
  • the corresponding checksum (eg first or second checksum) is then calculated, in which, for example, a partial checksum of the last message part is taken into account as a function of the partial checksum of the preceding message part (message part d-1). This is realized, for example, by the function
  • SHA256 Final calculates the (first) checksum. In other words, but not the entire first message must be received, but only the "overhang" d (ie the last message part) are considered.
  • a first digital signature for the first message is then in a step 140 by the first communi ⁇ cation partner by The first signature with the first digital signature is then sent to the second communication partner by the first communication partner in a method step 150. In this case, in particular, only the first message and the first digital signature are used shipped without the first nonce.
  • the following explains how to calculate a first nonce based on the first checksum and taking into account the last unmodified message part (ie the last message part without the aforementioned padding).
  • first at a step 160 checks on ⁇ whether a checksum of a preceding message is present. Since the first message has not been preceded by another message (path N2), there is no checksum of a previous message which, for. B. in a check of a digital signature by a communication partner (here, for example, the first communication partner) would have been calculated. If a checksum of a previous message were present (path Y2), then this checksum would be appended to the last message part d of the first message (ie to the end of the last message part d) in a method step 165.
  • checksum available is thus preferably added directly to the end of the last message part, the checksum of the previous message (which can also be referred to as inserted, attached and the like).
  • an initialization value z. B. a random number, O-bits or other Bitmus- ter
  • the last message part d has not yet been processed with padding at this time. This can be realized, for example, in that either the padding bits are cut off again or the unmodified last message part (ie without padding) has been buffered.
  • the calculated (first) nonce is then preferably used in a key derivation. Thereafter, only the padding for the last message part is performed and for the last message part (possibly including the checksum of the previous message or the initialization value) a Supplemental formula for the last message part.
  • the first nonce which is preferably stored for internal use (eg for use in a key exchange) by the (first) communication partner in a method step 190, then results in a method step 180.
  • the method for calculating the digital signature and the nonce can be performed as follows.
  • CTX_K copy (CTX)
  • H2 SHA_Final (CTX_K)
  • SHA_Update and SHA_Final implements it exactly as described; in particular the breaking down of the message into submessages and the correct handling of the padding. Also, for example, in the context data CTX, the overhanging / additional message part of the message to be hashed is stored, which has not yet been taken into account.
  • the latter first checks the first digital signature. For this forms the second communication partner a (local) first checksum and calculates over this a digital signature, which corresponds to an unchanged first message, the first digital signature of the first communication partner.
  • Folg- borrowed corresponds to the (local) first checksum of the second communication partner of the first checksum of the first communi cation ⁇ partners, when the first message is genuine. If these signatures / checksums do not match, the message is corrupted and the method ends or no cryptographic keys are exchanged. For the exemplary embodiment, it is assumed, however, that no message was corrupted.
  • the second communication partner forms a first message analogous to the first communication partner.
  • a second checksum corresponding to the first message is calculated by the second communication partner, wherein the second message is divided into second fauxentei ⁇ le (analogous to the first message).
  • a second Unterprüfsumme via the second message parts until a last message segment of the second message portions is formed (similar to the first sub ⁇ checksum).
  • the second checksum is formed on the basis of the second checksum and taking into account the last message part.
  • a second digital signature for the second message is accordingly formed by the second communication partner.
  • the second sub-checksum and the last message part of the second message parts of the second message are taken into account accordingly by the second communication partner, analogously to the first nonce.
  • the first checksum is added to the last message part for this calculation and after the padding was done.
  • the second nonce can be realized, for example, by calling again the function SHA256_Final (CTX_K, second message,...) For the second message parts under the consideration of the first checksum.
  • the resulting second nonce is preferably stored for internal use (eg, for use in a key exchange) by the second communication partner. Thereafter, the second communication partner sends the second message with the second digital signature to the first communication partner.
  • the partial checksums are formed successively from 0 to d or d-1 or d + 1 and thus, in particular, an implicit sequence is given. More precisely, for example, the message parts 0 to d-1 are taken into account for the corresponding sub-checksum of a corresponding message. For the checksum of the corresponding message then the
  • the invention it is achieved with the invention that it is possible to dispense with the sending of the nonces during a key exchange.
  • the number of calls to the cryptographic function can be reduced since, by a clever choice of the arrangement of the data (attaching a check sum of the previous message to the last message). part of a (current) message), the checksums for the corresponding checksums and the corresponding nonces of a corresponding message can be used. Accordingly, the number of necessary hash operations, the case of a key exchange are necessary compared with conventional key exchange method opti mized ⁇ / reduced.
  • the method is advantageous in that the nonces need not be sent as part of message in a Philadelphia ⁇ exchange, but can be computed locally.
  • the number of operations performed in the concrete combination with digital signatures is optimized.
  • the corresponding checksum can be used for the digital signature and the corresponding nonce, so that the total sum of the cryptographic operations for the nonce and the digital signature is significantly reduced. This significantly simplifies the calculation of the digital signature and the nonce.
  • a hash function with a fixed block size (message component length) can be used.
  • SHA-256 is used to achieve the desired result.
  • SHA-256 uses 512-bit blocks (that is, 512-bit message length) as shown in FIG.
  • FIG. 2 shows in simplified form a check sum H for a message with SHA-256.
  • the SHA-256 method is initialized with context data and a key - more simply represented as IV. Thereafter, a message is decomposed into message portions MB and for the corresponding message parts MB [0] to MB [d] (d is as above ER- imagines the number of message portions) are each part ⁇ checksum C is calculated from which the checksum H gives , Is - as already explained above - the 256-SHA from OpenSSL used, provides ⁇ affordge by OpenSSL following interface.
  • Hash operation for each complete 512-bit block is done in ⁇ tern in the function
  • h n hash (message [
  • h n -i) with ho 0, where h is a checksum of a message and 0 through n is a counter for the news is.
  • the data for nonces and the digital signature up to the last message part of a respective message can now be treated equally by using or buffering the sub-checksum.
  • the corresponding checksum is completed, for example, with the last round (ie calculation of the partial checksum for the last message part).
  • the last round ie calculation of the partial checksum for the last message part.
  • a nonce attaching the checksum of the previous message is done in particular zusharm ⁇ Lich. This can, for example, to an additional round (ie, it results in at least one additional message portion for which a partial checksum is calculated respectively) during loading
  • calculate the checksum or the partial checksum result, since the checksum of the previous message has and a size of 256 bits thus the last message part can exceed the message length of 512 bits.
  • d + 1 message parts result, whereby for the message part d (eg with SHA Update) and the Message part d + 1 (eg with SHA_Final) then the corre ⁇ sponding Operaprüfsummen be calculated.
  • the post ⁇ direct part d as overhanging message part (or additional message portion) are referred to, and d + 1 designates the last message part.
  • the last message part d + 1 is then - as explained above - also brought with padding to the appropriate message length and then as explained above - the corresponding nonce calculated for each message.
  • FIG. 3 shows how the formation of the checksum and the nonce from the previous embodiments can be realized.
  • SHA256 Update U H calculates a partial checksum for the corresponding message parts MB [0 to d-1] which, for example, take into account (if possible) the partial checksum of the previous message part.
  • the corresponding partial checksums can be stored, for example, in the context information (or also called just context).
  • the context or the sub-checksum (the sub-checksum comprising the sub-checksum for message parts up to the penultimate message part d-1 and optionally the context data of the SHA method) is buffered C_H and can be called CTX_K, for example, as in the previous embodiments.
  • CTX_K the context or the sub-checksum
  • the last message part MB [4] is padded to the message length 1 by means of padding bits P. After that will
  • the check message H L of the preceding message is added to the last message part MB [4] (ie to the end of the message part).
  • the message part d or MB [4] forms an overhanging message part, since the checksum has a message length of 256 bits and thus the permissible message component length 512 for the message part d or MB [4] is exceeded.
  • This first has a length of 44 bits, by means of
  • Padding bit P are padded to 512 bits and the corresponding After ⁇ directed part-length of 512 bits.
  • a corresponding partial checksum is calculated for the overhanging message part d or MB [4] by means of SHA256_Update using the copy of the sub ⁇ checksum or CTX_K.
  • the last partial checksum is formed by using SHA256_Final using the partial checksum of the overhanging message part. In practice, this is done by passing CTX_K on the SHA256_Final call, where CTX K has been modified by the SHA256 update call for the overhanging message part, or by taking into account the previous part checksums. In other words, the SHA256_Final call now returns the nonce.
  • the device comprises first communication module 410, a first test module 420, a first provision module 430, a first calculation module 440, a second a second calculation module and an optional first communication interface 404, which are communicatively connected to one another via a first bus 403.
  • the device may, for example, in addition still further comprise one or more further component / s, such as a processor, a memory unit, a entranc be réelle ⁇ , in particular a computer keyboard or a computer mouse, and a display device (eg. As a monitor).
  • the processor may comprise a plurality of additional processors, wherein, for example, the further processors each implement one or more of the modules.
  • the processor implements in particular all the modules of the embodiment.
  • the further component (s) may also be communicatively connected to one another via the first bus 403.
  • the processor may, for example, be an ASIC that has been implemented in an application-specific manner for the functions of a respective module or all modules of the exemplary embodiment (and / or further exemplary embodiments), the program component or the program instructions being realized in particular as integrated circuits.
  • the processor may for example also be a FPGA han ⁇ spindles, which is configured in particular by means of program instructions such that the FPGA, the functions of a jewei- Ilgen module or all modules of the embodiment (and / or other embodiments) realized.
  • the first communication module 410 is configured to receive a first message having a first digital signature from a communication partner (eg, a first communication partner or a second communication partner).
  • the first communication module 410 may, for example, by the processor, the memory unit and a first Pro ⁇ gram of solid component implemented or realized, being configured for example by an executing program instructions of the first program component of the processor in such a manner or is such kon ⁇ figured by the program commands of the processor, that the first message and the first digital signature are received.
  • the first test module 420 is set up to test the first digital signature, a first checksum being calculated for checking the first digital signature.
  • the first test module 420 can be implemented or implemented, for example, by means of the processor, the memory unit and a second program component, wherein, for example, by executing program instructions of the second program component, the processor is configured in such a way or the processor commands are configured by the program instructions, that the first digital signature is checked.
  • the first provision module 430 is adapted for providing egg ⁇ ner second checksum for a second message, wherein
  • the second message is divided into second message parts
  • the second calculation module 430 may, for example, implemented by the processor, the memory unit and a third Pro ⁇ gram of solid component or can be realized, wherein for example, configured by executing program instructions of the third program component of the processor in such a way is or is such kon ⁇ figured by the program instructions, the processor that the second checksum is provided.
  • the first calculation module 440 is configured to form a second digital signature for the second message based on the second checksum.
  • the first calculation module 440 can be implemented or implemented, for example, by means of the processor, the memory unit and a fourth program component, wherein, for example, by executing program instructions of the fourth program component, the processor is configured in such a way or by the program instructions the processor is configured such that the second digital signature is calculated.
  • the second calculation module 450 is adapted to calculate a second nonce from the second Unterprüfsumme and taking into account the ⁇ last message part, wherein - for this calculation to the last message part, the first checksum is added,
  • the first communication module averages the second message via ⁇ .
  • the second message is transmitted to the communication partner.
  • the second calculation module 450 may, for example, by the processor, the memory unit and a fifth Pro ⁇ gram of solid component implemented or realized, being configured for example by an executing program instructions of the fifth program component of the processor in such a manner or is such kon ⁇ figured by the program commands of the processor, that the second nonce is calculated.
  • the device comprises at least one further module or several further modules for carrying out the method according to the invention (or one of its embodiments / variants).
  • a first communication partner and / or a second communication partner may have the device.
  • the communication partner who sends the first message can then preferably comprise a device which realizes the method steps aa) to ad) in hardware.
  • the execution of the program instructions of the respective modules may in this case be effected, for example, by means of the processor itself and / or by means of an initialization component, for example a loader or a configuration component.

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)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The invention relates to a method and to an apparatus for achieving cryptographic protection of a plurality of messages in a message exchange, for example, in particular the cryptographic protection being implemented by means of digital signatures and nonces. The nonces are not transmitted directly, but rather can be in particular reproducibly calculated from preceding messages, wherein a checksum of a previous message is also considered for each nonce. Said consideration is implemented in such a way that cryptographical calculations in particular intended for the creation of the digital signature and the nonce are preferably calculated one single time and, in particular, not separately for the nonce and the digital signature.

Description

Beschreibung description
Verfahren und Vorrichtung zum Austauschen von Nachrichten Die Erfindung bezieht sich auf ein Verfahren und eine Vorrichtung zum rechnergestützten Austauschen von Nachrichten. The invention relates to a method and a device for the computer-aided exchange of messages.
Sicherheitsprotokolle wie TLS und andere nutzen während der Aushandlung eines Sitzungsschlüssels Zufallszahlen zur Erhö- hung der Entropie bei der eigentlichen Schlüsselaushandlung. Darüber hinaus ermöglicht es beiden Kommunikationspartnern einen Beitrag zur Schlüsselaushandlung zu leisten, insbesondere im Falle der Nutzung einer einseitig authentisierten Verbindung, bei der der Client dem Server Informationen ver- schlüsselt mit dem öffentlichen Schlüssel des Servers zuschickt . Security protocols such as TLS and others use random numbers during the negotiation of a session key to increase entropy in the actual key negotiation. In addition, it enables both communication partners to contribute to the key negotiation, especially in the case of the use of a unilaterally authenticated connection, in which the client sends the server encrypted information with the public key of the server.
Aus dem Stand der Technik sind das Dokument US 8,531,247 B2, das Dokument US 8,892,616 B2, das Dokument US 8,300,811 B2, das Dokument US 9,147,088 B2, das Dokument EP 2 605 445 Bl, das Dokument EP 2 870 565 AI, das Dokument EP 2 891 102 AI und das Dokument US 8 843 761 B2 bekannt. The prior art documents US 8,531,247 B2, US 8,892,616 B2, US 8,300,811 B2, US 9,147,088 B2, EP 2 605 445 B1, EP 2 870 565 AI, EP 2 891,102 AI and the document US 8 843 761 B2.
Eine Aufgabe der vorliegenden Erfindung ist es ein Verfahren und eine Vorrichtung zum rechnergestützten Austauschen von kryptographisch geschützten Nachrichten möglichst effizient zu realisieren. An object of the present invention is to realize a method and a device for the computer-aided exchange of cryptographically protected messages as efficiently as possible.
Die Aufgabe wird durch die in den unabhängigen Ansprüchen an- gegebenen Merkmale gelöst. In den abhängigen Ansprüchen sind vorteilhafte Weiterbildungen der Erfindung dargestellt. The object is achieved by the features specified in the independent claims. In the dependent claims advantageous developments of the invention are shown.
Gemäß einem ersten Aspekt betrifft die Erfindung ein Verfahren zum Austauschen von Nachrichten mit folgenden Verfahrens- schritten: According to a first aspect, the invention relates to a method for exchanging messages with the following method steps:
a) Empfangen einer ersten Nachricht mit einer ersten digitalen Signatur eines ersten Kommunikationspartners durch einen zweiten Kommunikationspartner; Prüfen der ersten digitalen Signatur durch den zweiten Kommunikationspartner, wobei zum Prüfen der ersten digi¬ talen Signatur eine erste Prüfsumme für die erste Nachricht berechnet wird; a) receiving a first message with a first digital signature of a first communication partner by a second communication partner; Checking the first digital signature by the second communication partner, wherein for checking the first digi ¬ tal signature a first checksum for the first message is calculated;
Bereitstellen einer zweiten Prüfsumme für eine zweite Nachricht durch den zweiten Kommunikationspartner, wobei die zweite Nachricht in zweite Nachrichtenteile aufgeteilt wird,  Providing a second checksum for a second message by the second communication partner, the second message being divided into second message parts,
eine zweite Unterprüfsumme über die zweiten Nachrichtenteile bis auf einen letzten Nachrichtenteil der zweiten Nachrichtenteile gebildet wird,  a second checksum is formed over the second message parts except for a last message part of the second message parts,
die zweite Prüfsumme anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils gebildet wird;  the second checksum is formed on the basis of the second checksum and taking into account the last message part;
Bilden einer zweiten digitalen Signatur für die zweite Nachricht anhand der zweiten Prüfsumme durch den zweiten Kommunikationspartner ;  Forming a second digital signature for the second message based on the second checksum by the second communication partner;
Berechnen einer zweiten Nonce anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils durch den zweiten Kommunikationspartner, wobei  Calculating a second nonce based on the second checksum and taking into account the last message part by the second communication partner, wherein
für diese Berechnung an den letzten Nachrichtenteil die erste Prüfsumme angefügt wird;  for this calculation the first checksum is appended to the last message part;
Senden der zweiten Nachricht mit der zweiten digitalen Signatur an den ersten Kommunikationspartner durch den zweiten Kommunikationspartner.  Sending the second message with the second digital signature to the first communication partner by the second communication partner.
Sofern es in der nachfolgenden Beschreibung nicht anders angegeben ist, beziehen sich die Begriffe "durchführen", "be- rechnen", "rechnergestützt", "rechnen", "feststellen", "generieren", "konfigurieren", "rekonstruieren" und dergleichen vorzugsweise auf Handlungen und/oder Prozesse und/oder Verarbeitungsschritte, die Daten verändern und/oder erzeugen und/oder die Daten in andere Daten überführen, wobei die Da- ten insbesondere als physikalische Größen dargestellt werden oder vorliegen können, beispielsweise als elektrische Impulse. Insbesondere sollte der Ausdruck "Computer" möglichst breit ausgelegt werden, um insbesondere alle elektronischen Geräte mit Datenverarbeitungseigenschaften abzudecken. Computer können somit beispielsweise Personal Computer, Server, speicherprogrammierbare Steuerungen (SPS) , Handheld-Computer- Systeme, Pocket-PC-Geräte, Mobilfunkgeräte und andere Kommu- nikationsgeräte, die rechnergestützt Daten verarbeiten können, Prozessoren und andere elektronische Geräte zur Daten¬ verarbeitung sein. Unless otherwise stated in the following description, the terms "perform", "compute", "computationally", "compute", "establish", "generate", "configure", "reconstruct" and the like preferably to actions and / or processes and / or processing steps that modify and / or generate data and / or transfer the data into other data, the data being presented or may be present in particular as physical quantities, for example as electrical impulses. In particular, the term "computer" should be interpreted as broadly as possible, in particular all electronic ones Cover devices with data processing capabilities. Computers can thus, for example, personal computers, servers, programmable logic controllers (PLCs), handheld computer systems, Pocket PC devices, mobile phones and other communication devices that can process data with computer assistance, its processors and other electronic equipment for data ¬ processing ,
Unter „rechnergestützt" kann im Zusammenhang mit der Erfin- dung beispielsweise eine Implementierung des Verfahrens ver¬ standen werden, bei dem insbesondere ein Prozessor mindestens einen Verfahrensschritt des Verfahrens ausführt. The term "computer-aided" can-making in connection with the inventions, for example, be an implementation of the method ver ¬ stood, in which in particular a processor to execute at least one step of the method.
Unter einem „Prozessor" kann im Zusammenhang mit der Erfin- dung beispielsweise eine Maschine oder eine elektronischeA "processor" may in connection with the invention, for example, a machine or an electronic
Schaltung verstanden werden. Bei einem Prozessor kann es sich insbesondere um einen Hauptprozessor (engl. Central Processing Unit, CPU) , einen Mikroprozessor oder einen Mikrokont- roller, beispielsweise eine anwendungsspezifische integrierte Schaltung oder einen digitalen Signalprozessor, möglicherweise in Kombination mit einer Speichereinheit zum Speichern von Programmbefehlen, etc. handeln. Bei einem Prozessor kann es sich beispielsweise auch um einen IC (integrierter Schalt¬ kreis, engl. Integrated Circuit), insbesondere einen FPGA (engl. Field Programmable Gate Array) oder einen ASIC (anwendungsspezifische integrierte Schaltung, engl. Application- Specific Integrated Circuit) , oder einen DSP (Digitaler Sig¬ nalprozessor, engl. Digital Signal Processor) oder einen Grafikprozessor GPU (Graphic Processing Unit) handeln. Auch kann unter einem Prozessor ein virtualisierter Prozessor, eine virtuelle Maschine oder eine Soft-CPU verstanden werden. Es kann sich beispielsweise auch um einen programmierbaren Prozessor handeln, der mit Konfigurationsschritten zur Ausführung des genannten erfindungsgemäßen Verfahrens ausgerüstet wird oder mit Konfigurationsschritten derart konfiguriert ist, dass der programmierbare Prozessor die erfindungsgemäßen Merkmale des Verfahrens, der Komponente, der Module, oder anderer Aspekte und/oder Teilaspekte der Erfindung realisiert. Unter einer „Speichereinheit" oder einem „Speichermodul" und dergleichen kann im Zusammenhang mit der Erfindung beispielsweise ein flüchtiger Speicher in Form von Arbeitsspeicher (engl. Random-Access Memory, RAM) oder ein dauerhafter Speicher wie eine Festplatte oder ein Datenträger verstanden wer¬ den . Circuit to be understood. A processor may, in particular, be a central processing unit (CPU), a microprocessor or a microcontroller, for example an application-specific integrated circuit or a digital signal processor, possibly in combination with a memory unit for storing program instructions, etc act. In a processor may, for example, also be an IC (integrated circuit ¬ circular, engl. Integrated Circuit), in particular an FPGA (engl. Field Programmable Gate Array) or an ASIC (application specific integrated circuit, engl. Application- Specific Integrated Circuit) , or a DSP (Digital Sig ¬ nalprozessor, English Digital Signal Processor) or a graphics processor GPU (Graphic Processing Unit) act. Also, a processor can be understood as a virtualized processor, a virtual machine or a soft CPU. It can also be, for example, a programmable processor which is equipped with configuration steps for carrying out said method according to the invention or is configured with configuration steps in such a way that the programmable processor has the inventive features of the method, the component, the modules or other aspects and / or or partial aspects of the invention realized. By a "storage unit" or a "memory module" and the like in connection with the invention, for example a volatile memory in the form of RAM (engl. Random-Access Memory, RAM) or a persistent storage such as a hard disk or a disk can be understood ¬ the ,
Unter einer „Prüfsumme" kann im Zusammenhang mit der Erfin- dung beispielsweise eine kryptographische Prüfsumme oder ein kryptographischer Hash oder ein Hash verstanden werden, die insbesondere mittels einer Hashfunktion oder einer kryptographischen Hashfunktion über Nachrichten oder Nachrichtenteile gebildet oder berechnet werden. Weiterhin kann darunter ins- besondere auch ein kryptographischer Nachrichtenauthentisie- rungscode verstanden werden. In the context of the invention, a "checksum" can be understood, for example, as a cryptographic checksum or a cryptographic hash or a hash, which is formed or calculated in particular by means of a hash function or a cryptographic hash function via messages or message parts. special also a cryptographic message authentication code to be understood.
Unter einer „Nonce" im Zusammenhang mit der Erfindung beispielsweise eine kryptographische Nonce (Abkürzung für: „used only once" „number used once") verstanden werden, die insbesondere nur ein einziges Mal in dem jeweiligen Kontext verwendet wird. By a "nonce" in the context of the invention, for example, a cryptographic nonce (abbreviation for "used only once") "number used once") is understood, which is used in particular only once in the respective context.
Das Verfahren ist dahingehend vorteilhaft, um beispielsweise einen kryptographischen Schutz von mehreren Nachrichten bei einem Nachrichtenaustausch zu erreichen, wobei insbesondere der kryptographischen Schutz mittels digitaler Signaturen und Nonces realisiert wird. Dabei werden die Nonces nicht direkt übermittelt, sondern können insbesondere reproduzierbar aus vorhergehenden Nachrichten berechnet werden, wobei für die jeweilige Nonce selbst eine Prüfsumme einer vorherigen Nach¬ richt mitberücksichtigt wird. Dieses Mitberücksichtigen ist derart realisiert, dass insbesondere für das Erstellen der jeweiligen digitalen Signatur und der Nonce bestimmte kryp- tographische Berechnungen vorzugsweise ein einziges Mal be¬ rechnet werden und insbesondere nicht komplett separat für die jeweilige Nonce und die jeweilige digitale Signatur. Das Verfahren ist dabei insbesondere im Kontext einer Schlüssel- aushandlung zwischen Kommunikationspartnern vorteilhaft. Dies ist insbesondere vorteilhaft, da bei embedded Systemen weni¬ ger Aufwand für die Berechnung der digitalen Signatur der Schlüsselaushandlungsnachrichten benötigt wird. Vorzugsweise kann dadurch der Aufwand für die Hashoperation bei der eigentlichen digitalen Signatur vernachlässigt werden. The method is advantageous, for example, to achieve a cryptographic protection of multiple messages in a message exchange, in particular, the cryptographic protection is realized by means of digital signatures and nonces. The nonces are not transmitted directly, but can be calculated from previous messages reproducible in particular, wherein a sum of a previous After ¬ report is taken into account for the respective nonce itself. This take into account is realized such that, in particular for creating the particular digital signature and the nonce certain cryptographic calculations are preferably a single time ¬ be calculated and in particular not fully separately for the respective nonce and the respective digital signature. The procedure is particularly relevant in the context of a key Negotiation between communication partners advantageous. This is particularly advantageous, since embedded systems Weni ¬ ger effort for the calculation of the digital signature key negotiation messages is needed. Preferably, the effort for the hash operation in the actual digital signature can thereby be neglected.
Darüber hinaus wird insbesondere beim Nachrichtenaustausch (z. B. bei einer der Schlüsselaushandlung) anstatt die benötigte Bandbreite für die Nachrichten reduziert, da die Nonces insbesondere nicht mitgeschickt werden müssen. Darüber hinaus wird insbesondere durch die Einbeziehung der vorherigen Nachricht in die Berechnung der aktuellen Nonce eine Verkettung der Nachrichten in der entsprechenden Reihenfolge erreicht. In addition, the message exchange (eg in a key negotiation) reduces the required bandwidth for the messages, in particular, since the nonces in particular do not have to be sent along. In addition, especially by the inclusion of the previous message in the calculation of the current nonce chaining of messages is achieved in the appropriate order.
Bei einer ersten Ausführungsform des Verfahrens werden durch den ersten Kommunikationspartner vor dem Empfangen in Verfahrensschritt a) folgende Verfahrensschritte ausgeführt: In a first embodiment of the method, the following method steps are carried out by the first communication partner before receiving in method step a):
aa) Berechnen der ersten Prüfsumme für die erste Nachricht, wobei aa) calculating the first checksum for the first message, wherein
die erste Nachricht in erste Nachrichtenteile aufgeteilt wird,  the first message is divided into first message parts,
eine erste Unterprüfsumme über die ersten Nachrichten¬ teile bis auf einen letzten Nachrichtenteil der ersten Nachrichtenteile gebildet wird, a first sub-checksum on the first message ¬ parts is formed to a last message part of the first message parts,
die erste Prüfsumme anhand der ersten Unterprüfsumme und unter Berücksichtigung eines letzten Nachrichtenteils der ersten Nachrichtenteile gebildet wird;  the first checksum is formed on the basis of the first sub-checksum and taking into account a last message part of the first message parts;
ab) Bilden der ersten digitalen Signatur für die erste Nachricht anhand der ersten Prüfsumme; ab) forming the first digital signature for the first message based on the first checksum;
ac) Berechnen einer ersten Nonce anhand der ersten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils, wobei ac) calculating a first nonce based on the first checksum and considering the last message part, where
für diese Berechnung an den letzten Nachrichtenteil der ersten Nachricht ein Initialisierungswert angefügt wird; ad) Senden der ersten Nachricht mit der ersten digitalen Signatur an den zweiten Kommunikationspartner. Das Verfahren ist dahingehend vorteilhaft, um insbesondere auf einfache Weise eine Nonce für die erste Nachricht zu be¬ rechnen ohne diese mit der Nachricht mitzuschicken. Es kann beispielsweise bei einer Initialisierung des Verfahrens im Schritt ac) bei der Berechnung Initialisierungswert angefügt werden anfügen zu können, damit für die erste Nonce die Wahr¬ scheinlichkeit einer Mehrfachverwendung der Nonce minimiert wird. Der Initialisierungswert hat vorzugsweise die gleiche Länge wie die erste Prüfsumme, z. B. 256 bit. for this calculation, an initialization value is added to the last message part of the first message; ad) sending the first message with the first digital signature to the second communication partner. The method is advantageous to a nonce for the first message to be ¬ expected without this with the message mitzuschicken particularly simple manner. It can be added in the calculation initialization to attach, for example, at initialization of the process in step ac) to the true ¬ probability of a multiple use of the nonce is minimized for the first nonce. The initialization value is preferably the same length as the first checksum, e.g. Eg 256 bit.
Bei einer weiteren Ausführungsform wird für die Nachrichtenteile eine feste Nachrichtenteillänge vorgegeben, und es ergibt sich für die letzten Nachrichtenteile jeweils eine Restnachrichtenteillänge, die kleiner oder gleich der Nach- richtenteillänge ist. In a further embodiment, a fixed message component length is specified for the message parts, and the result for the last message parts is in each case a residual message component length which is less than or equal to the message component length.
Das Verfahren ist dahingehend vorteilhaft, um insbesondere die entsprechenden Prüfsummen leichter zu berechnen. Insbesondere wird für die Berechnung einer Prüfsumme eine Nach- rieht M der Länge m in Nachrichtenteile (oder auch Teilnachrichten genannt) der Länge 1 zerlegt. Um beispielsweise die Prüfsumme für Nachrichten beliebiger Länge berechnen zu können, wird insbesondere durch ein sog. Padding die Nachricht aufgefüllt, so dass das Resultat eine Nachricht Mx ist, deren Länge ιηλ ein Vielfaches von 1 ist. Sofern das Padding beispielsweise eine Mindestlänge p > 0 hat, wird für den Fall, dass das Padding nicht mehr in den letzten Block (auch Nach¬ richtenteil genannt) passt (d.h. wenn m modulo 1 > 1 - p) , eine weitere Teilnachricht angehängt, die nur aus Padding be- steht. The method is advantageous in order, in particular, to calculate the corresponding checksums more easily. In particular, for the calculation of a checksum, an item M of length m is split into message parts (or also part messages) of length 1. In order to be able to calculate, for example, the checksum for messages of any length, the message is padded in particular by a so-called padding, so that the result is a message M x whose length ιη λ is a multiple of 1. Provided that the padding for example, has a minimum length p> 0 that the padding is no longer in the last block (also called After ¬ directed in part) is for the case fits (ie when m modulo 1> 1 - p), another partial message attached, which consists only of padding.
Beispielsweise kann eine Anzahl d Nachrichtenteile für eine Nachricht mit Länge m und einer Nachrichtenteillänge 1 wie folgt berechnet werden: d = m/1, wobei sich die Restnachrich- tenteillänge e aus e = m modulo 1 ergibt. For example, a number d of message pieces for a message of length m and message length 1 may be calculated as follows: d = m / 1, where the remainder message length e is e = m modulo 1.
Bei einer weiteren Ausführungsform des Verfahrens ist die Nachrichtenteillänge ein ganzzahliges Vielfaches von 64 Bit und die Nachrichtenteillänge insbesondere ist 256 Bit oder 512 Bit lang. In a further embodiment of the method, the message length is an integer multiple of 64 bits and the message length in particular is 256 bits or 512 bits long.
Bei einer weiteren Ausführungsform des Verfahrens wird mit- tels der Nachrichten Schlüsselmaterial für ein kryptographi- sches Verfahren zwischen den Kommunikationspartnern ausge¬ tauscht oder das Ergebnis geht in eine Schlüsselableitung ein . Das Verfahren ist dahingehend vorteilhaft, um insbesondere mit möglichst wenigen kryptographischen Hash-Operationen das Schlüsselmaterial zwischen den Kommunikationspartnern zu etablieren . Mit den Nachrichten könnte man insbesondere auch Public KeyIn a further embodiment of the process the message key material for cryptographic's method between the communication partners ¬ be exchanged or the result is included in a key derivation means of with-. The method is advantageous in order to establish the key material between the communication partners, in particular with as few cryptographic hash operations as possible. In particular, you could also use the public key with the messages
Encryption nutzen und den Schlüssel verschlüsseln oder alternativ ein signiertes Diffie Hellman Verfahren umsetzen. Encryption and encrypt the key or alternatively implement a signed Diffie Hellman method.
Bei einer weiteren Ausführungsform des Verfahrens ist die erste Prüfsumme und/oder die zweite Prüfsumme ein kryptogra- phischer Hash. In a further embodiment of the method, the first checksum and / or the second checksum is a cryptographic hash.
Bei einer weiteren Ausführungsform des Verfahrens werden die erste Prüfsumme und/oder die zweite Prüfsumme mittels einer kryptographischen Hashfunktion berechnet. In a further embodiment of the method, the first checksum and / or the second checksum are calculated by means of a cryptographic hash function.
Bei einer weiteren Ausführungsform des Verfahrens werden für weitere Nachrichten jeweils weitere digitale Signaturen und weitere Nonces durch den ersten Kommunikationspartner und/oder den zweiten Kommunikationspartner entsprechend der Verfahrensschritte a) - e) berechnet und die weiteren Nach¬ richten mit ihren jeweiligen weiteren digitalen Signaturen an den entsprechenden Kommunikationspartner gesendet. In a further embodiment of the method, further digital signatures and further nonces are calculated by the first communication partner and / or the second communication partner according to method steps a) -e) for further messages, and the further messages are sent with their respective further digital signatures to the computer sent corresponding communication partner.
Dabei werden insbesondere jeweils weiter Unterprüfsummen be- rechnet und insbesondere bei der Berechnung der jeweiligen weiteren Nonce wird die Prüfsumme der vorherigen Nachricht berücksichtigt . Das Verfahren ist dahingehend vorteilhaft, um insbesondere mehrere Nachrichten kryptographisch zu schützen und einen Man-In-The Middle-Angriff zu erschweren. In particular, further checksums are calculated in each case, and in particular when calculating the respective further nonce, the checksum of the previous message is taken into account. The method is advantageous in that, in particular, to protect a plurality of messages cryptographically and to complicate a man-in-the-middle attack.
Gemäß einem weiteren Aspekt betrifft die Erfindung eine Vorrichtung zum Senden einer Nachricht umfassend: ein erstes Kommunikationsmodul zum Empfangen einer ersten Nachricht mit der ersten digitalen Signatur; According to a further aspect, the invention relates to a device for transmitting a message, comprising: a first communication module for receiving a first message with the first digital signature;
ein erstes Prüfmodul zum Prüfen der ersten digitalen Signatur, wobei zum Prüfen der ersten digitalen Signatur eine erste Prüfsumme berechnet wird;  a first test module for testing the first digital signature, wherein a first checksum is calculated for testing the first digital signature;
ein erstes Bereitstellungsmodul zum Bereitstellen einer zweiten Prüfsumme für eine zweite Nachricht, wobei die zweite Nachricht in zweite Nachrichtenteile aufgeteilt wird,  a first provisioning module for providing a second check sum for a second message, wherein the second message is divided into second message parts,
eine zweite Unterprüfsumme über die zweiten Nachrichtenteile bis auf einen letzten Nachrichtenteil der zweiten Nachrichtenteile gebildet wird,  a second checksum is formed over the second message parts except for a last message part of the second message parts,
die zweite Prüfsumme anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils gebildet wird;  the second checksum is formed on the basis of the second checksum and taking into account the last message part;
ein erstes Berechnungsmodul zum Bilden einer zweiten di¬ gitalen Signatur für die zweite Nachricht anhand der zweiten Prüfsumme; a first calculation module for forming a second di ¬ digital signature for the second message based on the second checksum;
ein zweites Berechnungsmodul zum Berechnen einer zweiten Nonce anhand der zweiten Unterprüfsumme und unter Be¬ rücksichtigung des letzten Nachrichtenteils, wobei für diese Berechnung an den letzten Nachrichtenteil die erste Prüfsumme angefügt wird, a second calculation module for calculating a second nonce from the second Unterprüfsumme and Be ¬ consideration of the last message part, wherein the first sum is added for this calculation to the last message part,
das erste Kommunikationsmodul die zweite Nachricht über¬ mittelt . the first communication module averages the second message via ¬.
Bei einer weiteren Ausführungsform der Vorrichtung umfasst die Vorrichtung zumindest ein weiteres Modul oder mehrere weitere Module zur Durchführung des erfindungsgemäßen Verfahrens (oder einer seiner Ausführungsformen) . Des Weiteren wird ein Computerprogrammprodukt mit Programmbe¬ fehlen zur Durchführung der genannten erfindungsgemäßen Ver¬ fahren beansprucht, wobei mittels des Computerprogrammprodukts jeweils eines der erfindungsgemäßen Verfahren, alle er- findungsgemäßen Verfahren oder eine Kombination der erfindungsgemäßen Verfahren durchführbar ist. In a further embodiment of the device, the device comprises at least one further module or several further modules for carrying out the method according to the invention (or one of its embodiments). Furthermore, a computer program product with Programmbe ¬ is missing for carrying said drive ¬ claimed invention Ver wherein each one of the methods according to the invention, all the methods of the invention or a combination of the methods of the invention can be carried out by means of the computer program product.
Zusätzlich wird eine Variante des Computerprogrammproduktes mit Programmbefehlen zur Konfiguration eines Erstellungsgeräts, beispielsweise ein 3D-Drucker, ein Computersystem oder ein zur Erstellung von Prozessoren und/oder Geräten geeignete Herstellungsmaschine, beansprucht, wobei das Erstellungsgerät mit den Programmbefehlen derart konfiguriert wird, dass die genannten erfindungsgemäße Vorrichtung erstellt werden. In addition, a variant of the computer program product is claimed with program instructions for configuring a creation device, for example a 3D printer, a computer system or a production machine suitable for creating processors and / or devices, wherein the creation device is configured with the program instructions such that the inventive Device to be created.
Darüber hinaus wird eine Bereitstellungsvorrichtung zum Speichern und/oder Bereitstellen des Computerprogrammprodukts beansprucht. Die Bereitstellungsvorrichtung ist beispielsweise ein Datenträger, der das Computerprogrammprodukt speichert und/oder bereitstellt. Alternativ und/oder zusätzlich ist die Bereitstellungsvorrichtung beispielsweise ein Netzwerkdienst, ein Computersystem, ein Serversystem, insbesondere ein verteiltes Computersystem, ein cloudbasiertes Rechnersystem und/oder virtuelles Rechnersystem, welches das Computerprogrammprodukt vorzugsweise in Form eines Datenstroms speichert und/oder bereitstellt. In addition, a provisioning device for storing and / or providing the computer program product is claimed. The provisioning device is, for example, a data carrier which stores and / or makes available the computer program product. Alternatively and / or additionally, the provisioning device is for example a network service, a computer system, a server system, in particular a distributed computer system, a cloud-based computer system and / or virtual computer system, which preferably stores and / or provides the computer program product in the form of a data stream.
Diese Bereitstellung erfolgt beispielsweise als Download in Form eines Programmdatenblocks und/oder Befehlsdatenblocks, vorzugsweise als Datei, insbesondere als Downloaddatei, oder als Datenstrom, insbesondere als Downloaddatenstrom, des vollständigen Computerprogrammprodukts. Diese Bereitstellung kann beispielsweise aber auch als partieller Download erfolgen, der aus mehreren Teilen besteht und insbesondere über ein Peer-to-Peer Netzwerk heruntergeladen oder als Datenstrom bereitgestellt wird. Ein solches Computerprogrammprodukt wird beispielsweise unter Verwendung der Bereitstellungsvorrichtung in Form des Datenträgers in ein System eingelesen und führt die Programmbefehle aus, sodass das erfindungsgemäße Verfahren auf einem Computer zur Ausführung gebracht wird oder das Erstellungsgerät derart konfiguriert, dass die erfindungsgemäße Vorrichtung erstellt wird. This provision takes place, for example, as a download in the form of a program data block and / or command data block, preferably as a file, in particular as a download file, or as a data stream, in particular as a download data stream, of the complete computer program product. However, this provision can also be carried out, for example, as a partial download, which consists of several parts and in particular is downloaded via a peer-to-peer network or provided as a data stream. For example, such a computer program product is read into a system using the data carrier providing device and executes the program instructions so that the method according to the invention is executed on a computer or the authoring device is configured such that the device according to the invention is created.
Die oben beschriebenen Eigenschaften, Merkmale und Vorteile dieser Erfindung sowie die Art und Weise, wie diese erreicht werden, werden klarer und deutlicher verständlich im Zusammenhang mit der folgenden Beschreibung der Ausführungsbei- spiele, die im Zusammenhang mit den Figuren näher erläutert werden. Dabei zeigen in schematischer Darstellung: ein erstes Ausführungsbeispiel der Erfindung als ein Ablaufdiagramm; The above-described characteristics, features and advantages of this invention, as well as the manner in which they are achieved, will become clearer and more clearly understood in connection with the following description of the embodiments which will be described in connection with the figures. Shown schematically are: a first embodiment of the invention as a flow chart;
Fig. 2 ein weiteres Ausführungsbeispiel der Erfindung; Fig. 2 shows another embodiment of the invention;
Fig. 3 ein weiteres Ausführungsbeispiel der Erfindung; Fig. 4 ein weiteres Ausführungsbeispiel der Erfindung; Fig. 3 shows another embodiment of the invention; 4 shows a further embodiment of the invention;
In den Figuren sind funktionsgleiche Elemente mit denselben Bezugszeichen versehen, sofern nichts anderes angegeben ist. Die nachfolgenden Ausführungsbeispiele weisen, sofern nicht anders angegeben oder bereits angegeben, zumindest einen Prozessor und/oder eine Speichereinheit auf, um das Verfahren zu implementieren oder auszuführen. Auch sind insbesondere einem (einschlägigen) Fachmann inIn the figures, functionally identical elements are provided with the same reference numerals, unless stated otherwise. Unless stated otherwise or already stated, the following exemplary embodiments have at least one processor and / or one memory unit in order to implement or execute the method. Also, in particular, a (relevant) expert in
Kenntnis des/der Verfahrensanspruchs/Verfahrensansprüche alle im Stand der Technik üblichen Möglichkeiten zur Realisierung von Produkten oder Möglichkeiten zur Implementierung selbstverständlich bekannt, sodass es insbesondere einer eigenstän- digen Offenbarung in der Beschreibung nicht bedarf. Insbesondere können diese gebräuchlichen und dem Fachmann bekannten Realisierungsvarianten ausschließlich per Hardware ( komponenten) oder ausschließlich per Soft- wäre ( komponenten) realisiert werden. Alternativ und/oder zusätzlich kann der Fachmann im Rahmen seines fachmännischen Könnens weitestgehend beliebige erfindungsgemäße Kombinationen aus Hardware ( komponenten) und Software ( komponenten) wäh- len, um erfindungsgemäße Realisierungsvarianten umzusetzen. Knowledge of the method claim (s) of course all known in the prior art possibilities for the realization of products or implementation options, of course, so that in particular a separate disclosure in the description is not required. In particular, these customary implementation variants known to the person skilled in the art can be used exclusively by hardware (components) or exclusively by software. would (components) be realized. Alternatively and / or additionally, within the scope of his expert knowledge, the person skilled in the art can choose as far as possible any combinations according to the invention of hardware (components) and software (components) in order to implement implementation variants according to the invention.
Eine erfindungsgemäße Kombination aus Hardware ( komponenten) und Software ( komponenten) kann insbesondere dann eintreten, wenn ein Teil der erfindungsgemäßen Wirkungen vorzugsweise ausschließlich durch Spezialhardware (z. B. einem Prozessor in Form eines ASIC oder FPGA) und/oder ein anderer Teil durch die (prozessor- und/oder speichergestützte) Software bewirkt wird . Insbesondere ist es angesichts der hohen Anzahl an unterschiedlichen Realisierungsmöglichkeiten unmöglich und auch für das Verständnis der Erfindung nicht zielführend oder notwendig, all diese Realisierungsmöglichkeiten zu benennen. Insofern sollen insbesondere all die nachfolgenden Ausführungs- beispiele lediglich beispielhaft einige Wege aufzeigen, wie insbesondere solche Realisierungen der erfindungsgemäßen Lehre aussehen könnten. A combination of hardware (components) and software (components) according to the invention can occur in particular if some of the effects according to the invention are preferably exclusively due to special hardware (eg a processor in the form of an ASIC or FPGA) and / or another part by the (processor and / or memory-based) software is effected. In particular, it is impossible in view of the high number of different implementation options and also for the understanding of the invention not expedient or necessary to name all these implementation options. In this respect, in particular, all the following exemplary embodiments are intended to show, by way of example only, some ways in which such implementations of the teaching according to the invention could, in particular, be considered.
Folglich sind insbesondere die Merkmale der einzelnen Ausfüh- rungsbeispiele nicht auf das jeweilige Ausführungsbeispiel beschränkt, sondern beziehen sich insbesondere auf die Erfindung im Allgemeinen. Entsprechend können vorzugsweise Merkma¬ le eines Ausführungsbeispiels auch als Merkmale für ein anderes Ausführungsbeispiel dienen, insbesondere ohne dass dies explizit in dem jeweiligen Ausführungsbeispiel genannt sein muss . Consequently, in particular the features of the individual embodiments are not limited to the respective exemplary embodiment, but relate in particular to the invention in general. According Merkma ¬ le can serve preferably an embodiment as features of another embodiment, in particular, without this having to be explicitly mentioned in the respective embodiment.
Die Fig. 1 zeigt ein erstes Ausführungsbeispiel der Erfindung als ein Ablaufdiagramm des erfindungsgemäßen Verfahrens zum Austauschen von Nachrichten. Das Verfahren wird vorzugsweise rechnergestützt realisiert, wobei insbesondere die Nachrichten durch das Verfahren kryptographisch geschützt sind. Das Verfahren kann beispielsweise von einem ersten Kommunikati- onspartner und einem zweiten Kommunikationspartner realisiert werden, um beispielsweise kryptographisches Schlüsselmaterial für eine kryptographisch geschützte Kommunikation untereinander auszutauschen. Fig. 1 shows a first embodiment of the invention as a flow chart of the inventive method for exchanging messages. The method is preferably realized computer-aided, wherein in particular the messages are cryptographically protected by the method. The method may be, for example, a first communication. partners and a second communication partner are realized, for example, to exchange cryptographic key material for a cryptographically protected communication with each other.
Das Verfahren umfasst einen Verfahrensschritt 110 indem eine erste Nachricht für einen Schlüsselaustausch durch einen ersten Kommunikationspartner generiert wird. Dies ist ähnlich zu dem bekannten Verfahren wie das Diffie-Hellman Schlüsselaus- tauschverfahren. The method comprises a method step 110 in which a first message for a key exchange is generated by a first communication partner. This is similar to the known method such as the Diffie-Hellman key exchange method.
Das Verfahren umfasst einen Verfahrensschritt 112 zum Berechnen der ersten Prüfsumme für eine erste Nachricht durch den ersten Kommunikationspartner, wobei die erste Nachricht in erste Nachrichtenteile aufgeteilt wird. Für die Nachrichtenteile ist dabei vorzugsweise eine feste Nachrichtenteillänge z. B. 512 Bit vorgegeben. The method comprises a method step 112 for calculating the first checksum for a first message by the first communication partner, wherein the first message is divided into first message parts. For the message parts is preferably a fixed message length z. B. predetermined 512 bits.
In der Praxis kann für die Berechnung einer Prüfsumme eine Nachricht M der Länge m in Teilnachrichten der Länge 1 zerlegt. Um die Prüfsumme für Nachrichten beliebiger Länge berechnen zu können, wird i.d.R. durch ein sog. Padding die Nachricht aufgefüllt, so dass das Resultat eine Nachricht Mx ist, deren Länge m ein Vielfaches von 1 ist. Sofern das Padding eine Mindestlänge p > 0 hat, wird für den Fall, dass das Padding nicht mehr in den letzten Block passt (d.h. wenn m modulo 1 > 1 - p) , einen weiteren Padding-Nachrichtenteil angehängt, die nur aus Padding besteht. Beispielsweise kann eine Anzahl d an Nachrichtenteilen für eine Nachricht (oder auch ursprüngliche Nachricht) M mit Län¬ ge m und einer festen Nachrichtenteillänge 1 wie folgt berechnet werden: d = m/1, wobei sich eine Restnachrichtenteillänge e aus e = m modulo 1 ergibt. In practice, for the calculation of a checksum, a message M of length m can be decomposed into submessages of length 1. In order to be able to calculate the checksum for messages of any length, the message is usually padded by padding, so that the result is a message M x whose length m is a multiple of 1. If the padding has a minimum length p> 0, then in case the padding no longer fits into the last block (ie if m modulo 1> 1 - p), another padding message part consisting of only padding is appended. For example, a number d of message parts for a message (or original message) M with a length m and a fixed message component length 1 can be calculated as follows: d = m / 1, where a residual message component length e results from e = m modulo 1 ,
Der Vollständigkeit halber wird noch kurz erläutert wie sich eine Anzahl an Nachrichtenteilen für eine Nachricht (z. B. Nachricht Μλ) mit Padding (bits ) ergibt (also eine Anzahl an Nachrichtenteilen, die sich durch das Padding ergeben) lässt sich wie folgt berechnen dg = m/1 + g wobei g = 0 oder g = 1, je nachdem, ob eine zusätzlicher Nachrichtenteil für das Padding erforderlich ist; g = 0 bedeutet, dass keine zusätzliche Padding-Teilnachricht erforderlich ist, die nur aus Paddingbits besteht erforderlich ist und g = 1 bedeutet, dass eine zusätzliche Padding- Teilnachricht erforderlich ist. Dies ist aber für den erfinderischen Kern nachrangig, da dies insbesondere übliche Padding-Verfahren sind, die einem Fachmann bekannt sind. Die entsprechenden ersten (oder zweiten oder weiteren) Nachrichtenteile können dann von 0 bis d durchnummeriert (wenn z. B. d abgerundet wird) oder indiziert werden, wobei d der letzte Nachrichtenteil der (ersten) Nachrichtenteile ist und 0 der erste Nachrichtenteil der (ersten) Nachrichtenteile ist. In einer anderen Implementierungsvariante kann auch anders gezählt werden, wenn z. B. d aufgerundet wird, kann auch bei 1 mit der Durchnummerierung begonnen werden. Nachfolgend wird jedoch von der Nummerierung von 0 bis d ausgegangen. Es wird als nächstes eine erste Unterprüfsumme über die ersten Nachrichtenteile bis auf einen letzten Nachrichtenteil d der ersten Nachrichtenteile gebildet. Mit anderen Worten wird über die ersten Nachrichtenteile 0 bis d-1 die erste Unterprüfsumme gebildet. Dies erfolgt, indem beispielsweise Teil- prüfsummen nacheinander für die entsprechenden Nachrichtenteile also jeweils über den Nachrichtenteil 0 bis Nachrich¬ tenteil d - 1 in einem Verfahrensschritt 114 durch den ersten Kommunikationspartner berechnet werden. Dabei wird jeweils in einem Verfahrensschritt 116 geprüft ob der vorletzte Nach- richtenteil d-1 erreicht ist. Ist der vorletzte Nachrichten¬ teil d-1 noch nicht erreicht (Pfad Nl) werden für den entsprechenden Nachrichtenteil die entsprechende Teilprüfsumme gebildet . Nachfolgend wird zu einer möglichen Realisierung des Verfah¬ rens in diesem Ausführungsbeispiel Bezug auf OpenSSL genommen. Einige der explizit erläuterten Verfahrensschritte bzw. Merkmale werden dabei implizit durch OpenSSL durchgeführt. Dies sind z. B. das Padding oder das Aufteilen der Nachricht in Teilnachrichten. Deren Nennung dient nur dem besseren Verständnis des Verfahrens. Zur Berechnung dieser Teilprüfsummen können beispielsweise eine kryptographische Hashfunktion verwendet werden, wie z. B. SHA256, die durch die Bibliothek OpenSSL verfügbar ist. Im Einzelnen wird zunächst die kryptographische Hashfunktion initialisiert, z. B. indem SHA256_Init (CTX, ... ) aufgerufen wird, wobei CTX Kontextdaten für den SHA Algorithmus sind.For the sake of completeness, it is briefly explained how a number of message parts for a message (eg message Μ λ ) results in padding (bits) (ie a number of Message parts resulting from padding) can be calculated as follows d g = m / 1 + g where g = 0 or g = 1, depending on whether an additional message part is required for padding; g = 0 means that no additional padding sub-message is required, consisting only of padding bits, and g = 1 means that an additional padding sub-message is required. However, this is secondary to the inventive core, since these are in particular conventional padding methods which are known to a person skilled in the art. The corresponding first (or second or subsequent) message parts may then be numbered from 0 to d (for example, if d is rounded down) or indexed, where d is the last message part of the (first) message parts and 0 is the first message part of the (first ) Is message parts. In another implementation variant can also be counted differently, if z. B. is rounded up, can also be started at 1 with the numbering. In the following, however, the numbering from 0 to d is assumed. Next, a first checksum is formed over the first message parts except for a last message part d of the first message parts. In other words, the first sub-checksum is formed over the first message parts 0 to d-1. This is done by, for example, partial checksum in succession for the respective message parts thus in each case on the message part 0 to Nachrich ¬ tenteil d - 1 in a step 114 by the first communication partner can be calculated. In each case, in a method step 116 it is checked whether the penultimate message part d-1 has been reached. If the penultimate message ¬ part d-1 is not reached (path Nl) are formed for the corresponding message part of the corresponding Teilprüfsumme. Reference is now made to a possible realization of the procedural ¬ proceedings in this embodiment, with respect to OpenSSL. Some of the explicitly explained method steps or features are implicitly performed by OpenSSL. These are z. As the padding or splitting the message into sub-messages. Their mention is only for a better understanding of the process. For example, a cryptographic hash function can be used to calculate these partial checksums, such as. SHA256, which is available through the OpenSSL library. Specifically, first the cryptographic hash function is initialized, e.g. By calling SHA256_Init (CTX, ...), where CTX is context data for the SHA algorithm.
Danach werden für die entsprechenden Nachrichtenteile die jeweiligen Teilprüfsummen berechnet. Dies kann beispielsweise dadurch erfolgen, dass SHA256_Update (CTX, Nachrichtenteil,...) für den jeweiligen entsprechenden Nachrichtenteil aufgerufen wird. Then the respective partial checksums are calculated for the corresponding message parts. This can be done, for example, by calling SHA256_Update (CTX, message part, ...) for the respective corresponding message part.
Die SHA_Update-Funktion arbeitet dabei wie folgt. Diese spei¬ chert alle Daten, die noch nicht einen vollen Nachrichtenteil ergeben (also deren Länge nicht der festen Nachrichtenteil- länge entspricht) , zwischen, um sie beim nächsten SHA Update oder beim SHA_Final Aufruf zu berücksichtigen. Diese Daten sind insbesondere in den Kontextdaten abgespeichert. The SHA_Update function works as follows. This spei ¬ chert all data not yet give a full message part (ie, the length of which does not correspond to the fixed Nachrichtenteil- length) between in order to be considered at the next call SHA update or SHA_Final. These data are stored in particular in the context data.
Wird der vorletzte Nachrichtenteil erreicht (Pfad Yl) so wird die noch unvollständige Prüfsumme für die erste Nachricht als die erste Unterprüfsumme zwischengespeichert, wobei erste Un¬ terprüfsumme bedeutet, dass bisher insbesondere nur die Teilprüfsummen für die ersten Nachrichtenteile 0 bis d-1 berechnet wurden. Is the second last message part reached (path Yl) so that still incomplete checksum for the first message is temporarily stored as the first Unterprüfsumme, said first means Un ¬ terprüfsumme that so far in particular only the Teilprüfsummen for the first message parts 0 to d-1 were calculated.
Dies geschieht beispielsweise dadurch, dass die Kontextdaten CTX der OpenSSL Implementierung von SHA-256 in einem Verfahrensschritt 120 durch den ersten Kommunikationspartner ko- piert werden, wobei die kopierten Kontextdaten auch als CTX_K bezeichnet werden. Es existieren zu diesem Zeitpunkt vorzugs¬ weise also zwei gespeicherte Datenstrukturen CTX und CTX_K die jeweils einen Teil der entsprechenden Unterprüfsumme bil- den . This happens, for example, in that the context data CTX of the OpenSSL implementation of SHA-256 is coordinated by the first communication partner in a method step 120. The copied context data are also referred to as CTX_K. There are at this time preference ¬ as that is, two data structures stored CTX and CTX_K the education each part of the respective Unterprüfsumme to.
Eine Unterprüfsumme kann dabei beispielsweise die Kontextinformationen (auch Kontext oder Kontextdaten) umfassen bzw. bei einer konkreten Implementierung diesen beispielsweise auch entsprechen, wenn die Teilprüfsumme für den vorletzten Nachrichtenteil d-1 berechnet wurde. Nach der Berechnung der Teilprüfsumme für den vorletzten Nachrichtenteil d-1 entspricht also beispielsweise die Kontextinformation CTX für die SHA-Implementierung von OpenSSL der Unterprüfsumme bzw. bildet zumindest einen Teil der jeweiligen Unterprüfsumme (z. B. erste/zweite Unterprüfsumme). A sub-checksum can include, for example, the context information (including context or context data) or, in the case of a concrete implementation, this can also correspond, for example, if the sub-checksum for the penultimate message part d-1 has been calculated. After the calculation of the partial checksum for the penultimate message part d-1, for example, the context information CTX for the SHA implementation of OpenSSL corresponds to the sub-checksum or forms at least part of the respective sub-checksum (eg first / second sub-checksum).
Bei der Berechnung der Teilprüfsummen kann in einer Variante beispielsweise für die jeweilige Teilprüfsumme insbesondere die vorhergehende Teilprüfsumme (sofern vorhanden) eines jeweiligen Nachrichtenteils mit berücksichtigt werden. When calculating the partial checksums, in a variant, for example, the preceding partial checksum (if present) of a particular message part can be taken into account, in particular for the respective partial checksum.
Danach wird die erste Prüfsumme anhand der ersten Unterprüf¬ summe und unter Berücksichtigung eines letzten Nachrichten- teils der ersten Nachrichtenteile in einem Verfahrensschritt 130 durch den ersten Kommunikationspartner gebildet. Hierzu wird dann beispielsweise der letzte Nachrichtenteil d mit mittels Padding zunächst auf die letzte Nachrichtenteillänge aufgefüllt, falls die Restnachrichtenteillänge e ungleich 0 ist. Die entsprechende Prüfsumme (z. B. erste oder zweite Prüfsumme) wird dann berechnet, in dem beispielsweise eine Teilprüfsumme des letzten Nachrichtenteils in Abhängigkeit von der Teilprüfsumme des vorhergehenden Nachrichtenteils (Nachrichtenteil d-1) berücksichtigt wird. Dies wird bei- spielsweise dadurch realisiert, in dem die Funktion Thereafter, the first checksum is formed based on the first Unterprüf ¬ sum and taking into account a last message part, the first parts of the message in a step 130 by the first communication partner. For this purpose, for example, the last message part d is padded with padding first to the last message component length, if the remaining message part length e is not equal to 0. The corresponding checksum (eg first or second checksum) is then calculated, in which, for example, a partial checksum of the last message part is taken into account as a function of the partial checksum of the preceding message part (message part d-1). This is realized, for example, by the function
SHA256 Final (CTX ...) die (erste) Prüfsumme berechnet. Mit anderen Worten muss aber nicht mehr die gesamte erste Nachricht eingehen, sondern nur der „Überstand" d (also der letzte Nachrichtenteil) berücksichtigt werden. Eine erste digitale Signatur für die erste Nachricht wird dann in einem Verfahrensschritt 140 durch den ersten Kommuni¬ kationspartner dadurch gebildet, indem beispielsweise die digitale Signatur über die erste Prüfsumme berechnet wird. In einem Verfahrensschritt 150 wird dann die erste Nachricht mit der ersten digitalen Signatur an den zweiten Kommunikationspartner durch den ersten Kommunikationspartner gesendet. Dabei wird insbesondere ausschließlich die erste Nachricht und die erste digitale Signatur versendet ohne die erste Nonce . SHA256 Final (CTX ...) calculates the (first) checksum. In other words, but not the entire first message must be received, but only the "overhang" d (ie the last message part) are considered. A first digital signature for the first message is then in a step 140 by the first communi ¬ cation partner by The first signature with the first digital signature is then sent to the second communication partner by the first communication partner in a method step 150. In this case, in particular, only the first message and the first digital signature are used shipped without the first nonce.
Nachfolgend wird erläutert, wie eine erste Nonce anhand der ersten Unterprüfsumme und unter Berücksichtigung des letzten unmodifizierten Nachrichtenteils (also der letzte Nachrich- tenteil ohne das vorher genannte Padding) berechnet wird. The following explains how to calculate a first nonce based on the first checksum and taking into account the last unmodified message part (ie the last message part without the aforementioned padding).
Allgemein wird zunächst in einem Verfahrensschritt 160 über¬ prüft, ob eine Prüfsumme einer vorherigen Nachricht vorhanden ist. Da der ersten Nachricht keine weitere Nachricht vorher- gegangen ist (Pfad N2), existiert keine Prüfsumme einer vorherigen Nachricht, die z. B. bei einer Prüfung einer digitalen Signatur durch einen Kommunikationspartner (hier z. B. der erste Kommunikationspartner) berechnet worden wäre. Wäre eine Prüfsumme einer vorherigen Nachricht vorhanden (Pfad Y2) so würde diese Prüfsumme an den letzten Nachrichtenteil d der ersten Nachricht (also an das Ende des letzten Nachrichtenteils d) in einem Verfahrensschritt 165 angehängt werden. In einem solchen Fall (Prüfsumme vorhanden) wird also vorzugsweise direkt an das Ende des letzten Nachrichtenteils die Prüfsumme der vorhergehenden Nachricht angefügt (was auch als eingefügt, angehängt und dergleichen bezeichnet werden kann) . Da jedoch für die erste Nachricht eine entsprechende Prüfsum¬ me einer vorhergehenden Nachricht nicht verfügbar ist (Pfad N2), wird dem letzten Nachrichtenteil d ein Initialisierungswert (z. B. eine Zufallszahl, O-Bits oder ein anderes Bitmus- ter) angehängt, der vorzugsweise die gleiche Länge wie die erste Prüfsumme hat. Alternativ kann beispielsweise an den letzten Nachrichtenteil d kein Initialisierungswert angehängt werden . Für die Berechnung der (ersten) Nonce ist zu diesem Zeitpunkt der letzte Nachrichtenteil d noch nicht mit Padding bearbeitet worden. Dies kann beispielsweis dadurch realisiert werden, in dem entweder die Padding-Bits wieder abgeschnitten werden oder der unmodifizierte letzte Nachrichtenteil (also ohne Padding) zwischengespeichert wurde. Generally, first at a step 160 checks on ¬ whether a checksum of a preceding message is present. Since the first message has not been preceded by another message (path N2), there is no checksum of a previous message which, for. B. in a check of a digital signature by a communication partner (here, for example, the first communication partner) would have been calculated. If a checksum of a previous message were present (path Y2), then this checksum would be appended to the last message part d of the first message (ie to the end of the last message part d) in a method step 165. In such a case (checksum available) is thus preferably added directly to the end of the last message part, the checksum of the previous message (which can also be referred to as inserted, attached and the like). However, since for the first message a corresponding Prüfsum ¬ me of a previous message is not available (path N2), an initialization value (z. B. a random number, O-bits or other Bitmus- ter) is appended to the last message part d, the preferably the same length as the first checksum. Alternatively, for example, no initialization value can be appended to the last message part d. For the calculation of the (first) nonce, the last message part d has not yet been processed with padding at this time. This can be realized, for example, in that either the padding bits are cut off again or the unmodified last message part (ie without padding) has been buffered.
Die berechnete (erste) Nonce wird dann vorzugsweise bei einer Schlüsselableitung mitverwendet. Danach wird erst das Padding für den letzten Nachrichtenteil durchgeführt und für den letzten Nachrichtenteil (ggf. inklusive der Prüfsumme der vorhergehenden Nachricht oder des Initialisierungswertes) eine Teilprüfsumme in einem Verfahrens¬ schritt 170 gebildet, die vorzugsweise in Abhängigkeit von der vorhergehenden Teilprüfsumme gebildet wird. Dies wird beispielsweise dadurch realisiert, in dem zuerst die Funktion SHA256_Update (CTX_K, „0", ...) und anschließend die Funktion SHA256_Final (digest, CTX_K) aufgerufen wird. Ist die Länge des letzten Nachrichtenteils (aufgrund der Länge der Prüfsum- me bzw. des Initialisierungswertes) jedoch größer als die zuvor bestimmte Länge der Teilnachrichten, muss noch eine zusätzliche Teilprüfsumme mittels SHA256_Update berechnet werden (entsprechend ergeben sich dadurch d+1 Nachrichtenteile, wobei der d+1 Nachrichtenteil der letzte Nachrichtenteil ist und der zusätzliche Nachrichtenteil der d-te Nachrichtenteil ist) . Dies ist beispielsweise weiter unten in diesem Ausführungsbeispiel und in Fig. 3 genauer erläutert, wie in einem solchen Fall mit dem zusätzlichen/überhängenden Nachrichtenteil verfahren wird. The calculated (first) nonce is then preferably used in a key derivation. Thereafter, only the padding for the last message part is performed and for the last message part (possibly including the checksum of the previous message or the initialization value) a Teilprüfsumme formed in a procedural ¬ step 170, which is preferably formed as a function of the previous Teilprüfsumme. This is realized, for example, by calling function SHA256_Update (CTX_K, "0", ...) first and then call function SHA256_Final (digest, CTX_K) .The length of the last message part (based on the length of the checksum or the initialization value), however, greater than the previously determined length of the partial messages, an additional partial checksum must be calculated using SHA256_Update (this results in d + 1 message parts, whereby the d + 1 message part is the last message part and the additional message part of the d This is, for example, explained in more detail below in this embodiment and in Fig. 3, as in a such case with the additional / overhanging message part is moved.
Daraus ergibt sich dann in einem Verfahrensschritt 180 die erste Nonce, die vorzugsweise zu internen Verwendung (z. B. zur Nutzung bei einem Schlüsselaustausch) von dem (ersten) Kommunikationspartner in einem Verfahrensschritt 190 gespeichert . Etwas vereinfacht und verallgemeinert kann das Verfahren zur Berechnung der digitalen Signatur und der Nonce wie folgt durchgeführt werden. From this, the first nonce, which is preferably stored for internal use (eg for use in a key exchange) by the (first) communication partner in a method step 190, then results in a method step 180. In a somewhat simplified and generalized way, the method for calculating the digital signature and the nonce can be performed as follows.
Seien Ml = M | El und M2 = M | E2 zwei Nachrichten, die im ersten Teil (M) übereinstimmen. Dabei sind M die Nachrichtenteile bis auf den letzten Nachrichtenteil d, wie dies oben erwähnt wurde. Dann kann man die Prüfsummen Hl = H(M1) und H2 = H(M2) so berechnen: SHA_Init (CTX) Let Ml = M | El and M2 = M | E2 two messages that match in the first part (M). M is the message parts except for the last message part d, as mentioned above. Then you can calculate the checksums Hl = H (M1) and H2 = H (M2) as follows: SHA_Init (CTX)
SHA_Update (CTX, M)  SHA_Update (CTX, M)
CTX_K = copy(CTX)  CTX_K = copy (CTX)
SHA_Update (CTX, El)  SHA_Update (CTX, El)
SHA_Update (CTX_K, E2)  SHA_Update (CTX_K, E2)
Hl = SHA_Final (CTX) Hl = SHA_Final (CTX)
H2 = SHA_Final (CTX_K)  H2 = SHA_Final (CTX_K)
Die Logik, die in SHA_Update und SHA_Final enthalten ist, implementiert das dann genau so wie beschrieben; insbesondere das Zerlegen der Nachricht in Teilnachrichten und die korrekte Behandlung des Padding. Ebenfalls wird beispielsweise in den Kontextdaten CTX der überhängende/zusätzliche Nachrichtenteil der zu hashenden Nachricht gespeichert, der noch nicht berücksichtigt wurde. The logic contained in SHA_Update and SHA_Final then implements it exactly as described; in particular the breaking down of the message into submessages and the correct handling of the padding. Also, for example, in the context data CTX, the overhanging / additional message part of the message to be hashed is stored, which has not yet been taken into account.
Wird nun die erste Nachricht mit der ersten digitalen Signatur durch den zweiten Kommunikationspartner empfangen, prüft dieser zunächst die erste digitale Signatur. Hierfür bildet der zweite Kommunikationspartner eine (lokale) erste Prüfsumme und berechnet über diese eine digitale Signatur, die bei einer unveränderten ersten Nachricht, der ersten digitalen Signatur des ersten Kommunikationspartners entspricht. Folg- lieh entspricht die (lokale) erste Prüfsumme des zweiten Kommunikationspartners der ersten Prüfsumme des ersten Kommuni¬ kationspartners, wenn die erste Nachricht unverfälscht ist. Stimmen diese Signaturen/Prüfsummen nicht überein, ist die Nachricht verfälscht und das Verfahren endet bzw. es werden keine kryptographischen Schlüssel ausgetauscht. Für das Aus¬ führungsbeispiel wird jedoch davon ausgegangenen, dass keine Nachricht verfälscht wurde. If the first message with the first digital signature is then received by the second communication partner, the latter first checks the first digital signature. For this forms the second communication partner a (local) first checksum and calculates over this a digital signature, which corresponds to an unchanged first message, the first digital signature of the first communication partner. Folg- borrowed corresponds to the (local) first checksum of the second communication partner of the first checksum of the first communi cation ¬ partners, when the first message is genuine. If these signatures / checksums do not match, the message is corrupted and the method ends or no cryptographic keys are exchanged. For the exemplary embodiment, it is assumed, however, that no message was corrupted.
Nun bildet der zweite Kommunikationspartner analog zum ersten Kommunikationspartner eine erste Nachricht. Für diese zweite Nachricht wird analog zur ersten Nachricht entsprechend durch den zweiten Kommunikationspartner eine zweite Prüfsumme berechnet, wobei die zweite Nachricht in zweite Nachrichtentei¬ le aufgeteilt wird (analog zur ersten Nachricht) . Entspre- chend wird auch eine zweite Unterprüfsumme über die zweiten Nachrichtenteile bis auf einen letzten Nachrichtenteil der zweiten Nachrichtenteile gebildet (analog zur ersten Unter¬ prüfsumme) . Auch wird analog zur ersten Prüfsumme die zweite Prüfsumme anhand der zweiten Unterprüfsumme und unter Berück- sichtigung des letzten Nachrichtenteils gebildet. Now, the second communication partner forms a first message analogous to the first communication partner. For this second message, a second checksum corresponding to the first message is calculated by the second communication partner, wherein the second message is divided into second Nachrichtentei ¬ le (analogous to the first message). Correspondingly, a second Unterprüfsumme via the second message parts until a last message segment of the second message portions is formed (similar to the first sub ¬ checksum). Also, analogously to the first checksum, the second checksum is formed on the basis of the second checksum and taking into account the last message part.
Analog zur ersten digitalen Signatur wird entsprechend durch den zweiten Kommunikationspartner eine zweite digitale Signatur für die zweite Nachricht gebildet. Analogously to the first digital signature, a second digital signature for the second message is accordingly formed by the second communication partner.
Bei der Berechnung einer zweiten Nonce durch den zweiten Kommunikationspartner wird - analog zur ersten Nonce - die zweiten Unterprüfsumme und der letzte Nachrichtenteil der zweiten Nachrichtenteile der zweiten Nachricht entsprechend durch den zweiten Kommunikationspartner berücksichtigt. Da jedoch eine Prüfsumme einer vorherigen Nachricht (also die (lokale) erste Prüfsumme) verfügbar ist, wird für diese Berechnung an den letzten Nachrichtenteil die erste Prüfsumme angefügt und da- nach erst das Padding durchgeführt. Die zweite Nonce kann beispielsweise dadurch realisiert, indem wieder die Funktion SHA256_Final (CTX_K, zweite Nachricht, ...) für die zweiten Nachrichtenteile unter der erwähnten Berücksichtigung der ersten Prüfsumme aufgerufen wird. Die daraus resultierende zweite Nonce wird vorzugsweise zu internen Verwendung (z. B. zur Nutzung bei einem Schlüsselaustausch) von dem zweiten Kommunikationspartner gespeichert . Danach sendet der zweite Kommunikationspartner die zweite Nachricht mit der zweiten digitalen Signatur an den ersten Kommunikationspartner . When calculating a second nonce by the second communication partner, the second sub-checksum and the last message part of the second message parts of the second message are taken into account accordingly by the second communication partner, analogously to the first nonce. However, since a checksum of a previous message (ie the (local) first checksum) is available, the first checksum is added to the last message part for this calculation and after the padding was done. The second nonce can be realized, for example, by calling again the function SHA256_Final (CTX_K, second message,...) For the second message parts under the consideration of the first checksum. The resulting second nonce is preferably stored for internal use (eg, for use in a key exchange) by the second communication partner. Thereafter, the second communication partner sends the second message with the second digital signature to the first communication partner.
Bei dem genannten Verfahren wird insbesondere davon ausgegan- gen, dass die Teilprüfsummen nacheinander von 0 bis d bzw. d- 1 bzw. d+1 gebildet werden und somit insbesondere eine implizite Reihenfolge gegeben ist. Genauer werden beispielsweise für die entsprechende Unterprüfsumme einer entsprechenden Nachricht die Nachrichtenteile 0 bis d-1 berücksichtigt. Für die Prüfsumme der entsprechenden Nachricht werden dann dieIn the case of the named method, it is assumed, in particular, that the partial checksums are formed successively from 0 to d or d-1 or d + 1 and thus, in particular, an implicit sequence is given. More precisely, for example, the message parts 0 to d-1 are taken into account for the corresponding sub-checksum of a corresponding message. For the checksum of the corresponding message then the
Nachrichtenteile 0 bis d-1 mittels der entsprechenden Unterprüfsumme und der Nachrichtenteil d berücksichtigt. Für eine entsprechende Nonce der entsprechenden Nachricht werden bei¬ spielsweise dann die Nachrichtenteile 0 bis d-1 mittels der entsprechenden Unterprüfsumme , der Nachrichtenteil d und ggf. der Nachrichtenteil d+1 berücksichtigt, wobei insbesondere der Nachrichtenteil d durch den Initialisierungs¬ wert/vorhergehenden Prüfsumme einer vorhergehenden Nachricht modifiziert wird (und sich dadurch unter Umständen ein weite- rer Nachrichtenteil d+1 ergibt, der dann vorzugsweise den letzten Nachrichtenteil repräsentiert) . Message parts 0 to d-1 by means of the corresponding Unterprüfsumme and the message part d considered. For a corresponding Nonce of the corresponding message are playing then 0 the message part d and, if the message part d + 1 takes into account the message portions at ¬ to d-1 by the corresponding Unterprüfsumme, and in particular the message portion d by the initialization value ¬ / previous checksum a previous message is modified (and thereby may result in another message part d + 1, which then preferably represents the last message part).
Mit anderen Worten wird mit der Erfindung erreicht, dass auf das Mitschicken der Nonces bei einem Schlüsselaustausch ver- ziehtet werden kann. Zudem lassen sich die Anzahl der Aufrufe von kryptographischen Funktion reduzieren, da durch eine geschickte Wahl der Anordnung der Daten (das Anhängen einer Prüfsumme der vorherigen Nachricht an den letzten Nachrich- tenteil einer (aktuellen) Nachricht) die Unterprüfsummen für die entsprechenden Prüfsummen und den entsprechenden Nonces einer entsprechenden Nachricht verwendet werden können. Entsprechend wird die Zahl der notwendigen Hash-Operationen die bei einem Schlüsselaustausch notwendig sind gegenüber von konventionellen Schlüsselaustauschverfahren opti¬ miert/reduziert. In other words, it is achieved with the invention that it is possible to dispense with the sending of the nonces during a key exchange. In addition, the number of calls to the cryptographic function can be reduced since, by a clever choice of the arrangement of the data (attaching a check sum of the previous message to the last message). part of a (current) message), the checksums for the corresponding checksums and the corresponding nonces of a corresponding message can be used. Accordingly, the number of necessary hash operations, the case of a key exchange are necessary compared with conventional key exchange method opti mized ¬ / reduced.
Das Verfahren ist dahingehend vorteilhaft, dass die Nonces nicht mehr als Teil der Nachrichten bei einem Schlüsselaus¬ tausch geschickt werden müssen, sondern lokal berechnet werden können. Mittels des Verfahrens werden zudem die Anzahl der durchgeführten Operationen in der konkreten Kombination mit digitalen Signaturen optimiert. Damit kann die entspre- chende Unterprüfsumme jeweils für die digitale Signatur und die entsprechenden Nonce genutzt werden, sodass die kryptog- raphischen Operationen für die Nonce und die digitale Signatur in Summe signifikant reduziert werden. Dadurch kann die Berechnung der digitalen Signatur und der Nonce deutlich ver- einfacht werden. The method is advantageous in that the nonces need not be sent as part of message in a Schlüsselaus ¬ exchange, but can be computed locally. By means of the method, moreover, the number of operations performed in the concrete combination with digital signatures is optimized. Thus, the corresponding checksum can be used for the digital signature and the corresponding nonce, so that the total sum of the cryptographic operations for the nonce and the digital signature is significantly reduced. This significantly simplifies the calculation of the digital signature and the nonce.
Dabei kann beispielsweise eine Hash Funktion mit einer fixen Blockgröße (Nachrichtenteillänge) verwendet werden. Dazu wird - wie oben erwähnt - SHA-256 verwendet, um das gewünschte Ergebnis zu erzielen. Im Einzelnen nutzt SHA-256 nutzt dazu 512 Bit Blöcke (also eine Nachrichtenteillänge von 512 Bit) wie in Fig. 2 dargestellt. In this case, for example, a hash function with a fixed block size (message component length) can be used. For this purpose - as mentioned above - SHA-256 is used to achieve the desired result. Specifically, SHA-256 uses 512-bit blocks (that is, 512-bit message length) as shown in FIG.
Im Einzelnen zeigt die Fig. 2 vereinfacht für eine Nachricht mit SHA-256 eine Prüfsumme H berechnet wird. Das SHA-256 Verfahren wird mit Kontextdaten und einem Schlüssel - vereinfacht als IV dargestellt - initialisiert. Danach wird eine Nachricht in Nachrichtenteile MB zerlegt und für die entsprechenden Nachrichtenteile MB [ 0 ] bis MB[d] (d ist wie oben er- wähnt die Anzahl der Nachrichtenteile) werden jeweils Teil¬ prüfsummen C berechnet, aus denen sich die Prüfsumme H ergibt . Wird - wie oben bereits erläutert - die SHA-256 aus OpenSSL verwendet, wird durch OpenSSL folgendes Interface bereitge¬ stellt . In detail, FIG. 2 shows in simplified form a check sum H for a message with SHA-256. The SHA-256 method is initialized with context data and a key - more simply represented as IV. Thereafter, a message is decomposed into message portions MB and for the corresponding message parts MB [0] to MB [d] (d is as above ER- imagines the number of message portions) are each part ¬ checksum C is calculated from which the checksum H gives , Is - as already explained above - the 256-SHA from OpenSSL used, provides ¬ bereitge by OpenSSL following interface.
- Initialisierung: SHA256_Init (CTX)  Initialization: SHA256_Init (CTX)
- Update: SHA256_Update (CTX, data, datalength) , Aufruf der- Update: SHA256_Update (CTX, data, datalength), call the
Hash Operation für jeden kompletten 512 Bit Block erfolgt in¬ tern in der Funktion Hash operation for each complete 512-bit block is done in ¬ tern in the function
- Finale Runde: SHA256_Final (digest, CTX)., Aufruf für den letzten Block  - Final round: SHA256_Final (digest, CTX)., Call for the last block
Um die Anzahl der Aufrufe von kryptographischen Funktionen zu reduzieren wird vorgeschlagen die Daten wie folgt anzuordnen: hn = hash (Nachricht [ | hn-i ) mit ho = 0, wobei h eine Prüfsumme einer Nachricht ist und 0 bis n ein Zähler für die Nachrichten ist. To reduce the number of calls to cryptographic functions, it is proposed to arrange the data as follows: h n = hash (message [| h n -i) with ho = 0, where h is a checksum of a message and 0 through n is a counter for the news is.
Bei der Berechnung können nun die Daten für Nonces und die digitale Signatur bis zum letzten Nachrichtenteil einer jeweiligen Nachricht gleichbehandelt werden, indem die Unterprüfsumme verwendet bzw. zwischengespeichert wird. During the calculation, the data for nonces and the digital signature up to the last message part of a respective message can now be treated equally by using or buffering the sub-checksum.
Im Falle der digitalen Signatur wird die entsprechende Prüf- summe beispielsweise mit der letzten Runde (also Berechnung der Teilprüfsumme für den letzten Nachrichtenteil) abgeschlossen. Im Falle eine Nonce erfolgt insbesondere zusätz¬ lich das Anfügen der Prüfsumme der vorangegangenen Nachricht. Dies kann beispielsweise zu einer zusätzlichen Runde (es ergibt sich also mindestens ein zusätzlicher Nachrichtenteil für den jeweils eine Teilprüfsumme berechnet wird) beim Be¬ rechnen der Prüfsumme bzw. der Teilprüfsumme führen, da die Prüfsumme der vorangegangenen Nachricht eine Größe von 256 Bit hat und somit der letzte Nachrichtenteil die Nachrichten- teillänge von 512 Bit überschreiten kann. In the case of the digital signature, the corresponding checksum is completed, for example, with the last round (ie calculation of the partial checksum for the last message part). In the case of a nonce attaching the checksum of the previous message is done in particular zusätz ¬ Lich. This can, for example, to an additional round (ie, it results in at least one additional message portion for which a partial checksum is calculated respectively) during loading ¬ calculate the checksum or the partial checksum result, since the checksum of the previous message has and a size of 256 bits thus the last message part can exceed the message length of 512 bits.
In einem solchen Fall ergeben sich d+1 Nachrichtenteile, wobei für den Nachrichtenteil d (z. B. mit SHA Update) und den Nachrichtenteil d+1 (z. B. mit SHA_Final) dann die entspre¬ chenden Teilprüfsummen berechnet werden. Dabei kann der Nach¬ richtenteil d als überhängender Nachrichtenteil (oder zusätzlicher Nachrichtenteil) bezeichnet werden und d+1 als letzter Nachrichtenteil bezeichnet werden. Der letzte Nachrichtenteil d+1 wird dann - wie oben erläutert - ebenfalls mit Padding auf die entsprechende Nachrichtenteillänge gebracht und dann wie oben erläutert - die entsprechende Nonce für die jeweilige Nachricht berechnet. In such a case, d + 1 message parts result, whereby for the message part d (eg with SHA Update) and the Message part d + 1 (eg with SHA_Final) then the corre ¬ sponding Teilprüfsummen be calculated. In this case, the post ¬ direct part d as overhanging message part (or additional message portion) are referred to, and d + 1 designates the last message part. The last message part d + 1 is then - as explained above - also brought with padding to the appropriate message length and then as explained above - the corresponding nonce calculated for each message.
Im Falle von OpenSSL würde eine entsprechende Nachricht bis zum vorletzten Nachrichtenteil d-1 gehashed werden (durch den Aufruf von SHA256_Update (CTX, data, datalength) . Vor dem Aufruf der Funktion SHA256_Finalwird die Kontextdaten (also mit der Unterprüfsumme) in eine neue Struktur CTX_K kopiert, um die Unterprüfsumme zwischen zu speichern. In the case of OpenSSL, a corresponding message would be hashed to the penultimate message part d-1 (by calling SHA256_Update (CTX, data, datalength).) Before the call to function SHA256_Final, the context data (ie with the checksum) is hacked into a new structure CTX_K copied to save the checksum between.
Um die entsprechende Prüfsumme für die Signatur über die Da¬ ten zu berechnen, ruft man SHA256_Final (digest, CTX) auf, wo- bei digest die Prüfsumme ist. To calculate the corresponding sum for the signature on the Da ¬ th, one (CTX digest,) calls on SHA256_Final, WO at digest the checksum is.
Zur Berechnung der Nonce ruft man SHA256_Update (CTX_K, hn-l, len( hn-l)), gefolgt von SHA256_Final (digestl, CTX_K) auf, wo¬ bei digestl die Nonce ist. To calculate the nonce one calls SHA256_Update (CTX_K, h n -l, len (hn-l)), followed by SHA256_Final (digestl, CTX_K), where ¬ at digestl is the nonce.
Die Fig. 3 zeigt wie das Bilden der Prüfsumme und der Nonce aus den vorherigen Ausführungsbeispielen realisiert sein kann . Eine Nachricht M O hat eine Nachrichtenlänge m von 2348 Bit. Bei einer festen Nachrichtenteillänge 1 von 512 Bit ergeben sich 0 ... 4 Nachrichtenteile MB[i] (i ist der Index um einen entsprechenden Nachrichtenteil auszuwählen) , wobei 4 der letzte Nachrichtenteil MB [ 4 ] ist. Dabei ergibt sich mit e = m modulo 1 eine Restnachrichtenteillänge e = 300. FIG. 3 shows how the formation of the checksum and the nonce from the previous embodiments can be realized. A message M O has a message length m of 2348 bits. With a fixed message length 1 of 512 bits, there are 0 ... 4 message parts MB [i] (i is the index to select a corresponding message part), where 4 is the last message part MB [4]. This results in e = m modulo 1 a residual message length e = 300.
Um bei der bereits genannten SHA-256 Implementierung von OpenSSL zu bleiben, wird zunächst (wie oben erläutert) SHA256_Init I_H zur Initialisierung aufgerufen. Danach wird für jeden Nachrichtenteil bis auf den letzten Nachrichtenteil als 0 bis d-1 bzw. MB [ 0 ] bis MB[3] jeweils mittels To stay with the previously mentioned SHA-256 implementation of OpenSSL, first (as explained above) SHA256_Init I_H called for initialization. Thereafter, for each message part except for the last message part as 0 to d-1 or MB [0] to MB [3] each means
SHA256 Update U H eine Teilprüfsumme für die entsprechenden Nachrichtenteile MB [ 0 bis d-1] berechnet, die beispielsweise jeweils (sofern möglich) die Teilprüfsumme des vorherigen Nachrichtenteils berücksichtigen. Die entsprechenden Teilprüfsummen können beispielsweise in der Kontextinformation (oder auch nur Kontext genannt) gespeichert werden. SHA256 Update U H calculates a partial checksum for the corresponding message parts MB [0 to d-1] which, for example, take into account (if possible) the partial checksum of the previous message part. The corresponding partial checksums can be stored, for example, in the context information (or also called just context).
Nun wird der Kontext bzw. die Unterprüfsumme (die Unterprüfsumme umfassend die Teilprüfsumme für Nachrichtenteile bis zum vorletzten Nachrichtenteil d-1 und optional die Kontextdaten des SHA-Verfahrens ) zwischengespeichert C_H und kann beispielsweise - wie in den vorhergehenden Ausführungsbeispielen - CTX_K genannt werden. Wie in den vorhergehenden Ausführungsbeispielen erläutert existieren zu diesem Zeitpunkt vorzugsweise zwei Unterprüfsummen, die Unterprüfsumme CTX und die kopierte Unterprüfsumme CTX_K. Dies ist insbeson- dere ein Implementierungsdetail, das der spezifischen Implementierung des SHA-Verfahrens durch OpenSSL geschuldet ist. Now the context or the sub-checksum (the sub-checksum comprising the sub-checksum for message parts up to the penultimate message part d-1 and optionally the context data of the SHA method) is buffered C_H and can be called CTX_K, for example, as in the previous embodiments. As explained in the preceding embodiments, there are preferably two sub-checksums, the sub-checksum CTX and the sub-checksum CTX_K copied at this time. This is, in particular, an implementation detail due to the specific implementation of the SHA method by OpenSSL.
Auch andere Verfahren/Realisierungsvariante sind denkbar in denen die Schnittstellen/Interfaces die OpenSSL bereitstellt angepasst werden. Beispielsweise kann durch den SHA-FinalOther methods / implementation variants are also conceivable in which the interfaces / interfaces that OpenSSL provides are adapted. For example, through the SHA Final
Aufruf die Unterprüfsumme bzw. die Kontext (daten) CTX nicht modifiziert werden und stattdessen eine separate Input/Output Variable verwendet werden. Es muss also nicht zwangsläufig eine Kopie angelegt werden, sondern es ist nur sicherzustel- len, dass insbesondere die Unterprüfsumme für die Berechnung der Nonce und die Berechnung der digitalen Signatur unverändert bzw. identisch ist. Call the checksum or the context (data) CTX are not modified and instead use a separate input / output variable. It is therefore not necessary to create a copy, but it is only necessary to ensure that the checksum for the calculation of the nonce and the calculation of the digital signature are unchanged or identical.
Um die Nachricht M SIG mit der digitalen Signatur zu bilden, wird der letzte Nachrichtenteil MB [4] mittels Padding Bits P auf die Nachrichtenteillänge 1 aufgefüllt. Danach wird In order to form the message M SIG with the digital signature, the last message part MB [4] is padded to the message length 1 by means of padding bits P. After that will
SHA256_Final F_H mit CTX bzw. der Unterprüfsumme aufgerufen um die letzte Teilprüfsumme für den letzten Nachrichtenteil zu berechnen und damit die entsprechende Prüfsumme für die Nachricht M_0. Wie in den vorhergehenden Ausführungsbeispie¬ len erläutert, wird nun die digitale Signatur über die Prüfsumme gebildet. Aus der digitalen Signatur und der Nachricht M_0 wird dann die digital signierte Nachricht M_SIG gebildet. SHA256_Final F_H with CTX or the checksum called by the last partial checksum for the last message part to calculate and thus the corresponding checksum for the message M_0. As explained in the preceding Ausführungsbeispie ¬ len, now the digital signature is formed on the checksum. The digitally signed message M_SIG is then formed from the digital signature and the message M_0.
Zu Berechnung der Nonce M_RH wird zunächst an den letzten Nachrichtenteil MB [4] (also an das Ende des Nachrichtenteils) die Prüfsumme H L der vorhergehenden Nachricht angefügt. Da- mit bildet der Nachrichtenteil d bzw. MB [4] einen überhängenden Nachrichtenteil, da die Prüfsumme eine Nachrichtenlänge von 256 Bit hat und somit die zulässige Nachrichtenteillänge 512 für den Nachrichtenteil d bzw. MB [4] überschritten wird. Hierdurch entsteht ein fünfter Nachrichtenteil MB [5] bzw. ein Nachrichtenteil d+1 der den letzten Nachrichtenteil bildet. Dieser hat zunächst eine Länge von 44 Bit, die mittels To calculate the nonce M_RH, first the check message H L of the preceding message is added to the last message part MB [4] (ie to the end of the message part). With this, the message part d or MB [4] forms an overhanging message part, since the checksum has a message length of 256 bits and thus the permissible message component length 512 for the message part d or MB [4] is exceeded. This creates a fifth message part MB [5] or a message part d + 1 which forms the last message part. This first has a length of 44 bits, by means of
Padding-Bits P auf 512 Bits bzw. auf die entsprechende Nach¬ richtenteillänge von 512 Bits aufgefüllt werden. Padding bit P are padded to 512 bits and the corresponding After ¬ directed part-length of 512 bits.
Um nun die Nonce zu berechnen wird für den überhängenden Nachrichtenteil d bzw. MB [ 4 ] eine entsprechende Teilprüfsumme mittels SHA256_Update unter Verwendung der Kopie der Unter¬ prüfsumme bzw. CTX_K berechnet. Für den nun letzten Nachrich- tenteil d+1 bzw. MB [5] wird die letzte Teilprüfsumme gebildet, indem nun SHA256_Final unter Verwendung der Teilprüfsumme des überhängenden Nachrichtenteils verwendet wird. In der Praxis geschieht dies, indem CTX_K beim SHA256_Final-Aufruf übergeben wird, wobei CTX K durch den SHA256 Update-Aufruf für den überhängenden Nachrichtenteil modifiziert wurde bzw. auf diese Weise die vorhergehenden Teilprüfsummen mitberücksichtigt werden. Mit anderen Worten liefert hier nun der SHA256_Final-Aufruf die Nonce. Die Fig. 4 zeigt ein weiteres Ausführungsbeispiel der Erfin¬ dung als Vorrichtung zum Austausch von Nachrichten. Die Vorrichtung umfasst erstes Kommunikationsmodul 410, ein erstes Prüfmodul 420, ein erstes Bereitstellungsmodul 430, ein erstes Berechnungsmodul 440, ein zweiten ein zweites Berechnungsmodul und eine optionale erste Kommunikations- Schnittstelle 404, die über einen ersten Bus 403 kommunikativ miteinander verbunden sind. In order to calculate the nonce, a corresponding partial checksum is calculated for the overhanging message part d or MB [4] by means of SHA256_Update using the copy of the sub ¬ checksum or CTX_K. For the last message part d + 1 or MB [5], the last partial checksum is formed by using SHA256_Final using the partial checksum of the overhanging message part. In practice, this is done by passing CTX_K on the SHA256_Final call, where CTX K has been modified by the SHA256 update call for the overhanging message part, or by taking into account the previous part checksums. In other words, the SHA256_Final call now returns the nonce. FIG. 4 shows a further embodiment of the dung OF INVENTION ¬ as a device for exchange of messages. The device comprises first communication module 410, a first test module 420, a first provision module 430, a first calculation module 440, a second a second calculation module and an optional first communication interface 404, which are communicatively connected to one another via a first bus 403.
Die Vorrichtung kann beispielsweise zusätzlich noch eine weitere oder mehrere weitere Komponente/n umfassen, wie bei- spielsweise einen Prozessor, eine Speichereinheit, ein Einga¬ begerät, insbesondere eine Computertastatur oder eine Computermaus, und ein Anzeigegerät (z. B. einen Monitor) . Der Prozessor kann beispielsweise mehrere weitere Prozessoren umfassen, wobei beispielsweise die weiteren Prozessoren jeweils eines oder mehrere der Module realisieren. Alternativ realisiert der Prozessor insbesondere alle Module des Ausführungsbeispiels. Die weitere/n Komponente/n können beispielsweise ebenfalls über den ersten Bus 403 miteinander kommunikativ verbunden sein. The device may, for example, in addition still further comprise one or more further component / s, such as a processor, a memory unit, a entranc begerät ¬, in particular a computer keyboard or a computer mouse, and a display device (eg. As a monitor). By way of example, the processor may comprise a plurality of additional processors, wherein, for example, the further processors each implement one or more of the modules. Alternatively, the processor implements in particular all the modules of the embodiment. For example, the further component (s) may also be communicatively connected to one another via the first bus 403.
Bei dem Prozessor kann es sich beispielsweise um einen ASIC handeln, der anwendungsspezifisch für die Funktionen eines jeweiligen Moduls oder aller Module des Ausführungsbeispiels (und/oder weiterer Ausführungsbeispiele) realisiert wurde, wobei die Programmkomponente bzw. die Programmbefehle insbesondere als integrierte Schaltkreise realisiert sind. Bei dem Prozessor kann es sich beispielsweise auch um einen FPGA han¬ deln, der insbesondere mittels der Programmbefehle derart konfiguriert wird, dass der FPGA die Funktionen eines jewei- Ilgen Moduls oder aller Module des Ausführungsbeispiels (und/oder weiterer Ausführungsbeispiele) realisiert. The processor may, for example, be an ASIC that has been implemented in an application-specific manner for the functions of a respective module or all modules of the exemplary embodiment (and / or further exemplary embodiments), the program component or the program instructions being realized in particular as integrated circuits. The processor may for example also be a FPGA han ¬ spindles, which is configured in particular by means of program instructions such that the FPGA, the functions of a jewei- Ilgen module or all modules of the embodiment (and / or other embodiments) realized.
Das erste Kommunikationsmodul 410 ist zum Empfangen einer ersten Nachricht mit einer ersten digitalen Signatur von ei- nem Kommunikationspartner (z. B. einem ersten Kommunikationspartner oder einem zweiten Kommunikationspartner) eingerichtet. Das erste Kommunikationsmodul 410 kann beispielsweise mittels des Prozessors, der Speichereinheit und einer ersten Pro¬ grammkomponente implementiert oder realisiert werden, wobei beispielsweise durch ein Ausführen von Programmbefehlen der ersten Programmkomponente der Prozessor derart konfiguriert wird oder durch die Programmbefehle der Prozessor derart kon¬ figuriert ist, dass die erste Nachricht und die erste digitale Signatur empfangen werden. The first communication module 410 is configured to receive a first message having a first digital signature from a communication partner (eg, a first communication partner or a second communication partner). The first communication module 410 may, for example, by the processor, the memory unit and a first Pro ¬ gram of solid component implemented or realized, being configured for example by an executing program instructions of the first program component of the processor in such a manner or is such kon ¬ figured by the program commands of the processor, that the first message and the first digital signature are received.
Das erste Prüfmodul 420 ist zum Prüfen der ersten digitalen Signatur eingerichtet, wobei zum Prüfen der ersten digitalen Signatur eine erste Prüfsumme berechnet wird. The first test module 420 is set up to test the first digital signature, a first checksum being calculated for checking the first digital signature.
Das erste Prüfmodul 420 kann beispielsweise mittels des Pro- zessors, der Speichereinheit und einer zweiten Programmkomponente implementiert oder realisiert werden, wobei beispielsweise durch ein Ausführen von Programmbefehlen der zweiten Programmkomponente der Prozessor derart konfiguriert wird oder durch die Programmbefehle der Prozessor derart konfigu- riert ist, dass die erste digitale Signatur geprüft wird. The first test module 420 can be implemented or implemented, for example, by means of the processor, the memory unit and a second program component, wherein, for example, by executing program instructions of the second program component, the processor is configured in such a way or the processor commands are configured by the program instructions, that the first digital signature is checked.
Das erste Bereitstellungsmodul 430 ist zum Bereitstellen ei¬ ner zweiten Prüfsumme für eine zweite Nachricht eingerichtet, wobei The first provision module 430 is adapted for providing egg ¬ ner second checksum for a second message, wherein
- die zweite Nachricht in zweite Nachrichtenteile aufgeteilt wird, the second message is divided into second message parts,
eine zweite Unterprüfsumme über die zweiten Nachrichten¬ teile bis auf einen letzten Nachrichtenteil der zweiten Nachrichtenteile gebildet wird, a second Unterprüfsumme about the second message ¬ parts except for a last message segment of the second message portions is formed,
- die zweite Prüfsumme anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils gebildet wird. - The second checksum based on the second Unterprüfsumme and taking into account the last message part is formed.
Das zweite Berechnungsmodul 430 kann beispielsweise mittels des Prozessors, der Speichereinheit und einer dritten Pro¬ grammkomponente implementiert oder realisiert werden, wobei beispielsweise durch ein Ausführen von Programmbefehlen der dritten Programmkomponente der Prozessor derart konfiguriert wird oder durch die Programmbefehle der Prozessor derart kon¬ figuriert ist, dass die zweite Prüfsumme bereitgestellt wird. The second calculation module 430 may, for example, implemented by the processor, the memory unit and a third Pro ¬ gram of solid component or can be realized, wherein for example, configured by executing program instructions of the third program component of the processor in such a way is or is such kon ¬ figured by the program instructions, the processor that the second checksum is provided.
Das erste Berechnungsmodul 440 ist zum Bilden einer zweiten digitalen Signatur für die zweite Nachricht anhand der zweiten Prüfsumme eingerichtet. The first calculation module 440 is configured to form a second digital signature for the second message based on the second checksum.
Das erste Berechnungsmodul 440 kann beispielsweise mittels des Prozessors, der Speichereinheit und einer vierten Pro- grammkomponente implementiert oder realisiert werden, wobei beispielsweise durch ein Ausführen von Programmbefehlen der vierten Programmkomponente der Prozessor derart konfiguriert wird oder durch die Programmbefehle der Prozessor derart konfiguriert ist, dass die zweite digitale Signatur berechnet wird. The first calculation module 440 can be implemented or implemented, for example, by means of the processor, the memory unit and a fourth program component, wherein, for example, by executing program instructions of the fourth program component, the processor is configured in such a way or by the program instructions the processor is configured such that the second digital signature is calculated.
Das zweite Berechnungsmodul 450 ist zum Berechnen einer zweiten Nonce anhand der zweiten Unterprüfsumme und unter Berück¬ sichtigung des letzten Nachrichtenteils eingerichtet, wobei - für diese Berechnung an den letzten Nachrichtenteil die erste Prüfsumme angefügt wird, The second calculation module 450 is adapted to calculate a second nonce from the second Unterprüfsumme and taking into account the ¬ last message part, wherein - for this calculation to the last message part, the first checksum is added,
das erste Kommunikationsmodul die zweite Nachricht über¬ mittelt. Dabei wird insbesondere die zweite Nachricht an den Kommunikationspartner übermittelt. the first communication module averages the second message via ¬. In particular, the second message is transmitted to the communication partner.
Das zweite Berechnungsmodul 450 kann beispielsweise mittels des Prozessors, der Speichereinheit und einer fünften Pro¬ grammkomponente implementiert oder realisiert werden, wobei beispielsweise durch ein Ausführen von Programmbefehlen der fünften Programmkomponente der Prozessor derart konfiguriert wird oder durch die Programmbefehle der Prozessor derart kon¬ figuriert ist, dass die zweite Nonce berechnet wird. The second calculation module 450 may, for example, by the processor, the memory unit and a fifth Pro ¬ gram of solid component implemented or realized, being configured for example by an executing program instructions of the fifth program component of the processor in such a manner or is such kon ¬ figured by the program commands of the processor, that the second nonce is calculated.
Bei weiteren Ausführungsformen der Vorrichtung umfasst die Vorrichtung zumindest ein weiteres Modul oder mehrere weitere Module zur Durchführung des erfindungsgemäßen Verfahrens (oder einer seiner Ausführungsformen/Varianten) . Beispielsweise können ein erster Kommunikationspartner und/oder ein zweiter Kommunikationspartner die Vorrichtung aufweisen. Der Kommunikationspartner der die erste Nachricht schickt kann dann vorzugsweise eine/die Vorrichtung umfassen, welche die Verfahrensschritte aa) bis ad) in Hardware realisiert . In further embodiments of the device, the device comprises at least one further module or several further modules for carrying out the method according to the invention (or one of its embodiments / variants). For example, a first communication partner and / or a second communication partner may have the device. The communication partner who sends the first message can then preferably comprise a device which realizes the method steps aa) to ad) in hardware.
Das Ausführen der Programmbefehle der jeweiligen Module kann hierbei beispielsweise mittels des Prozessors selbst und/oder mittels einer Initialisierungskomponente, beispielsweise ein Lader (engl, loader) oder einer Konfigurationskomponente, erfolgen . The execution of the program instructions of the respective modules may in this case be effected, for example, by means of the processor itself and / or by means of an initialization component, for example a loader or a configuration component.
Obwohl die Erfindung im Detail durch die Ausführungsbeispiele näher illustriert und beschrieben wurde, ist die Erfindung nicht durch die offenbarten Beispiele eingeschränkt, und andere Variationen können vom Fachmann hieraus abgeleitet werden, ohne den Schutzumfang der Erfindung zu verlassen. Although the invention has been further illustrated and described in detail by the embodiments, the invention is not limited by the disclosed examples, and other variations can be derived therefrom by those skilled in the art without departing from the scope of the invention.

Claims

Patentansprüche claims
1. Verfahren zum Austauschen von Nachrichten mit folgenden Verfahrensschritten : 1. Method for exchanging messages with the following method steps:
a) Empfangen einer ersten Nachricht mit einer ersten digitalen Signatur eines ersten Kommunikationspartners durch einen zweiten Kommunikationspartner; a) receiving a first message with a first digital signature of a first communication partner by a second communication partner;
b) Prüfen der ersten digitalen Signatur durch den zweiten Kommunikationspartner, wobei zum Prüfen der ersten digitalen Signatur eine erste Prüfsumme für die erste Nach¬ richt berechnet wird; b) testing the first digital signature by said second communication partner, wherein for checking the first digital signature calculates a first checksum for the first directing After ¬;
c) Bereitstellen einer zweiten Prüfsumme für eine zweite Nachricht durch den zweiten Kommunikationspartner, wobei die zweite Nachricht in zweite Nachrichtenteile aufge¬ teilt wird, c) providing a second checksum for a second message by the second communication partner, wherein the second message will be divided into ¬ second message parts,
eine zweite Unterprüfsumme über die zweiten Nachrichtenteile bis auf einen letzten Nachrichtenteil der zweiten Nachrichtenteile gebildet wird,  a second checksum is formed over the second message parts except for a last message part of the second message parts,
die zweite Prüfsumme anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils gebildet wird;  the second checksum is formed on the basis of the second checksum and taking into account the last message part;
d) Bilden einer zweiten digitalen Signatur für die zweite Nachricht anhand der zweiten Prüfsumme durch den zweiten Kommunikationspartner ; d) forming a second digital signature for the second message based on the second checksum by the second communication partner;
e) Berechnen einer zweiten Nonce anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils durch den zweiten Kommunikationspartner, wobei e) calculating a second nonce based on the second sub-checksum and taking into account the last message part by the second communication partner, wherein
für diese Berechnung an den letzten Nachrichtenteil die erste Prüfsumme angefügt wird;  for this calculation the first checksum is appended to the last message part;
f) Senden der zweiten Nachricht mit der zweiten digitalen Signatur an den ersten Kommunikationspartner durch den zweiten Kommunikationspartner; f) sending the second message with the second digital signature to the first communication partner by the second communication partner;
2. Verfahren nach Anspruch 1, wobei durch den ersten Kommunikationspartner vor dem Empfangen folgende Verfahrensschritte ausgeführt werden: aa) Berechnen der ersten Prüfsumme für die erste Nachricht, wobei 2. The method of claim 1, wherein the first method of communication is carried out by the first communication partner before receiving aa) calculating the first checksum for the first message, wherein
die erste Nachricht in erste Nachrichtenteile aufgeteilt wird,  the first message is divided into first message parts,
- eine erste Unterprüfsumme über die ersten Nachrichtenteile bis auf einen letzten Nachrichtenteil der ersten Nachrichtenteile gebildet wird, a first sub-checksum is formed over the first message parts except for a last message part of the first message parts,
die erste Prüfsumme anhand der ersten Unterprüfsumme und unter Berücksichtigung eines letzten Nachrichtenteils der ersten Nachrichtenteile gebildet wird;  the first checksum is formed on the basis of the first sub-checksum and taking into account a last message part of the first message parts;
ab) Bilden der ersten digitalen Signatur für die erste Nachricht anhand der ersten Prüfsumme; ab) forming the first digital signature for the first message based on the first checksum;
ac) Berechnen einer ersten Nonce anhand der ersten Unterprüfsumme und unter Berücksichtigung des letzten Nach- richtenteils, wobei ac) calculating a first nonce based on the first checksum and considering the last message part, where
für diese Berechnung an den letzten Nachrichtenteil der ersten Nachricht ein Initialisierungswert angefügt wird ad) Senden der ersten Nachricht mit der ersten digitalen Signatur an den zweiten Kommunikationspartner.  for this calculation, an initialization value is added to the last message part of the first message ad) sending the first message with the first digital signature to the second communication partner.
3. Verfahren nach Anspruch 1 oder 2, wobei 3. The method according to claim 1 or 2, wherein
für die Nachrichtenteile eine feste Nachrichtenteillänge vorgegeben wird und  for the message parts a fixed message length is specified and
sich für die letzten Nachrichtenteile jeweils eine Rest- nachrichtenteillänge ergibt, die kleiner oder gleich der For the last message parts, a residual message component length is obtained that is less than or equal to the
Nachrichtenteillänge ist. Message length is.
4. Verfahren nach Anspruch 3, wobei 4. The method of claim 3, wherein
die Nachrichtenteillänge ein ganzzahliges Vielfaches von 64 Bit ist,  the message length is an integer multiple of 64 bits,
die Nachrichtenteillänge insbesondere 256 Bit oder 512 Bit ist.  the message length is in particular 256 bits or 512 bits.
5. Verfahren nach einem der vorhergebenden Ansprüche, wobei mittels der Nachrichten Schlüsselmaterial für ein kryp- tographisches Verfahren zwischen den Kommunikationspartnern ausgetauscht oder etabliert wird. 5. The method according to one of the preceding claims, wherein by means of the messages key material for a cryptographic process is exchanged or established between the communication partners.
6. Verfahren nach einem der vorhergebenden Ansprüche, wobei die erste Prüfsumme und/oder die zweite Prüfsumme ein kryptographischer Hash ist. The method of any preceding claim, wherein the first checksum and / or the second checksum is a cryptographic hash.
7. Verfahren nach einem der vorhergebenden Ansprüche, wobei die erste Prüfsumme und/oder die zweite Prüfsumme mit¬ tels einer kryptographischen Hashfunktion berechnet werden . 7. The method according to any preceding imaging claims, wherein the first checksum and / or the second check sum are calculated with ¬ means of a cryptographic hash function.
Verfahren nach einem der vorhergebenden Ansprüche, wobei für weitere Nachrichten jeweils weitere digitale Signaturen und weitere Nonces durch den ersten Kommunikationspartner und/oder den zweiten Kommunikationspartner entsprechend der Verfahrensschritte a) -e) berechnet und die weiteren Nachrichten mit ihren jeweiligen weiteren digitalen Signaturen an den entsprechenden Kommunikationspartner gesendet werden, Method according to one of the preceding claims, wherein for further messages in each case further digital signatures and further nonces calculated by the first communication partner and / or the second communication partner according to the method steps a) -e) and the further messages with their respective further digital signatures to the corresponding Communication partners are sent,
insbesondere jeweils weiter Unterprüfsummen berechnet werden,  in particular, further sub-checksums are calculated in each case,
insbesondere bei der Berechnung der jeweiligen weiteren Nonce die Prüfsumme der vorherigen Nachricht berücksichtigt wird.  especially in the calculation of the respective other nonce the checksum of the previous message is taken into account.
9. Vorrichtung zum Austausch von Nachrichten umfassend: ein erstes Kommunikationsmodul zum Empfangen einer ersten Nachricht mit einer ersten digitalen Signatur; 9. An apparatus for exchanging messages comprising: a first communication module for receiving a first message having a first digital signature;
ein erstes Prüfmodul zum Prüfen der ersten digitalen Signatur, wobei zum Prüfen der ersten digitalen Signatur eine erste Prüfsumme berechnet wird;  a first test module for testing the first digital signature, wherein a first checksum is calculated for testing the first digital signature;
ein erstes Bereitstellungsmodul zum Bereitstellen einer zweiten Prüfsumme für eine zweite Nachricht, wobei die zweite Nachricht in zweite Nachrichtenteile aufgeteilt wird,  a first provisioning module for providing a second check sum for a second message, wherein the second message is divided into second message parts,
eine zweite Unterprüfsumme über die zweiten Nachrichtenteile bis auf einen letzten Nachrichtenteil der zweiten Nachrichtenteile gebildet wird, die zweite Prüfsumme anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils gebildet wird; a second checksum is formed over the second message parts except for a last message part of the second message parts, the second checksum is formed on the basis of the second checksum and taking into account the last message part;
ein erstes Berechnungsmodul zum Bilden einer zweiten digitalen Signatur für die zweite Nachricht anhand der zweiten Prüfsumme; a first calculation module for forming a second digital signature for the second message based on the second checksum;
ein zweites Berechnungsmodul zum Berechnen einer zweiten Nonce anhand der zweiten Unterprüfsumme und unter Berücksichtigung des letzten Nachrichtenteils, wobei für diese Berechnung an den letzten Nachrichtenteil die erste Prüfsumme angefügt wird, a second calculation module for calculating a second nonce on the basis of the second checksum and taking into account the last message part, the first checksum being added to the last message part for this calculation,
das erste Kommunikationsmodul die zweite Nachricht übermittelt . the first communication module transmits the second message.
Computerprogrammprodukt mit Programmbefehlen zur Durchführung der Verfahren nach einem der Ansprüche 1 - 8. Computer program product with program instructions for carrying out the method according to one of claims 1 - 8.
Computerprogrammprodukt mit Programmbefehlen für ein Erstellungsgerät, das mittels der Programmbefehle konfi guriert wird, die Vorrichtung nach Anspruch 9 zu erstel len . A computer program product comprising program instructions for a authoring device that is configured by means of the program instructions to generate the device of claim 9.
Bereitstellungsvorrichtung für das Computerprogrammpro dukt nach Anspruch 10 oder 11, wobei die Bereitstellungsvorrichtung das Computerprogrammprodukt speichert und/oder bereitstellt. The computer program product delivery device of claim 10 or 11, wherein the delivery device stores and / or provides the computer program product.
EP18727208.3A 2017-06-09 2018-05-17 Method and apparatus for exchanging messages Withdrawn EP3603013A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
EP17175275.1A EP3413530B1 (en) 2017-06-09 2017-06-09 Method and device for exchanging messages
PCT/EP2018/062916 WO2018224280A1 (en) 2017-06-09 2018-05-17 Method and apparatus for exchanging messages

Publications (1)

Publication Number Publication Date
EP3603013A1 true EP3603013A1 (en) 2020-02-05

Family

ID=59034592

Family Applications (2)

Application Number Title Priority Date Filing Date
EP17175275.1A Active EP3413530B1 (en) 2017-06-09 2017-06-09 Method and device for exchanging messages
EP18727208.3A Withdrawn EP3603013A1 (en) 2017-06-09 2018-05-17 Method and apparatus for exchanging messages

Family Applications Before (1)

Application Number Title Priority Date Filing Date
EP17175275.1A Active EP3413530B1 (en) 2017-06-09 2017-06-09 Method and device for exchanging messages

Country Status (3)

Country Link
US (1) US11424933B2 (en)
EP (2) EP3413530B1 (en)
WO (1) WO2018224280A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3502806A1 (en) 2017-12-22 2019-06-26 Siemens Aktiengesellschaft Method for protecting the production data for producing a product
EP3506143B1 (en) 2017-12-27 2024-02-14 Siemens Aktiengesellschaft Interface for a hardware security module
EP3561709B1 (en) 2018-04-25 2020-07-29 Siemens Aktiengesellschaft Data processing apparatus, system, and method for proving or checking the security of a data processing apparatus
DK3584654T3 (en) 2018-06-19 2020-08-10 Siemens Ag Hierarchically distributed ledger
EP3609240A1 (en) 2018-08-09 2020-02-12 Siemens Aktiengesellschaft Computer-implemented method and network access server for connecting a network component with a network, in particular a mobile radio network, with an extended network access characteristic

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0510201A (en) * 1991-07-04 1993-01-19 Fuji Heavy Ind Ltd Car controlling method
TW552501B (en) * 2002-03-22 2003-09-11 Taiwan Semiconductor Mfg Version recording and tracking method
US20050193201A1 (en) * 2004-02-26 2005-09-01 Mahfuzur Rahman Accessing and controlling an electronic device using session initiation protocol
US8104073B2 (en) * 2007-08-10 2012-01-24 Juniper Networks, Inc. Exchange of network access control information using tightly-constrained network access control protocols
DE102007038763A1 (en) 2007-08-16 2009-02-19 Siemens Ag Method and device for securing a program against a control flow manipulation and against a faulty program sequence
DE102007040343B4 (en) 2007-08-27 2010-12-30 Siemens Ag Apparatus and method for generating a random bit string
DE102008018678B4 (en) 2008-04-14 2011-02-03 Siemens Aktiengesellschaft Apparatus and method for generating a random bit string
US8788830B2 (en) * 2008-10-02 2014-07-22 Ricoh Co., Ltd. Method and apparatus for logging based identification
DE102008061483A1 (en) 2008-12-10 2010-06-24 Siemens Aktiengesellschaft Method and device for processing data
DE102011007572A1 (en) 2011-04-18 2012-10-18 Siemens Aktiengesellschaft Method for monitoring tamper protection and monitoring system for a field device with tamper protection
US9098318B2 (en) * 2011-11-11 2015-08-04 Vmware, Inc. Computational asset identification without predetermined identifiers
DE102011088502B3 (en) 2011-12-14 2013-05-08 Siemens Aktiengesellschaft Method and apparatus for securing block ciphers against template attacks
DE102012217743B4 (en) 2012-09-28 2018-10-31 Siemens Ag Checking an integrity of property data of a device by a tester
DE102013200017A1 (en) 2013-01-02 2014-07-03 Siemens Aktiengesellschaft RFID tag and method for operating an RFID tag
JP2015082804A (en) * 2013-10-24 2015-04-27 日本電気株式会社 Digital signature system, communication device, digital signature method, and program
DE102014106727A1 (en) * 2014-05-13 2015-11-19 Endress + Hauser Conducta Gesellschaft für Mess- und Regeltechnik mbH + Co. KG Method for sending / receiving a message by means of an encrypted wireless connection
US10250698B2 (en) * 2014-08-25 2019-04-02 Futurewei Technologies, Inc. System and method for securing pre-association service discovery
US9973341B2 (en) * 2015-01-23 2018-05-15 Daniel Robert Ferrin Method and apparatus for the limitation of the mining of blocks on a block chain
DE102015211668B4 (en) * 2015-06-24 2019-03-28 Volkswagen Ag Method and device for increasing the safety of a remote release, motor vehicle
US10412068B2 (en) * 2015-12-07 2019-09-10 Salesforce.Com, Inc. API authentication
EP4350560A2 (en) * 2017-06-07 2024-04-10 nChain Licensing AG Computer-implemented system and method for managing transactions over a blockchain network

Also Published As

Publication number Publication date
US11424933B2 (en) 2022-08-23
US20200169413A1 (en) 2020-05-28
EP3413530B1 (en) 2019-07-31
EP3413530A1 (en) 2018-12-12
WO2018224280A1 (en) 2018-12-13

Similar Documents

Publication Publication Date Title
EP3603013A1 (en) Method and apparatus for exchanging messages
EP3669498B1 (en) Method and control system for controlling and/or supervising of devices
EP3388994A1 (en) Method and apparatus for computer-assisted testing of a blockchain
EP3382616A1 (en) Method and device for computer-assisted provision of a secure digital twin
EP3125492A1 (en) Method and system for generating a secure communication channel for terminals
EP3669285B1 (en) Method and system for controlling and/or monitoring of devices
EP3763089B1 (en) Method and control system for controlling and/or supervising of devices
EP3462313A1 (en) Method and distributed database system for the computer-aided execution of a program code
EP3422657A1 (en) Method and security control devices for sending and receiving cryptographically protected network packets
EP3506144A1 (en) Method and system for checking an integrity of a communication
DE102020200726A1 (en) Method for exchanging cryptographic keys for quantum-secure communication between a server and a client
EP3910875A1 (en) Concept for exchanging cryptographic key information
EP3723007B1 (en) Method and control system for controlling an execution of transactions
EP3439229A1 (en) Method and devices for achieving a safety function, particularly in the vicinity of a device control and/or system control
EP3714575B1 (en) Method and control system for controlling and/or supervising of devices
EP3252990A1 (en) Method and device for providing a secret for authenticating a system and/or components of the system
EP2499594A1 (en) Method and system for confidentially providing software components
EP3618348B1 (en) Distributed database system, industry automation system and method for operating a distributed database system
AT519476A4 (en) Method for creating and distributing cryptographic keys
EP3945702A1 (en) Channel-based communication in an iot network
EP3917103A1 (en) Method, system, transmitter and receiver for authenticating a transmitter
EP3748927A1 (en) Method and system for monitoring messages of a communication device
EP3903440B1 (en) Method of operating keystream generators in counter mode for secure data transmission, keystream generator with counter mode for secure data transmission and computer program product for keystream generation
WO2010149191A1 (en) Data transmission between automation devices protected against manipulation
EP3669508B1 (en) Protected message transmission

Legal Events

Date Code Title Description
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: UNKNOWN

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20191024

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

AX Request for extension of the european patent

Extension state: BA ME

GRAP Despatch of communication of intention to grant a patent

Free format text: ORIGINAL CODE: EPIDOSNIGR1

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: GRANT OF PATENT IS INTENDED

INTG Intention to grant announced

Effective date: 20200805

DAV Request for validation of the european patent (deleted)
DAX Request for extension of the european patent (deleted)
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

18D Application deemed to be withdrawn

Effective date: 20201216