Introduction

Tenfingers is a decentralized sharing protocol that lets you share any file or data with anyone, or just a selected few!

Make a blog, a website or share your latest photos, it is all possible with Tenfingers. Share your link, and your friends will have access at all times about your latest whereabouts.

With oversharing, your data can be accessed at all times, even when your computer is turned off!

All it costs is some storage and some bandwidth for sharing, the rest is totally free.

Basically:

You share data from others, because they share yours.

A simple and elegant incentive.

It is all encrypted so no one knows what they are sharing, and the only way to access your data is by the link file which is yours to distribute as you see fit.

Overshare, and many people will share your data, making it accessible at any time.

Use the Quick install Linux / Windows or go for the Manual install to see what you need to use Tenfingers, or continue browsing this page for more in depth technical information:

Technically:

You launch a listener that, with the help of a first link, connects to a loosely connected trust-less node swarm.

Basic handshake goes over RSA 4096 and then everything else is over AES 256-CTR.

The sharing is made reciprocally, with a default over sharing of 10 times (so ten nodes will hold and serve your data while you share data from those ten nodes).

Two extra tenfingers files are shared with the link (a translation file, and a substitution file) to prevent link decay. Share them alongside the link file if the longevity of the data shared is important.

It is:

  • FOSS (GPL-3.0-or-later, hit me up if you need another FOSS licence)

  • Decentralized (Once you get a single address to the node in the swarm, it is 100% decentralized).

  • Using Strong Encryption (RSA 4096, AES 256)

  • Takedown robust (if the data is shared from many countries it will make it hard to take down)

  • Possible to access your data even when your PC is turned off

  • Possible to modify your shared data or your computer address (IP:PORT) without the need to re-distribute the link.

  • Using a strong incentive to share.

  • Accessible to anyone who can spare some disk space and some bandwith.

  • Free from crypto or other payments.

The more you share, automatically, the more you are shared!

This is all inbuilt in the protocol, there is no central power controlling anything, and everything is free.

By the way, this is the official Tenfingers logo:

tenfingers logo

Next step

Now you can go on to the Quick install Linux / Windows to set it up,

or go to the Prerequisite page to see more in depth what you need to set up Tenfingers manually.

QuickInstall Linux

To set up and install Tenfingers on Linux, you only need to do these two steps:

1: forward port 46000 to your PC

2: Run this script:

# Copyright (C) 2024 Ludvig Larsson aka Valmond ludviglarsson@protonmail.com
# This code is licensed under the terms of the GNU Public License, version 3 or later (GPL-3.0-or-later)

# This script installs and sets up Tenfingers on Linux Mint.

# Check if pycryptodomex is installed
if [ "$(pip3 list | grep pycryptodomex)" ]; then
  echo "PyCryptodomeX is installed."
else
  echo "PyCryptodomeX is not installed, installing..."
  pip3 install pycryptodomex
  # To uninstall:
  # pip3 uninstall pycryptodomex
fi


# Check there is not a listener already running
if [ "$(ps aux | grep './[l]istener.py')" ]; then
  echo "A running listener is detected, we need to stop it..."
  kill $(ps aux | grep './[l]istener.py' | awk '{print $2}')
else
  echo "No running listener detected. Continuing with the install/upgrade."
fi


# Add the listener to crontab so that after each reboot, it starts
echo "Setup restart on reboot in crontab"
cmd="@reboot cd ~/Tenfingers/tenfingers && python3 ./listener.py&"
(crontab -l ; echo $cmd) | sort - | uniq - | crontab -
# To remove the command from the crontab:
# ( crontab -l | grep -v -F "$croncmd" ) | crontab -
# Or edit manually
# crontab -e


dir="$HOME/Tenfingers"
if [ -d "$dir" ]; then
  if [ -z "$( ls -A $dir )" ]; then
    echo "$dir exists but is empty, go ahead"
  else
    cd $dir
    git fetch > /dev/null
    if [ -z "$( git diff main origin/main )" ]; then
      echo "Actual Tenfingers version: $(<tenfingers/version )"
      echo "No changes detected, you are already running the latest branch."
    else
      echo "$dir is not empty. Updating ..."
      echo "A newer branch is detected, updating..."
      git reset --hard origin/main > git_reset.log
      echo "Actual Tenfingers version: $(<tenfingers/version )"
      echo "Tenfingers updated, you can now start the listener."
    fi
  fi
else
  echo "Setup..."
  # Make a folder for Tenfingers
  mkdir $dir
  cd $HOME
  # Get the git repositorys content
  git clone https://codeberg.org/Valmond/Tenfingers.git

  cd Tenfingers/tenfingers
  python3 ./setup.py
fi

# Make a convenient alias '10f'
if alias 10f >/dev/null 2>&1; then
  echo "No need to create the alias for 10f as it does already exist."
else
  echo "Create alias for 10f"
  echo "#Tenfingers" >> ~/.bashrc
  echo "alias 10f='python3 $HOME/Tenfingers/tenfingers/10f.py'" >> ~/.bashrc
  source ~/.bashrc
  # As the source ~/.bashrc doesn't always work in skripts, let's make the temporary alias too
  # This doesn't always work, if so restart the terminal
  alias 10f='python3 $HOME/Tenfingers/tenfingers/10f.py'
fi

echo "Start the listener"
# Start the listener in another terminal, so that it works if we launch the script with a mouse double click too
cd ~/Tenfingers/tenfingers && gnome-terminal -- python3 ./listener.py&

# Sleep some time while the terminal starts
sleep 1

Instead of copy pasting the script into a terminal, you can copy paste the script in a file:

install_upgrade_linux.sh

and give it execution rights

chmod +x ./install_upgrade_linux.sh

Use the script to set up Tenfingers and then subsequently to update it.

Bootstrap

Download a test link

And in a freshly opened terminal (alias might not work in the terminal if you just set it all up):

10f testlink

Should download a testlink.txt and give your listener its first address.

For more: see Usage

QuickInstall Windows

To set up and install Tenfingers on Linux, you only need to do these two steps:

1: forward port 46000 to your PC

Download, configure and run Tenfingers:

  1. Install python (https://www.python.org/downloads/windows/)

  2. Install CryptoDomeX:

pip3 install pycryptodomex

  1. Create a folder, for example a folder /Tenfingers/ on your desktop, so with USERNAME being your, you guessed it, user name, the folders full path is:

C:\Users\USERNAME\Desktop\Tenfingers\

In this folder, run:

git clone https://codeberg.org/Valmond/Tenfingers.git

or if you do not have git installed, go to https://codeberg.org/Valmond/Tenfingers and in the [...] menu, download a zipped version that you can unzip in your folder.

  1. Add "C:\Users\USERNAME\Desktop\Tenfingers\Tenfingers\tenfingers" to PATH (this is where the python files live)

In the start menu, search for "PATH" and select "Edit the system environment variables"

Click [Environment Variables...]

Add it to the PATH variable

Note: commandline windows needs to be restarted for the new PATH variable to be detected

  1. In a command line window, go to the folder you just added to PATH

cd "C:\Users\USERNAME\Desktop\Tenfingers\Tenfingers\tenfingers"

  1. In that folder, run the setup:

python setup.py

  1. In that folder, run:

python listener.py

to run the listener (you want to make this automatically at start up)

  1. in that folder, make a file "10f.bat" and paste this into it:

python "C:\Users\USERNAME\Desktop\Tenfingers\Tenfingers\tenfingers\10f.py" %*

You can now type:

10f.bat

to use the 10f command line any where

Bootstrap

Download a test link

And in a freshly opened terminal (the PATH will not be found in the terminal if you just set it all up):

10f.bat testlink

Should download a testlink.txt and give your listener its first address.

Note:

Examples might use 10f which is a Linux alias, you will need to une 10f.bat instead because you are on windows.

For more: see Usage

#Install Tenfingers

This is the older more thorough explication on how to install Tenfingers:

Go to: Prerequisite

Prerequisite

You need to either use Python, or the Frozen executables, and their prerequisites are as follows:

Python: Python3 and CryptodomeX

You need Python 3.6 or better plus the library pycryptodomex.

To install Python, see install recommendations for your specific OS.

If you don't know if python is installed or which version is installed, use:

python3 --version

When you have Python 3.6 or better installed, you need to install CryptodomeX.

Just run:

pip3 install pycryptodomex

Frozen executables: No specific prerequisites.

If you can't or don't want to use Python, then you can use the frozen executables instead.

This does not need python (or CryptoDome, it's baked in in the executables), you just run the executables as is.

The Linux executables has been built on a Linux Mint 21 setup, if you have trouble on another Linux OS, use the python version.

Just use the pre-frozen executables for your specific operative system.

Note: On Windows, newly frozen executables sometimes get flagged as dangerous files. Just don't use them.

Next step

Install Tenfingers

Installing/setup Tenfingers manually

Get the tenfingers files

You may use python or frozen executables:

Linux Python:

You can get the latest version from git:

These commands will create a tenfingers folder in your HOME folder and download the python files into it.

# Go to your users home folder (you can put it anywhere, it's just convenient to have it here)
cd $HOME
# Make a fonder for Tenfingers
mkdir tenfingers
cd tenfingers
# Get the git repositorys content
git clone https://codeberg.org/Valmond/Tenfingers.git
# Get only the python files
mv Tenfingers/tenfingers/*.py ./
mv Tenfingers/tenfingers/*.sh ./
# Remove the rest
rm Tenfingers -rf

Run the setup:

python3 ./setup.py

Windows Python:

Download the latest version here.

Extract it and go to /tenfingers_release/py_source and get the python files.

Put them in any folder you want, or use them where they already are.

Run the setup:

python3 setup.py

Linux or Windows frozen executables:

Download the latest version for your OS from tenfingers.org

Download for Linux

Download for Windows

Extract it and go to /tenfingers_release/bin and get all the executables.

Put them in any folder you want, or use them where they are.

Run the setup:

Linux:

./setup

Windows:

setup.exe

Note for Linux and Windows Frozen executable users:

Further on the examples will be for Python on Linux, so you might need to adjust them a little.

So for example, in an example for Linux with Python:

python3 ./10f.py test ...

it becomes, on Linux (without python):

./10f test ...

and on Windows (without Python):

10f.exe test ...

and on Windows with Python:

python 10f.py test ...

Forwarding internet to your PC and start the node

You now need to forward a port from internet to your PC, for example the default port 46000.

This is usually made in the software of your internet proveders "box", or your router.

This is the complicated part, get this up and running and everything else should be quite simple! Good luck.

You will also need to have your public IP address, say for example your public IP is 173.77.77.77

The setup tries to figure out your public IP address, check if it got it right:

python3 ./10f.py -p

This will show all the configurations, check ip is set to "173.77.77.77"

If you need to change is:

python3 ./10f.py -p ip 173.77.77.77

In the same way, if you don't use the default 46000 port, but say port 8080

python3 ./10f.py -p port 8080

You need to restart the listener after IP or PORT changes.

When the listener is running (see below), but not before, you can check if the configuration is working:

python3 ./10f.py -test

Run the listener

You might want to use another shell to run the listener but anyway you start it like this:

python3 ./listener.py

On Linux que can setup the listener to run automatically byy adding it to the crontab:

crontab -e

then add the line:

@reboot cd ~/Tenfingers/tenfingers && python3 ./listener.py&

Where ~/Tenfingers/tenfingers is where the python files are located.

Now the Tenfingers listener will start automatically after each reboot.

You can check if the listener is tunning using this command:

lsof -i tcp:46000

Bootstrap the node swarm

If you have all set up, and the listener running, you still need to give it access to the tenfingers network.

Download a test link

and then use 10f to download a small smample file from the network:

Linux:

./10f ./testlink.10f

Linux python:

python3 ./10f.py ./testlink.10f

Windows:

10f.exe testlink.10f

Windows python

python3 10f.py testlink.10f

Next step

Now that you are all set (felicitations, you got it all up and running!), see the next step Usage for how to share data: Usage

Usage

Sharing starts with adding some data to the tenfingers system, and then create a link that you can distribute.

Someone else that now has your link, can download the data.

You can then update the data, and the user can download the new data.

The examples are for Linux, for windows it is almost the same, just use 10f.bat instead of 10f.

Sharing a file or a folder

Share a file, for example image.jpg

10f -i my_stuff_to_share image.jpg

my_stuff_to_share is the name of the data shared, it is used to extract the link files, update the data and so on. It is just an example and you can share many many different things under different names.

To check out what you have already shared:

10f -l

Note: the names ending with _tr and _sub are the translation and substitution files, they are internal files so don't touch them!

Note: The number of 'fingers' is how many times your data is shared by other tenfinger nodes.

To share a folder, say ./images/ just add -f

10f -i -f my_stuff_to_share images

If you only want to share .jpg files, you can add a regex:

10f -i -f my_stuff_to_share images .\.jpg

Get the link so that you can share it with someone:

10f -c my_stuff_to_share

Now you should have three files, the link files:

my_stuff_to_share.10f

my_stuff_to_share_tr.10f

my_stuff_to_share_sub.10f

Those together will allow anyone to download the latest shared images (or what ever you share).

Updating data

To update the data you are sharing, you just use the same syntax as creating it, so say you do not longer want to share 'image.jpg' but image2.jpg you can update the my_stuff_to_share link like this:

10f -i my_stuff_to_share another_image.jpg

If you changed the image.jpg itself, say it's an art in progress, just reuse the exact same syntax as when you shared it the first time:

10f -i my_stuff_to_share image.jpg

You can of course freely decide to share a folder or any other data instead!

Note: Sharing and updates sometimes takes some time.

So you just got my_stuff_to_share.10f from a friend or foe, to check it out just:

10f my_stuff_to_share

and it will be downloaded.

Help

There is an inbuilt help that you can use like this:

10f -h

And if you want some help with a specific command, like inserting for example ( -i )

10f -h -i

will give you some pointers.

More and diverse information

This is mostly work in progress and experimental stuff, they might not work!

Check out and enjoy.

Weekend Projects

Here I have gathered some less quality projects, made quickly to test the network and to see what it can be useful for.

Take the projects as a learning experience, it's a mix of shell commands and python, made with the intent to teach whenever possible. This is not always a success of course.

Note: those are mostly made for Linux with Python, but can surely be tweaked easily.

Sharing your life with Tenfingers Book

Creating your book: (Linux)

Note: this is just an example, feel free to change anyting to your convenience

Note: this is not optimized at all and merely an example for what can be done using the tenfingers sharing protocol.

Create a folder that will contain your lifes story, say /home/loulou/Desktop/TenfingersBook/my_book

In there, create a folder of todays date: 20240930

In there put a file: what i did today.txt and fill it with your thoughts. Maybe you'd like to add a photo?

Go to the base folder (here : /home/loulou/Desktop/TenfingersBook/my_book ) and run this script:

Note: you need to change the TENFINGERS_SRC_DIR variable so it points to where 10f.py lives

#!/usr/bin/bash
# Modify these:
# Where you can find the 10f.py file (and all the other python files)
TENFINGERS_SRC_DIR=${HOME}/tenfingers
# The name of the book you want to create
BOOK_NAME="my_book"
# Where your book is (this folder should contain folders, who themselves contains files)
BOOK_DIR=${HOME}"/Desktop/TenfingersBook"

######################################
# Do not modify these:
cd $TENFINGERS_SRC_DIR
python3 tenfingers_book.py $BOOK_NAME $BOOK_DIR

Run it and you should create three files:

my_book.10f
my_book_tr.10f
my_book_sub.10f

Those are the files you can now send to people who you want to share your wisdom with!

When you have updated your book, just run the script again, and that's it!

Checking ouy your book

So someons just sent you three files:

my_book.10f
my_book_tr.10f
my_book_sub.10f

What should I do with them?

Simple, just make some folder somewhere, put them there and run this script:

Note: you need to change the TENFINGERS_SRC_DIR variable so it points to where 10f.py lives

#!/usr/bin/bash
# Modify these:
# Where you can find the 10f.py file (and all the other python files)
TENFINGERS_SRC_DIR=${HOME}/tenfingers
# The name of the book you want to get (the name of the shortest 10f file)
BOOK_NAME="my_book"

######################################
# Do not modify these:
mkdir -p $BOOK_NAME
cd $BOOK_NAME
rm *.10f  2> /dev/null
cp ../my_book.10f my_book.10f
cp ../my_book_tr.10f my_book_tr.10f
cp ../my_book_sub.10f my_book_sub.10f

TENFINGERS_PY="${TENFINGERS_SRC_DIR}/10f.py"
TENFINGERS_BOOK="${BOOK_NAME}.10f"

python3 $TENFINGERS_PY $TENFINGERS_BOOK

# Clean up
rm "${BOOK_NAME}.10f"
rm "${BOOK_NAME}_tr.10f"
rm "${BOOK_NAME}_tr.atf"
rm "${BOOK_NAME}_sub.10f"
rm "${BOOK_NAME}_sub.atf"

# Get all the chapters:
echo "Get all the chapters"
for file in *.10f; do
    if [ -f "$file" ]; then
        no_extension=${file::-4}
        if [[ $no_extension =~ .(_tr|_sub)$ ]]; then
            #echo "tr/sub file, skipping"
            :
        else
            echo "Get chapter $file"
            python3 $TENFINGERS_PY $file
        fi
    fi
done

# Clean up
rm *.10f  2> /dev/null
rm *.atf  2> /dev/null

Open the index.htm file, and voilĂ  !

A Chat program

Chat with your friends and family!

The chat code needs tkinter, which I foolishly thought was integreated with python.

sudo apt-get install python3-tk

Then you can start the chat_gui.py like this, in the python folder:

python3 chat_gui.py

Diverse stuff

Here I will list lesser needed information, experimental stuff and things I do not yet know what to do with.


There is an inbuilt help function:

10f -h

If you want help with a specific command, say for example insert ( -i ) just add that:

10f -h -i

The git repo is here :

https://codeberg.org/Valmond/Tenfingers

DEPRECATED: You can use the 10f frozen executable alone to download 10f link files.


There is an experimental GUI you can use together with the python installation, it lets you do basic things like upload and download and set parameters.

Just download and run the start_gui.sh in your tenfingers python folder.

You can get it here in the git repositorys script folder


The number of fingers is how many nodes shares your data, it might take some time to find nodes that wants to share your data, especially if the data is big!

Small files are often shared pro bono, the default is that files up to 64KB is stored for free, up to a total of 64MB.


A special thank you to Beej and his extraordinary book: Beej's guide to network programming. Never met him but the book is a must have for any network curius programmer!


If you want to make a chat program, a backup soft or any other kind of tech based on Tenfingers, you might want to check out the python file 'access.py' which contains some simplified functions to do basic things like inserting data or downloading.


Legal

All sources are distributed under the GPL-3.0-or-later licence.

I do not take any kind of responsibility if/when you use these files in whatever way.

Whitepaper

You can find a more thorough explanation about the protocol in the Whitepaper