DE102022004784A1 - Method for encrypting and decrypting a data stream with a random block size in a communication system - Google Patents

Method for encrypting and decrypting a data stream with a random block size in a communication system Download PDF

Info

Publication number
DE102022004784A1
DE102022004784A1 DE102022004784.5A DE102022004784A DE102022004784A1 DE 102022004784 A1 DE102022004784 A1 DE 102022004784A1 DE 102022004784 A DE102022004784 A DE 102022004784A DE 102022004784 A1 DE102022004784 A1 DE 102022004784A1
Authority
DE
Germany
Prior art keywords
byte
length
random
data stream
block size
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.)
Pending
Application number
DE102022004784.5A
Other languages
German (de)
Inventor
wird später genannt Erfinder
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.)
Kcrypt Lab Ug Haftungsbeschraenkt
Original Assignee
Kcrypt Lab Ug Haftungsbeschraenkt
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 Kcrypt Lab Ug Haftungsbeschraenkt filed Critical Kcrypt Lab Ug Haftungsbeschraenkt
Publication of DE102022004784A1 publication Critical patent/DE102022004784A1/en
Pending legal-status Critical Current

Links

Images

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/3236Cryptographic 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 using cryptographic hash functions
    • H04L9/3239Cryptographic 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 using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • H04L9/0662Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator
    • H04L9/0668Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator producing a non-linear pseudorandom sequence
    • 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/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Nonlinear Science (AREA)
  • Storage Device Security (AREA)

Abstract

Die Erfindung betrifft ein Verfahren zum Ver- und Entschlüsseln eines Datenstroms mit zufälliger Blockgröße in einem Kommunikationssystem. Solche Verfahren zur Ver- und Entschlüsselung eines Datenstroms mit fester Blockgröße sind bekannt, z.B. Advanced Encryption Standard (AES), Salsa20 und das eng verwandte ChaCha (z.B.: https:/Ien.wikipedia.org/wiki/Salsa20). Ziel der Erfindung ist es, ein Verfahren zur Verfügung zu stellen, das zwei verschiedene Entropiequellen verwendet, nämlich die Gleichverteilung der verwendeten kryptographischen Hashfunktion und einen kryptographisch gesicherten Pseudozufallszahlengenerator, um eine probabilistische Verschlüsselung zu erreichen und sie so nah wie möglich an das Rauschen heranzuführen. Zu diesem Zweck schlägt die Erfindung ein Verfahren zum Verschlüsseln und Entschlüsseln eines Datenstroms mit einer zufälligen Blockgröße in einem Kommunikationssystem vor, das die Verfahrensschritte der Ansprüche 1 und 2 umfasst.The invention relates to a method for encrypting and decrypting a data stream with a random block size in a communication system. Such methods for encrypting and decrypting a data stream with a fixed block size are known, e.g. Advanced Encryption Standard (AES), Salsa20 and the closely related ChaCha (e.g.: https:/Ien.wikipedia.org/wiki/Salsa20). The aim of the invention is to provide a method that uses two different entropy sources, namely the uniform distribution of the cryptographic hash function used and a cryptographically secured pseudo-random number generator, in order to achieve probabilistic encryption and bring it as close to noise as possible. For this purpose, the invention proposes a method for encrypting and decrypting a data stream with a random block size in a communication system, which comprises the method steps of claims 1 and 2.

Description

Die Erfindung betrifft ein Verfahren zum Verschlüsseln und Entschlüsseln eines Datenstroms mit zufälliger Blockgröße in einem Kommunikationssystem.The invention relates to a method for encrypting and decrypting a data stream with a random block size in a communication system.

Solche Verfahren zur Ver- und Entschlüsselung eines Datenstroms mit fester Blockgröße sind gut bekannt, z. B. Advanced Encryption Standard (AES), Salsa20 und das eng verwandte ChaCha (z. B.: https://en.wikipedia.org/wiki/Salsa20).Such methods for encrypting and decrypting a data stream with a fixed block size are well known, e.g. B. Advanced Encryption Standard (AES), Salsa20 and the closely related ChaCha (e.g.: https://en.wikipedia.org/wiki/Salsa20).

Ziel der Erfindung ist es, ein Verfahren bereitzustellen, das zwei verschiedene Entropiequellen, nämlich die Gleichverteilung der verwendeten kryptographischen Hashfunktion und einen kryptographisch gesicherten Pseudozufallszahlengenerator, nutzt, um eine probabilistische Verschlüsselung zu erreichen und diese möglichst nah an einem ausschließlichen Rauschen zu gestalten.The aim of the invention is to provide a method that uses two different entropy sources, namely the uniform distribution of the cryptographic hash function used and a cryptographically secured pseudo-random number generator, in order to achieve probabilistic encryption and to make it as close as possible to exclusive noise.

Zu diesem Zweck schlägt die Erfindung ein Verfahren zum Ver- und Entschlüsseln eines Datenstroms mit zufälliger Blockgröße in einem Kommunikationssystem vor, das die Verfahrensschritte der Ansprüche 1 und/oder 2 umfasst.For this purpose, the invention proposes a method for encrypting and decrypting a data stream with a random block size in a communication system, which comprises the method steps of claims 1 and / or 2.

Unter der Annahme, dass es sich bei der verwendeten Hash-Funktion um eine kryptografische Hash-Funktion mit erweiterbarer Ausgabe (XOF) und/oder eine Schlüsselableitungsfunktion (Key-Deviration-Function (KDF)), z. B. BLAKE3 oder Keccak, da sie diese Bedingungen erfüllt, handelt, siiind ein kryptografisch gesicherter Pseudozufallszahlengenerator und ein Klartext M gegeben, welcher als ein Datenstrom von Bytes dargestellt wird.Assuming that the hash function used is an expandable output cryptographic hash function (XOF) and/or a key deviation function (KDF), e.g. B. BLAKE3 or Keccak, since it meets these conditions, is given a cryptographically secured pseudo-random number generator and a plaintext M, which is represented as a data stream of bytes.

Es werden definiert {w0, ..., wi), um den Klartext M in i + 1 Wörter zu zerlegen, wobei die Länge jedes Wortes zufällig aus (0, m) ausgewählt wird und m der kleinere Wert aus der maximalen Länge eines Blocks und der verbleibenden Länge von M ist. Die Länge der Daten wird in mehreren Einzelbyte-Wörtem gespeichert, die separat verschlüsselt werden und vor dem Datenwort stehen. Dies ermöglicht die Verwendung einer Kodierung mit variabler Länge. Zum Beispiel kann das erfindungsgemäße Verfahren eine Little-Endian-Kodierung zur Basis 128 mit 16383 als maximale Blockgröße verwenden.{w 0 , ..., w i ) are defined to decompose the plaintext M into i + 1 words, where the length of each word is randomly selected from (0, m) and m is the smaller value from the maximum length of a block and the remaining length of M is. The length of the data is stored in several single-byte words, which are encrypted separately and appear before the data word. This allows the use of variable length encoding. For example, the method according to the invention may use a base 128 little endian encoding with 16383 as the maximum block size.

Jedes Wort wi wird verschlüsselt zu einem Chiffrierwort ci der Länge li als: c i = w i X O F l i ( K D F ( r ) , w 0 , c 0 , , w i 1 , c i 1 )

Figure DE102022004784A1_0001
wobei r ein zufälliger Anfangsschlüssel ist und XOFli einen Hash der Länge li erstellt. Jedes verschlüsselte Wort ci wird zum Klartext-Wort wi entschlüsselt mit: w i = c i X O F l i ( K D F ( r ) , w 0 , c 0 , , w i 1 , c i 1 )
Figure DE102022004784A1_0002
Each word w i is encrypted into a cipher word c i of length l i as: c i = w i X O F l i ( K D F ( r ) , w 0 , c 0 , , w i 1 , c i 1 )
Figure DE102022004784A1_0001
where r is a random initial key and XOF is l i creates a hash of length l i . Each encrypted word c i is decrypted to the plaintext word w i with: w i = c i X O F l i ( K D F ( r ) , w 0 , c 0 , , w i 1 , c i 1 )
Figure DE102022004784A1_0002

Dies ermöglicht die Umwandlung eines Bytestroms in einen verschlüsselten Datenstrom mit dem Schlüssel r umzuwandeln, wobei die Position und die Länge jedes Blocks unbekannt sind. Die gleichmäßige Verteilung der Hash-Werte innerhalb des resultierenden Datenstroms vereitelt jeden möglichen Angriff.This allows the conversion of a byte stream into an encrypted data stream with the key r, where the position and length of each block are unknown. The even distribution of hash values within the resulting data stream thwarts any possible attack.

Das erfindungsgemäße Verfahren wird anhand der Figuren näher erläutert. Sie zeigen:

  • 1: schematische Darstellung der Verschlüsselung einer erfindungsgemäßen Stromchiffre;
  • 2: schematische Darstellung der Entschlüsselung einer erfindungsgemäßen Stromchiffre.
The method according to the invention is explained in more detail with reference to the figures. They show:
  • 1 : schematic representation of the encryption of a stream cipher according to the invention;
  • 2 : Schematic representation of the decryption of a stream cipher according to the invention.

In 1 verschlüsselt der Verschlüsseler einen Datenstrom. Dazu wählt der Verschlüsseler einen Zufallsschlüssel r aus und sendet ihn über einen gesicherten Kanal an den Entschlüsseler oder der Verschlüsseler und der Entschlüsseler verwenden einen Schlüsselaustauschalgorithmus, um diesen Schlüssel r zu erhalten. Der Schlüssel r wird als Anfangsvektor IV einer Hash-Funktion oder über eine Schlüsselableitungsfunktion (KDF) verwendet.In 1 the encryptor encrypts a data stream. To do this, the encryptor selects a random key r and sends it to the decryptor over a secure channel, or the encryptor and the decryptor use a key exchange algorithm to obtain this key r. The key r is used as the initial vector IV of a hash function or via a key derivative function (KDF).

Der Verschlüsseler wählt eine zufällige Blocklänge I. Es wird also eine Zufallszahl zwischen 0 und der Größe der verfügbaren Daten oder der Blockgrößengrenze gewählt. Die zufällige Blocklänge I wird durch eine beliebige Kodierungsmethode, einschließlich variabler Länge oder fester Kodierung, in eine Reihe von Bytes w1 umgewandelt. Der Verschlüsseler erstellt einen Hash-Wert h1 mit der Länge von 1 Byte. Dann wird jedes Byte w1[i] des Arrays von Bytes w1 zu c1[i] verschlüsselt mit c1[i] = w1[i] ⊕ h1 und die Hash-Funktion wird mit zwei Single-Byte-Werten w1 [i] und c1[i] aktualisiert. Dies wird sukzessive wiederholt, bis alle Bytes des Arrays w1 verschlüsselt sind. Danach sendet der Verschlüsseler c1 an den Entschlüsseler.The encryptor chooses a random block length I. A random number between 0 and the size of the available data or the block size limit is chosen. The random block length I is converted into a series of bytes w1 through any encoding method, including variable length or fixed encoding. The encryptor creates a hash value h1 with a length of 1 byte. Then each byte w 1 [i] of the array of bytes w 1 to c 1 [i] is encrypted with c 1 [i] = w 1 [i] ⊕ h 1 and the hash function is used with two single-byte values w 1 [i] and c 1 [i] updated. This is repeated successively until all bytes of array w 1 are encrypted. The encryptor then sends c 1 to the decryptor.

Dann wird ein Array w2 der Länge l mit l Bytes von Benutzerdaten gelesen und ein Hash-Wert h2 erzeugt, um die Benutzerdaten zu c2 mit zu c2[i] = w2[i] ⊕ h2 [i] für alle i E [0, 1) zu verschlüsseln. Die Hash-Funktion wird mit zwei l-Byte-Werten w2 und c2 aktualisiert. Schließlich sendet der Verschlüssler c2 an den Entschlüssler.Then an array w 2 of length l containing l bytes of user data is read and a hash value h 2 is generated to represent the user data c 2 with c 2 [i] = w 2 [i] ⊕ h 2 [i] for to encrypt all i E [0, 1). The hash function is updated with two l-byte values w 2 and c 2 . Finally, the encryptor sends c 2 to the decryptor.

Die in der Loop-Box in 1 dargestellten Schritte werden so lange wiederholt, bis alle Daten verschlüsselt sind.The ones in the loop box in 1 The steps shown are repeated until all data is encrypted.

2 zeigt, wie der Entschlüsseler einen Datenstrom entschlüsselt. Der Entschlüsseler erhält den großen Zufallsschlüssel r, der vom Verschlüsseler über den gesicherten Kanal gesendet wurde. Dann initialisiert der Entschlüssler eine Hash-Funktion mit dem großen Zufallsschlüssel r. Danach erhält der Entschlüssler c1 vom Verschlüssler. 2 shows how the decryptor decrypts a data stream. The decryptor receives the large random key r, which is obtained from the encryption ler was sent over the secure channel. Then the decryptor initializes a hash function with the large random key r. After that, the decryptor receives c 1 from the encryptor.

Das i-te Byte c1[i] wird gelesen, ein Hashwert h1 mit der Länge 1 Byte wird erzeugt, das eingelesene Byte w1[i] wird mit w1[i] = c1[i] ⊕ h1 entschlüsselt und die Hash-Funktion wird mit zwei Single-Byte-Werten w1[i] und c1[i] aktualisiert. Anschließend wird w1 in die Länge l umgewandelt.The i-th byte c 1 [i] is read, a hash value h 1 with a length of 1 byte is generated, the read byte w 1 [i] is decrypted with w 1 [i] = c 1 [i] ⊕ h 1 and the hash function is updated with two single-byte values w 1 [i] and c 1 [i]. Then w 1 is converted into the length l.

Danach erhält der Entschlüsseler c2 der Länge l vom Verschlüsseler und erstellt einen Hashwert h2 der Länge l um die Benutzerdaten zu w2 mit w2 [i] = c1[i] ⊕ h2 [i] für alle i E (0, l) zu entschlüsseln. Die Hash-Funktion wird mit zwei l-Byte-Werten w2 und c2 aktualisiert.After that, the decryptor obtains c2 of length l from the encryptor and creates a hash value h2 of length l around the user data w 2 with w 2 [i] = c 1 [i] ⊕ h 2 [i] for all i E (0, l ) to decipher. The hash function is updated with two l-byte values w 2 and c 2 .

Die in der Loop-Box von 2 dargestellten Schritte werden wiederholt, bis alle Daten entschlüsselt sind.The ones in the loop box from 2 The steps shown are repeated until all data is decrypted.

Der Verschlüsseler sendet sowohl c1 als auch c2 als Datenstrom an den Entschlüsseler, und es ist unmöglich, sie zu trennen, ohne sie zu entschlüsseln.The encryptor sends both c 1 and c 2 as a data stream to the decryptor, and it is impossible to separate them without decrypting them.

In Bezug auf die Geschwindigkeit liegt das erfindungsgemäße Verfahren zur Ver- und Entschlüsselung einer Stromchiffre nahe an AES- oder ChaCha20-Chiffren, wobei die Geschwindigkeit von der verwendeten Hash-Funktion abhängt.In terms of speed, the method according to the invention for encrypting and decrypting a stream cipher is close to AES or ChaCha20 ciphers, with the speed depending on the hash function used.

Der Hauptvorteil dieser Stromchiffre besteht darin, dass zwei verschiedene Entropiequellen verwendet werden: die gleichmäßige Verteilung der verwendeten kryptografischen Hash-Funktion und ein kryptografisch gesicherter Pseudozufallszahlengenerator, um die Entropie so nah wie möglich an das Rauschen heranzuführen.The main advantage of this stream cipher is that it uses two different sources of entropy: the uniform distribution of the cryptographic hash function used and a cryptographically secured pseudo-random number generator to bring the entropy as close to noise as possible.

Der Vorteil ist, dass man ein zufälliges Rauschen erhält. Wenn der richtige Ausgangsvektor bekannt ist, ist es jedoch möglich, ihn in den richtigen Bytestrom zu entschlüsseln.The advantage is that you get random noise. However, if the correct output vector is known, it is possible to decode it into the correct byte stream.

Um dies zu beweisen, wurden die in NIST SP 800-22 („Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications“ Spaecial Publication 800-22, Technology Administration U.S. Department of Commerce) definierten statistischen Tests verwendet.To prove this, the statistical tests defined in NIST SP 800-22 (“Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications” Spaecial Publication 800-22, Technology Administration U.S. Department of Commerce) were used.

Jeder Datenstrom, der mit dieser erfindungsgemäßen Stromchiffre erzeugt wurde, hat alle Tests der NIST SP 800-22 bestanden.Every data stream that was generated with this stream cipher according to the invention has passed all tests of NIST SP 800-22.

Außerdem wird im Folgenden ein Beispiel für die Messung der Qualität der Entropie gezeigt, „ent“ ist ein spezielles Dienstprogramm zur Messung der Qualität der Entropie in einer Datei, das von John Walker entwickelt wurde (z. B.: http://www.fourmilab.ch/random/):

  • > ent 1 mb.zeros.bin.kcrt
  • Entropy = 7.999825 bits per byte.
  • Optimum compression would reduce the size of this 1049135 byte file by 0 percent.
  • Chi square distribution for 1049135 samples is 254.44, and randomly would exceed this value 49.81 percent of the times.
  • Arithmetic mean value of data bytes is 127.5804 (127.5 = random).
  • Monte Carlo value for Pi is 3.136816219 (error 0. 15 percent).
  • Serial correlation coefficient is -0.001527 (totally uncorrelated = 0.0).
  • > ent 1 mb. zeros. bin. 2. kcrt
  • Entropy = 7.999823 bits per byte.
  • Optimum compression would reduce the size of this 1049281 byte file by 0 percent.
  • Chi square distribution for 1049281 samples is 257.96, and randomly would exceed this value 43.64 percent of the times.
  • Arithmetic mean value of data bytes is 127.4936 (127.5 = random).
  • Monte Carlo value for Pi is 3.139318390 (error 0.07 percent).
  • Serial correlation coefficient is -0.000392 (totally uncorrelated = 0.0).
  • > ent 1gb.bin.kcrt
  • Entropy = 8.000000 bits per byte.
  • Optimum compression would reduce the size of this 1074047712 byte file by 0 percent.
  • Chi square distribution for 1074047566 samples is 220.91, and randomly would exceed this value 93.98 percent of the times.
  • Arithmetic mean value of data bytes is 127.4975 (127.5 = random).
  • Monte Carlo value for Pi is 3.141752890 (error 0.01 percent).
  • Serial correlation coefficient is -0.000005 (totally uncorrelated = 0.0).
  • >
Also, an example of measuring the quality of entropy is shown below, "ent" is a special utility for measuring the quality of entropy in a file, developed by John Walker (e.g.: http://www. fourmilab.ch/random/):
  • > ent 1 mb.zeros.bin.kcrt
  • Entropy = 7.999825 bits per byte.
  • Optimum compression would reduce the size of this 1049135 byte file by 0 percent.
  • Chi square distribution for 1049135 samples is 254.44, and randomly would exceed this value 49.81 percent of the times.
  • Arithmetic mean value of data bytes is 127.5804 (127.5 = random).
  • Monte Carlo value for Pi is 3.136816219 (error 0. 15 percent).
  • Serial correlation coefficient is -0.001527 (totally uncorrelated = 0.0).
  • > ent 1 mb. zeros. am. 2. kcrt
  • Entropy = 7.999823 bits per byte.
  • Optimum compression would reduce the size of this 1049281 byte file by 0 percent.
  • Chi square distribution for 1049281 samples is 257.96, and randomly would exceed this value 43.64 percent of the times.
  • Arithmetic mean value of data bytes is 127.4936 (127.5 = random).
  • Monte Carlo value for Pi is 3.139318390 (error 0.07 percent).
  • Serial correlation coefficient is -0.000392 (totally uncorrelated = 0.0).
  • > ent 1gb.bin.kcrt
  • Entropy = 8,000,000 bits per byte.
  • Optimum compression would reduce the size of this 1074047712 byte file by 0 percent.
  • Chi square distribution for 1074047566 samples is 220.91, and randomly would exceed this value 93.98 percent of the times.
  • Arithmetic mean value of data bytes is 127.4975 (127.5 = random).
  • Monte Carlo value for Pi is 3.141752890 (error 0.01 percent).
  • Serial correlation coefficient is -0.000005 (totally uncorrelated = 0.0).
  • >

In diesem Beispiel werden mit einer Stromchiffre gemäß der Erfindung zwei Dateien verschlüsselt: eine enthält 1 Megabyte Nullen und die zweite 1 Megabyte Zufallsbytes. Ein Megabyte mit Nullen wird zweimal verschlüsselt. Alle Verschlüsselungen wurden mit demselben Anfangsvektor durchgeführt. Wie man daraus ersehen kann, handelt es sich fast ausschließlich um Rauschen und alle resultierenden Dateien sind unterscheidbar, wenn die gleiche Eingabe mit dem gleichen Anfangsvektor verwendet wird, was diese Verschlüsselung probabilistisch macht.In this example, two files are encrypted using a stream cipher according to the invention: one contains 1 megabyte of zeros and the second contains 1 megabyte of random bytes. A megabyte with zeros will be encrypted twice. All encryptions were performed with the same initial vector. As you can see, it is almost entirely noise and all resulting files are distinguishable when using the same input with the same initial vector, making this encryption probabilistic.

Claims (2)

Verfahren zum Verschlüsseln eines Datenstroms mit einer zufälligen Blockgröße in einem Kommunikationssystem, das die folgenden Schritte umfasst: (a) Ein Zufallsschlüssel r wird von einem Benutzer ausgewählt, der als Anfangsvektor IV einer Hash-Funktion und/oder über eine Schlüsselableitungsfunktion verwendet wird. (b) Um die Größe des Blocks l zu ermitteln, wird eine Zufallszahl zwischen 0 und der Größe der verfügbaren Daten oder dem Grenzwert für die Blockgröße l gewählt. (c) Die Größe des Blocks l wird durch eine beliebige Kodierungsmethode in ein Array von Bytes w1 umgewandelt, einschließlich variabler Länge oder fester Kodierung. (d) Für das ite Byte wl[i] wird ein Hash-Wert h1 der Länge 1 Byte erzeugt, das Byte w1[i] wird zu c1 [i] mit c1 (i) = w1 [i] ⊕ h1 verschlüsselt, und die Hash-Funktion wird mit zwei Single-Byte-Werten w1 [i] und c1 [i] aktualisiert. (e) Schritt (d) wird für alle Bytes in wiederholt. (f) Ein Array w2 der Länge l mit l Bytes an zu verschlüsselnden Benutzerdaten wird erstellt. (g) Ein Hash-Wert h2 der Länge l wird erstellt, um die Benutzerdaten zu verschlüsseln c2 mit c2[i] = w2[i] ⊕ h2[i] für alle i ∈ [0, 1) zu verschlüsseln, und die Hash-Funktion wird mit zwei l-Byte-Werte w2 und c2 aktualisiert. (h) c1 und c2 werden gespeichert oder über ein Netzwerk gesendet. (i) Wenn die Eingabe mehr Daten enthält, werden die Schritte ab Schritt (b) wiederholt.A method of encrypting a data stream with a random block size in a communication system, comprising the following steps: (a) A random key r is selected by a user, which is used as the initial vector IV of a hash function and/or via a key derivation function. (b) To determine the size of the block l, a random number between 0 and the size of the available data or the block size limit l is chosen. (c) The size of the block l is converted into an array of bytes w 1 by any encoding method, including variable length or fixed encoding. (d) For the ite byte wl[i], a hash value h 1 of length 1 byte is generated, the byte w 1 [i] becomes c 1 [i] with c 1 (i) = w 1 [i] ⊕ h 1 is encrypted, and the hash function is updated with two single-byte values w 1 [i] and c 1 [i]. (e) Step (d) is repeated for all bytes in . (f) An array w 2 of length l containing l bytes of user data to be encrypted is created. (g) A hash value h 2 of length l is created to encrypt the user data c 2 with c 2 [i] = w 2 [i] ⊕ h 2 [i] for all i ∈ [0, 1) too encrypt, and the hash function is updated with two l-byte values w 2 and c 2 . (h) c 1 and c 2 are stored or sent over a network. (i) If the input contains more data, the steps from step (b) are repeated. Verfahren zum Entschlüsseln eines mit einem Verfahren nach Anspruch 1 verschlüsselten Datenstroms mit zufälliger Blockgröße in einem Kommunikationssystem, das die folgenden Schritte umfasst: (a) Der Zufallsschlüssel r wird vom Nutzer bezogen und als Anfangsvektor IV einer Hash-Funktion und/oder über eine Schlüsselableitungsfunktion verwendet. (b) Das ite Byte c1[i] der Eingabe wird gelesen, ein Hashwert h1 mit der Länge 1 Byte wird erzeugt, das eingelesene Byte w1[i] mit w1[i] = c1 [i] ⊕ h1 wird entschlüsselt und die Hash-Funktion mit zwei Single-Byte-Werten w1 [i] und c1[i] aktualisiert. (c) Schritt (b) wird wiederholt, bis der gesamte Block l aus der Eingabe als w1 entschlüsselt wurde, wobei die Anzahl der Versuche von der verwendeten Verschlüsselungsmethode abhängt, die eine variable Länge oder eine feste Kodierung aufweisen kann. (d) Ein Array c2 der Länge l wird erstellt, um die nächsten l Bytes der zu entschlüsselnden Eingabe zu erhalten. (e) Ein Hash-Wert h2 der Länge l wird erstellt, um die Benutzerdaten zu w2 mit w2 [i] = c2 [i] ⊕ h2[i] für alle i ∈ [0, l) zu entschlüsseln, und die Hash-Funktion wird mit zwei l-Byte-Werten w2 und c2 aktualisiert. (f) w2 enthält den entschlüsselten Block und wird gespeichert oder über ein Netzwerk gesendet. (g) Wenn die Eingabe mehr verschlüsselte Daten enthält, werden die Schritte ab Schritt (b) wiederholt.Method for decrypting a with a method according to Claim 1 encrypted data stream with random block size in a communication system comprising the following steps: (a) The random key r is obtained from the user and used as the initial vector IV of a hash function and / or via a key derivation function. (b) The ite byte c 1 [i] of the input is read, a hash value h 1 with a length of 1 byte is generated, the read byte w 1 [i] with w 1 [i] = c 1 [i] ⊕ h 1 is decrypted and the hash function is updated with two single-byte values w 1 [i] and c 1 [i]. (c) Step (b) is repeated until the entire block l has been decrypted from the input as w 1 , the number of attempts depending on the encryption method used, which may be variable length or fixed encoding. (d) An array c 2 of length l is created to receive the next l bytes of the input to be decrypted. (e) A hash value h 2 of length l is created to decrypt the user data to w 2 with w 2 [i] = c 2 [i] ⊕ h 2 [i] for all i ∈ [0, l). , and the hash function is updated with two l-byte values w 2 and c 2 . (f) w 2 contains the decrypted block and is stored or sent over a network. (g) If the input contains more encrypted data, the steps from step (b) are repeated.
DE102022004784.5A 2022-05-07 2022-12-16 Method for encrypting and decrypting a data stream with a random block size in a communication system Pending DE102022004784A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE102022001606.0 2022-05-07
DE102022001606 2022-05-07

Publications (1)

Publication Number Publication Date
DE102022004784A1 true DE102022004784A1 (en) 2024-01-18

Family

ID=89387704

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102022004784.5A Pending DE102022004784A1 (en) 2022-05-07 2022-12-16 Method for encrypting and decrypting a data stream with a random block size in a communication system

Country Status (1)

Country Link
DE (1) DE102022004784A1 (en)

Similar Documents

Publication Publication Date Title
DE60024739T2 (en) Extended key generator, encryption / decryption device, extended key generation method, and storage medium
DE60026253T2 (en) Method and device for encrypting data content
DE69728465T2 (en) Non-parallel multi-cycle encryption device
DE69916160T2 (en) Cryptographic processing apparatus and method, and recording medium for recording a cryptographic processing program for performing fast cryptographic processing without sacrificing security
DE60313519T2 (en) A method for generating a key, content providing method, encrypted content deciphering method, illegal user recognition method, content providing system, user system, trace method, encryption device, decryption device, and computer program
DE69721439T2 (en) CRYPTOGRAPHIC METHOD AND DEVICE FOR THE NON-LINEAR ASSEMBLY OF A DATA BLOCK AND A KEY
DE69937007T2 (en) METHOD AND DEVICE FOR ENCRYPTION AND DECOMPOSITION OF DATA
DE60026296T2 (en) METHOD AND DEVICE FOR SECURING CRYPTOGRAPHIC COMMUNICATION
DE602004001273T2 (en) Method and device for identification-based encryption
DE60217260T2 (en) Data processing and encryption unit
DE112018000779T5 (en) Token deployment for data
DE112017006020T5 (en) Method and system for search-dummy dynamic symmetric searchable encryption
EP1298834B1 (en) Method and apparatus for encrypting and decrypting data
EP2605445A1 (en) Method and apparatus for securing block ciphers against template attacks
DE102005024725A1 (en) Electronic document cryptographying method, involves generating encryption keys by pseudo random number generator, and performing authentication, encryption, and signing on electronic document for each single transaction
DE60025401T2 (en) GENERATION OF A MATHEMATICALLY RESTRICTED KEY USING AN ONE-WAY FUNCTION
DE102016112552A1 (en) Data ciphering and decryption based on device and data authentication
DE102008013785A1 (en) Precalculated encryption key
EP3218893A1 (en) Hardened white box implementation
DE19924986A1 (en) Encryption conversion device for electronic toll collection
CN112183767A (en) Multi-key lower model aggregation federal learning method and related equipment
DE69911815T2 (en) SELF-CORRECTING RANDOM ENCRYPTION SYSTEM AND METHOD
DE69729297T2 (en) ENCRYPTION DEVICE FOR BINARY CODED MESSAGES
CN113076551B (en) Color image encryption method based on lifting scheme and cross-component scrambling
JP5689826B2 (en) Secret calculation system, encryption apparatus, secret calculation apparatus and method, program

Legal Events

Date Code Title Description
R123 Application deemed withdrawn due to non-payment of filing fee
R073 Re-establishment requested
R074 Re-establishment allowed
R163 Identified publications notified
R012 Request for examination validly filed