Giter VIP home page Giter VIP logo

number571 / go-peer Goto Github PK

View Code? Open in Web Editor NEW
193.0 8.0 14.0 159.19 MB

A software library for creating secure and anonymous decentralized systems. Confirmed by theoretical works — "Theory of the structure of hidden systems", "Monolithic cryptographic protocol", "Abstract anonymous networks", "Decentralized key exchange protocol".

License: MIT License

Go 88.94% Makefile 1.40% HTML 7.96% Dockerfile 0.46% Shell 0.58% Python 0.65%
network secure anonymity decentralized golang library peer-to-peer f2f friend-to-friend p2p

go-peer's Introduction

Welcome to my profile 👋

  • In my free time I study cryptography, computer science and philosophy;
  • I'm currently developing anonymous networks, blockchain systems and cryptographic applications;
  • I work as an information systems developer and a teacher of the subject "Cryptographic means of information protection";
💬 More about my projects 🌱 Maintained projects 💻 Programming languages 📫 How to reach me
...

Text


Research articles
Habr articles
Manuals, books

Applications


Hidden Lake
Programming language
Blockchain
[Deprecated]

Libraries


Golang
C and ASM
[Deprecated]

Templates


...

Libraries

Applictions

...

Main Languages

GoCAsm


Statistics

...

Contacts

go-peer's People

Contributors

number571 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-peer's Issues

Автоудаление

Считаю необходимым добавление функции автоудаления Онтона из группового чата, т.к. как говорил Владимир Ленин

Цепь прочна настолько, насколько прочно её самое слабое звено

README: Simple typo

  1. The network/anonymity module to ensure anonymity based on the fifth^ stage. Presents the main functions for working with the network on top of the network and queue modules.

expected

based on the fourth^ stage

?

`network/conn` may leak message size to an observer

WritePayload issues 4 separate Write calls to the underlying connection.

It may be the case, that OS sends each part of the request in a separate IP packet.

In such case, an observer can deduce size of the message and the void part.

An attacker can partially decrypt data

I am going to outline an attack to decrypt some blocks of data using network key. The attack is at network package and network/conn part in particular.

Decrypt message len

The idea is to connect to a node and send some ciphertext to it. The node expects the following:

len(P)||len(V)||P||V

It first read both len(P) and len(V), and then it expects L=len(P)+len(V) bytes.

If we send <L bytes the node is going to timeout and subsequently reset the connection. If send at least L bytes that are not valid ciphertext, we would immediately get a connection reset.

So the approach is simple:

  1. Select 4 blocks of data and save it to X. This will be our len(P)||len(V).
  2. Choose n as a guess for L.
  3. Send X and then n random bytes.
  4. If we get immediate conn reset, then n >= L.
  5. Otherwise n < L.
  6. Repeat, until found.

This setup only gets us L. But we still don't know neither of len(P), nor len(V). The following is going to overcome this problem.

Decrypting Len(V)

Suppose we somehow capture a single encrypted message. That is: len(P)||len(V)||P||V.

The idea is that if we perturb V, decryption will still pass, but if we change P, it will fail.

So we can randomly perturb blocks and check wether we get a connection reset.

This will give us both ciphertext and plaintext of a particular len(V).

Then we can attach this len(V) block to a given len(P) block and decrypt len(P) via algo from previous section.


TL;DR; use TLS, AEAD, AES-GCM and ephemeral keys for transport layer security

Consider using well-known pbkdf in `crypto/entropy`

From the source:

// Increase entropy by multiple hashing.
func (p *sEntropyBooster) BoostEntropy(pData []byte) []byte {

The comment is misleading. This function does not and cannot increase entropy.

IIUC, this function is a password-based key derivation. That is it derives key-material from a password and the salt.

It is important to only feed passwords as a key. Feeding a proper key material to this function might reduce security. So it might be beneficial to rename the parameter to password.

And last but not least, instead of using a variation PBKDF1, it might be better to use a modern algorithm, like argon, scrypt, or at least bcrypt. What is your position on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.