go-peer

module
v1.7.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: MIT

README

go-peer_logo.png

Anonymity and Security without compromise

Go Release License Build Coverage GoDoc Awesome

GoReportCard Activity Commits Code Lines CodeSize Downloads

VKontakte Telegram

About project

The go-peer library contains a large number of functions necessary to ensure the security of transmitted or stored information, as well as for the anonymity of nodes in the decentralized form. The library can be divided into several main pkg modules:

  1. The crypto module represents cryptographic primitives: 1) asymmetric encryption, decryption; 2) asymmetric signing and signature verification; 3) symmetric encryption and decryption; 4) hashing; 5) key building; 6) computational problems (puzzles); 7) cryptographically stable pseudorandom number generator.
  2. The client module for encrypting and decrypting information with the attached data integrity (hash) and authentication (signature). It is a basic part of the anonymity module.
  3. The network module is a decentralized communication between network nodes. Allows you to delimit networks and give information a random appearance using the network key.
  4. The anonymity module to ensure anonymity based on the fifth^ stage. Presents the main functions for working with the network on top of the anonymity/adapters and anonymity/queue modules.
  5. The anonymity/queue module represents the generation, storage and issuance of encrypted messages every time the period specified by the application is reached. Uses the client, message/layer1 and message/layer2 modules.

Examples of works in the directories pkg/client/examples, pkg/network/examples, pkg/anonymity/examples, pkg/anonymity/queue/examples;

Coverage map

coverage.svg

Installation

$ go get github.com/number571/go-peer

Requirements

  1. Go version >= 1.23

Releases

All cmd programs are compiled for {amd64, arm64} ARCH and {windows, linux, darwin} OS as pattern = appname_arch_os. In total, one application is compiled into six versions. The entire list of releases can be found here: github.com/number571/go-peer/releases.

Dependencies

  1. Go library go.etcd.io/bbolt (used by pkg/storage/database)
  2. Go library golang.org/x/crypto (used by pkg/crypto/keybuilder)
  3. Go library gopkg.in/yaml.v2 (used by pkg/encoding)
  4. Go library github.com/cloudflare/circl (used by pkg/crypto/asymmetric)

Makefile

There are a number of dependencies that represent separate applications for providing additional information about the quality of the code. These applications are not entered into the project, but are loaded via the make install-deps command. The list of applications is as follows:

  1. golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lintv1.60.0
  2. go-cover-treemap github.com/nikolaydubina/go-cover-treemap@v1.4.2

Theoretical works

  1. Theory of the structure of hidden systems
  2. Monolithic cryptographic protocol
  3. Abstract anonymous networks
  4. Decentralized key exchange protocol

Also, the composition of these works can be found in the book The general theory of anonymous communications (Ridero). This book can be purchased in a tangible form on the Ozon and Wildberries marketplaces. You can download the book in digital form for free here.

How can you help the project

  1. Find bugs, vulnerabilities, and errors in the code
  2. Suggest improvements, ask questions, create issues
  3. Append new theoretical works or update current
  4. Create new secure / anonymity applications
  5. Popularize technology and applications

Library based applications

  1. Anonymous network «Hidden Lake»
  2. Console messenger «secpy-chat» based on Hidden Lake services HLT, HLE
  3. Generator of asymmetric keys «tkeygen» in PrivKey{hex}, PubKey{hex} format
  4. Serverless and stateless password manager «tpmanager»

Star History

Star History Chart

License

Licensed under the MIT License. See LICENSE for the full license text.

⬆ back to top

Directories

Path Synopsis
cmd
pkg
anonymity
Package anonymity allows you to perform network operations on top of anonymizing traffic.
Package anonymity allows you to perform network operations on top of anonymizing traffic.
anonymity/logger
Package logger gives access to the parameters of anonymizing traffic for subsequent logging.
Package logger gives access to the parameters of anonymizing traffic for subsequent logging.
anonymity/queue
Package queue allows you to queue and retrieve network encrypted messages from the queue.
Package queue allows you to queue and retrieve network encrypted messages from the queue.
client
Package client makes it possible to encrypt and decrypt messages using a monolithic cryptographic protocol.
Package client makes it possible to encrypt and decrypt messages using a monolithic cryptographic protocol.
crypto/asymmetric
Package asymmetric is a wrapper on Go circl packages - mlkem768, mldsa65.
Package asymmetric is a wrapper on Go circl packages - mlkem768, mldsa65.
crypto/hashing
Package hashing is a wrapper on standard Go packages - crypto/sha256 and crypto/hmac.
Package hashing is a wrapper on standard Go packages - crypto/sha256 and crypto/hmac.
crypto/keybuilder
Package keybuilder is wrapper on golang.org/x/crypto/pbkdf2 package.
Package keybuilder is wrapper on golang.org/x/crypto/pbkdf2 package.
crypto/puzzle
Package puzzle uses a Proof-of-Work algorithm.
Package puzzle uses a Proof-of-Work algorithm.
crypto/random
Package random is a wrapper on standard Go package - crypto/rand.
Package random is a wrapper on standard Go package - crypto/rand.
crypto/symmetric
Package symmetric is a wrapper on standard Go package - crypto/aes.
Package symmetric is a wrapper on standard Go package - crypto/aes.
encoding
Package encoding provides functions for working with conversions of numbers, structures, strings and bytes.
Package encoding provides functions for working with conversions of numbers, structures, strings and bytes.
logger
Package logger allows you to use different levels of logging - errors, warnings, information.
Package logger allows you to use different levels of logging - errors, warnings, information.
message/layer1
Package message is used to create network messages for the purpose of confirming integrity and proof of work.
Package message is used to create network messages for the purpose of confirming integrity and proof of work.
message/layer2
Package message used as an encapsulated ciphertext.
Package message used as an encapsulated ciphertext.
network
Package network allows you to create a network node that performs the role of storing a list of connections.
Package network allows you to create a network node that performs the role of storing a list of connections.
network/conn
Package conn makes it possible to hide the structure of the true message by encrypting and adding random bytes.
Package conn makes it possible to hide the structure of the true message by encrypting and adding random bytes.
network/connkeeper
Package connkeeper allows you to periodically reconnect to the list of connections.
Package connkeeper allows you to periodically reconnect to the list of connections.
payload
Package payload is used to concatenate an integer header and a set of bytes.
Package payload is used to concatenate an integer header and a set of bytes.
state
Package state allows you to switch running state from true/false to false/true.
Package state allows you to switch running state from true/false to false/true.
storage/cache
Package cache allows you to store values in the inmemory storage.
Package cache allows you to store values in the inmemory storage.
storage/database
Package database allows you to store values in the file.
Package database allows you to store values in the file.
types
Package types provides common interfaces for other packages.
Package types provides common interfaces for other packages.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL