Zelenov Anton
Zelenov Anton
tixset
Увлекаюсь разработкой разного рода интерфейсов управления и скриптов под linux /
I am fond of developing all kinds of control interfaces and scripts for linux
Russia, Serpukhov
tixset@gmail.com
Repositories 4

Моя страничка на GitHub Pages

Приветствую Вас на моей страничке GitHub!
Welcome to my GitHub page!

Пример простой реализации технологии Блокчейн на нескольких ЯП

Блокчейн — непрерывная последовательная цепочка блоков (связный список), содержащих информацию. Связь между блоками обеспечивается не только нумерацией, но и тем, что каждый блок содержит свою собственную хэш-сумму и хэш-сумму предыдущего блока.

Таким образом если изменить данные какого-либо блока в цепочке то хэш-суммы последующих блоков перестанут быть валидными, что позволяет не допустить подмену данных в цепочке. Конечно же злоумышленник может перестроить все блоки в цепочке заново, для того чтобы этого не допустить, существуют децентрализованные базы данных в которых можно хранить копию нашей цепочки блоков и при необходимости сверять их.

Но в данном примере я рассмотрю только построение цепочки блоков и ее верификацию, а так же предусмотрю функцию сравнения двух цепочек.

Подробнее

An example of a simple implementation of Blockchain technology in several programming languages

Blockchain is a continuous sequential chain of blocks (a connected list) containing information. The connection between the blocks is provided not only by numbering, but also by the fact that each block contains its own hash sum and the hash sum of the previous block.

Thus, if you change the data of any block in the chain, the hash sums of subsequent blocks will cease to be valid, which prevents the substitution of data in the chain. Of course, an attacker can rebuild all the blocks in the chain anew, in order to prevent this, there are decentralized databases in which you can store a copy of our block chain and, if necessary, verify them.

But in this example, I will consider only the construction of a block chain and its verification, as well as provide a function for comparing two chains.

Details

Шифрованный Анонимный Веб-Чат

Для демонстрации работы шифрования Виженера и протокола обмена ключами Диффи-Хеллмана решил написать простенький веб-чатик с сервером на сокете.

Чат решено было сделать как можно более анонимным, для этого я отказался от бэкенда и решил в качестве сервера использовать сокет.

Демка чата тут: http://185.98.86.127/encryptionWebChat/

Чат не использует куки или сессии, при обновлении страницы или ее закрытии происходит логаут.

Сообщения в чате шифруются, с помощью шифрования Виженера, но системные команды, например команда перехода в комнату - не шифруются.

Сервер не участвует в процессе шифрования, алгоритм шифрования полностью реализован на стороне клиента (в браузере), сервер видит только зашифрованный текст, а протокол Диффи-Хеллмана не позволяет серверу его расшифровать.

Серверный скрипт не записывает ни куда ни какие данные, данные в нем находятся непосредственно в переменных, и при разрыве соединения уничтожаются.

При этом из данных на сервере хранятся только хэши коннектов и список комнат.

Имя пользователя для чата генерится рандомно, его можно сменить в дальнейшем на такое-же рандомное, для авторизации в чате достаточно только имени и названия комнаты.

Подробнее

Encrypted Anonymous Web-Chat

To demonstrate the work of the Vigenere Cipher and the Diffie-Hellman key exchange protocol, I decided to write a simple web chat with a server on a socket.

It was decided to make the chat as anonymous as possible, for this I abandoned the backend and decided to use a socket as a server.

The chat demo is here: http://185.98.86.127/encryptionWebChat/

The chat does not use cookies or sessions, when the page is refrashed or closed, a logout occurs.

Chat messages are encrypted using the Vision encryption, but system commands, such as the command to enter the room, are not encrypted.

The server does not participate in the encryption process, the encryption algorithm is fully implemented on the client side (in the browser), the server sees only the encrypted text, and the Diffie-Hellman protocol does not allow the server to decrypt it.

The server script does not write any data anywhere, the data in it is directly in variables, and when the connection is terminated, it is destroyed.

At the same time, only hashes of connections and a list of rooms are stored on the server from the data.

The username for the chat is generated randomly, it can be changed in the future to the same random one, only the name and the name of the room are enough for authorization in the chat.

Details

Пример работы протокола Диффи — Хеллмана на нескольких ЯП

Протокол Диффи-Хеллмана — это криптографический протокол, позволяющий двум и более сторонам получить общий секретный ключ, используя незащищенный от прослушивания канал связи. Полученный ключ используется для шифрования дальнейшего обмена с помощью алгоритмов симметричного шифрования.

Работу данного алгоритма продемонстрирую на примере сокетов.

Последовательность действий алгоритма довольно проста, поэтому не буду тут приводить пример на алгоритмическом языке, а просто опишу эту последовательность в виде списка.

Подробнее

An example of the Diffie - Hellman protocol working on several programming languages

The Diffie-Hellman Protocol is a cryptographic protocol that allows two or more parties to obtain a shared secret key using an unsecured communication channel. The received key is used to encrypt further exchange using symmetric encryption algorithms.

I will demonstrate the work of this algorithm using the example of sockets.

The sequence of actions of the algorithm is quite simple, so I will not give an example in algorithmic language here, but simply describe this sequence in the form of a list.

Details

Пример шифрования Виженера на нескольких ЯП

Шифрование по Виженеру представляет собой сложение блока открытого текста с ключом по модулю мощности алфавита.

Когда-то давно у меня возникла необходимость передавать зашифрованную строку текста между сервером и клиентом.

На просторах интернета я нашел простой пример шифрования Виженера написанный на Delphi неким программистом под ником "Danger".

В связи с тем что на клиенте и сервере в моем случае была разная среда и использовались разные ЯП, пришлось переписать эту функцию...

И вот уже сейчас я представляю Вам эту функцию переведенную на несколько ЯП.

Подробнее

Example of Vigenere cipher in several programming languages

Vigenere cipher is the addition of a block of plaintext with a key modulo the power of the alphabet.

Once upon a time, I had the need to transfer an encrypted string of text between the server and the client.

On the Internet, I found a simple example of a Vision encryption written in Delphi by a programmer with the nickname "Danger".

Due to the fact that the client and server in my case had a different environment and used different programming languages, I had to rewrite this function...

And now I present to you this function translated into several programming languages.

Details