|
Stream entropy
Inventing is interesting
The Vernam cipher is a symmetric encryption system invented in 1917 by Gilbert Vernam.
A cipher is a type of one-time pad cryptosystem. It uses the Boolean XOR function.
The Vernam cipher is an example of a system with absolute cryptographic strength.
One of the disadvantages of using such a cipher is the need to have the same cipher pads at two points - transmitting and receiving.
Those. first you need to create and deliver a notebook with one-time encryption pages to both points, and only then you can exchange information.
In modern commercial conditions, this is not very convenient.
If quantum technologies had reached a sufficient level of development and terabytes of quantum entangled particles could be stored in smartphones, the problem of updating encryption pages would become insignificant.
However, this is still a long way off.
However, one can try to develop a system for synchronous generation of random numbers at two points (at any number of points) without directly exchanging synchronization information.
The principle of operation is as follows: the application listens to a digital stream (or several streams) of Internet radio and waits for a predefined digital sequence (a set of bytes) to appear. After that, N bytes are written to be used as a cipherpad page. Here N is the number of bytes in the encrypted message.
This is the simplest kind of technology - a demonstration of the fundamental possibility and a stand for obtaining statistics.
The process of selecting bytes to write from a stream can be greatly complicated.
A separate task is to synchronize the receipt of a code page on the transmitting and receiving side without exchanging synchronization information.
Part 1 Selecting a fragment of a digital stream for recording.
Let's create an Android Studio Java project to get N bytes for a ciphertext page.
In this form, the application found two matches in 5 minutes.
A sequence of bytes was searched in the buffer
public static byte[] efind = {0,1,5,3,7,3,6,12,4,3,7}; // We are looking for an array of bytes in the buffer. If found - write to Log
This is the simplest test array of bytes to look up in the stream. A more interesting variant with "holes" - not significant byte positions in the array.
For example, you can hold down the following array in the search
public static byte[] efind = {0,1,x,5,3,7,x,3,6,x,12,4,x,3,7};
Where the "x" position can be anything and does not affect the search result.
After the given array of bytes is found in the stream (in this example, efind), N bytes of the stream are written to a separate array - the ciphertext page. Where N is equal to the number of bytes in the encrypted message.
Moreover, the bytes of the encryption page can also be read from the stream not in a row, but according to a predetermined algorithm (for example, skipping bytes).
In this way, one of the shortcomings of the classic Vernam cipher is immediately overcome - we can get the encryption key of the required length.
The ability to listen to the digital stream on the side of the sender and receiver allows you to overcome another drawback of the classic Vernam cipher. You can receive a cipherpad page independently on both the sender and recipient sides.
There is no need for a transmission channel for encryption notebooks.
But! In order to get the same sequence of numbers for encryption / decoding from the sender and recipient, two application instances must start listening to the digital Internet stream at the same time.
Otherwise, different points of coincidence with the given array can be found and, accordingly, different arrays are written for encryption.
How to synchronize the moment of obtaining keys from the Internet stream, if there is no (for stealth) synchronizing channel?
If you do not perform special manipulations with the Internet radio data stream (transmission of the synchronization code), then the problem can be solved in the following way.
An array of bytes with a larger length is set in the search in the digital radio stream. For example, for this case, you can choose this:
public static byte[] efindnn = {0,1,5,3,7,3,6,12,4,3,7,5,1,4};
Such a sequence will have to wait much longer. It may be several days or weeks. Immediately after such a sequence is found,
the stream is searched for a shorter sequence and the cipher page is written. With a very high probability, it will be the same on both sides - transmitting and receiving.
Internet radio stream vulnerability.
This is a commercially viable encryption mechanism.
Internet radio can be listened to by anyone, and, in theory, "interested" clients can be identified. To increase the secrecy of the exchange of information, you can
use a digital satellite TV channel.
For projects with more serious encryption reliability by the Vernam code, a satellite noise channel should be used - a digital noise stream based on a hardware source (for example, thermal noise of a diode, etc.).
In principle, it is possible to obtain absolute strength of encryption without the classic shortcomings of the Vernam code - the difficulties of obtaining and distributing by cipher pads.
At the same time, it is impossible to track who receives the code from the satellite stream. To exclude the use of noise satellite channel technology for obtaining encryption keys by outside clients, you can use encryption of the noise stream with a strong asymmetric algorithm.
If a special noise satellite channel is used, it is possible to synchronize the process of obtaining a cipher page in another way. In a noisy digital stream, certain combinations of numbers are excluded. The appearance of such combinations in a digital stream is an element of synchronization for all parties involved in the transmission and receipt of encrypted information.
Stream Encryption Project with Vernam Algorithm
The Vernam cipher is very fast and does not require a lot of hardware resources. It is possible to build a stream encryption system based on a special noise satellite channel.
On the Internet, technology can be used in other ways. A distributed network of servers-sources of noise digital streams for public commercial encryption can be created.
For more serious cryptography, you can create hidden noise streams that are encapsulated in public data.
Download GitHUB Project >>
JAVA Application Prototypes RadioRANDGen >>
Android Studio SOURCE CODE (03.06.2023)
MainActivity.java
activity_main.xml
AndroidManifest.xml
Next PAGE >> Thread splitting >>
Software pseudo-random number generator Czech Entropy PRNG for synchronously generating identical arrays of numbers on independent devices. For example, for use in data encryption (Czech XOR Calculator, etc.)
Czech Entropy PRNG >>
The Czech Entropy PRNG Block 4 (12.Feb.2024) version with a completely new algorithm for generating pseudo-random numbers of 1024 bits is available for download and installation. The application generates the same set of pseudo-random numbers if the same initial data (text) is entered and the same version of the program is used.
This makes it easy to use the strong Vernam cipher to protect data.
For encryption you need to use a separate application, for example, Czech XOR Calculator
Dovnload Czech Entropy APK >>
Android Studio Java NPRNG
A new stage in the development of Android Studio Java software random number generators - using a neural network - NPRNG
The use of a neural network allows achieving high nonlinearity of transformations of the input data (master key)
The application contains 2 files MainActivity and App.java. File MainActivity - initial data for the neural pseudorandom number generator. File App.java - Java class for calculating a pseudorandom number of any size. The example application easily generates a number of 280 digits (280x8 bits)
Online:
App.java - https://drive.google.com/file/d/1tCeqStW7ypx5B0wesBYwaVn2y1IQ07NK/view?usp=sharing
MainActivity.java - https://drive.google.com/file/d/1WDq33mgUecTM5V0GXcO5NSFoQqtXTuXo/view?usp=sharing
The application was debugged on a smartphone Samsung M23
All application results are displayed in the Log. No settings are made to the application screen.
A special Java class App.java allows you to create composite software random number generators of enormous complexity, either with a dynamic structure or with non-standard neurons.
In the following publications we will consider very interesting technical (software) solutions and ideas.
Small online PDF guide - NNPRNG.pdf
Discussion BOARD - Java NNPRNG
We will invent something else
For example. How to use noise channels to transmit information or "analog speech" in cryptography.
Vernam entropy
|
|