Wormhole – Securely Share Files From One Computer to Another in Linux
It is public knowledge that if you want to get most things done quickly and securely you should use the Command Line Interface. Of course, there exist nifty apps with speedy workflows but in some cases, the CLI still rules. This is one such case.
Wormhole is a CLI-based application with which you can securely send text, files and even folders (which will be automatically zipped) to virtually anyone via the CLI.
Imagine a base case scenario: you want to send a couple of files to a friend, thousands of miles away. You launch a new terminal window using Hyper (wink), open a wormhole, and after entering a couple of words, hit enter.
Your friend on the other end launches his terminal, opens a corresponding wormhole and enters a code to authenticate his access to the files. Easy!
On Security
With regards to how secure it is to use Wormhole the GitHub page in reads:
The wormhole tool uses PAKE “Password-Authenticated Key Exchange” [that] can then be used to encrypt data. wormhole uses the SPAKE2 algorithm.
To send a file use this command.
A code will be generated during the sending process and that is what you will pass on to you intended recipient.
Wormhole Send Files
To receive a file use this command:
Both the sender and receiver will get notifications on indicating the progress of the file transfer or if the process encounters any errors on the way.
I think wormhole is a nifty app; especially for those comfortable with opening their terminal every now and then (and keyboard masters).
Wormhole что это ubuntu
Get things from one computer to another, safely.
The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.
For complete documentation, please see https://magic-wormhole.readthedocs.io or the docs/ subdirectory.
This program uses two servers, whose source code is kept in separate repositories: the mailbox server, and the transit relay.
Magic-Wormhole is released under the MIT license, see the LICENSE file for details.
This library is compatible with Python 3.6 and higher (tested against 3.6, 3.7, 3.8, and 3.9). It also still works with Python 2.7 and 3.5, although these are no longer supported by upstream libraries like Cryptography, so it may stop working at any time.
Magic Wormhole packages are included in many operating systems.
To install it without an OS package, follow the Installation docs.
About
get things from one computer to another, safely
Прямая передача файлов между устройствами по WebRTC
Новый сервис WebWormHole работает как портал, через который файлы передаются с компьютера на другой. Нажимаете кнопку New Wormhole — и получаете код для входа. Человек с другой стороны вводит такой же код или URL — и между вами устанавливается эфемерный туннель, по которому напрямую передаются файлы. Очень просто и эффективно. Исходный код на Github.
Для установки портала между устройствами необязательно открывать браузер. Клиент на Go запускается из командной строки и генерирует одноразовый код в консоли.
Получатель на другой стороне эфемерного тоннеля вводит одноразовый код в консоли — и получает файл.
Автор программы Сальман Альджаммаз (Salmān Aljammāz) предупреждает, что клиент находится в ранней разработке, использует экспериментальные криптографические библиотеки, поэтому может глючить и работать не во всех браузерах. Программа также не прошла аудит безопасности, так что может работать неправильно и небезопасно.
Автор позаимствовал идею и название у программы Magic Wormhole, которая тоже устанавливает пиринговое соединение и передаёт файлы между компьютерами.
Magic Wormhole
Отличие в том, что WebWormHole использует WebRTC, что позволяет пробить файрволы и NAT, а также запускать передачу из браузера.
Каждый тоннель защищается одноразовым паролем и PAKE — это специфический способ обмена ключами с проверкой подлинности пароля для установки зашифрованного соединения. При этом сам пароль не передаётся по сети ни в каком виде.
Проверка осуществляется примерно как в доказательстве с нулевым разглашением, в котором получатель может убедиться в достоверности какого-либо утверждения, не имея при этом никакой другой информации от отправителя.
SPAKE2
В WebWormHole для выработки общего ключа шифрования происходит обмен описаниями сессий с отпечатками сертификатов DTLS, которые использует WebRTC для шифрования соединений.
Передача файлов через пиринговый тоннель быстрее и безопаснее, чем по почте, FTP или другими способами. По удобству и безопасности эти способы сравниваются в таблице из презентации Magic Wormhole:
Примечание. С момента составления этой таблицы в далёком 2016 году были запущены удобные сервисы для передачи файлов типа Firefox Send (есть консольный клиент) и File.pizza
Кроме питоновского Magic Wormhole, есть и другие клиенты для установления прямых соединений по WebRTC между компьютерами:
Что касается механизма обмена ключами PAKE, то он полезен и в разных областях. Например, позволяет реализовать аутентификацию на сайте без передачи пароля на сервер.
WelcomeВ¶
Get things from one computer to another, safely.
The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.
ExampleВ¶
InstallationВ¶
The easiest way to install magic-wormhole is to use a packaged version from your operating system. If there is none, or you want to participate in development, you can install from source.
MacOS / OS-XВ¶
Linux (Debian/Ubuntu)В¶
Magic-wormhole is available with apt in Debian 9 “stretch”, Ubuntu 17.04 “zesty”, and later versions:
Linux (Fedora)В¶
Linux (openSUSE)В¶
Linux (Snap package)В¶
Many linux distributions (including Ubuntu) can install “Snap” packages. Magic-wormhole is available through a third-party package (published by the “snapcrafters” group):
Install from SourceВ¶
/.local/bin/wormhole ) like this:
or put it into a virtualenv, like this:
You can then run venv/bin/wormhole without first activating the virtualenv, so e.g. you could make a symlink from
On Debian/Ubuntu systems, you may need to install some support libraries first:
Copying files onto a USB stick requires physical proximity, and is uncomfortable for transferring long-term secrets because flash memory is hard to erase. Copying files with ssh/scp is fine, but requires previous arrangements and an account on the target machine, and how do you bootstrap the account? Copying files through email first requires transcribing an email address in the opposite direction, and is even worse for secrets, because email is unencrypted. Copying files through encrypted email requires bootstrapping a GPG key as well as an email address. Copying files through Dropbox is not secure against the Dropbox server and results in a large URL that must be transcribed. Using a URL shortener adds an extra step, reveals the full URL to the shortening service, and leaves a short URL that can be guessed by outsiders.
Many common use cases start with a human-mediated communication channel, such as IRC, IM, email, a phone call, or a face-to-face conversation. Some of these are basically secret, or are “secret enough” to last until the code is delivered and used. If this does not feel strong enough, users can turn on additional verification that doesn’t depend upon the secrecy of the channel.
The notion of a “magic wormhole” comes from the image of two distant wizards speaking the same enchanted phrase at the same time, and causing a mystical connection to pop into existence between them. The wizards then throw books into the wormhole and they fall out the other side. Transferring files securely should be that easy.
DesignВ¶
The wormhole tool uses PAKE “Password-Authenticated Key Exchange”, a family of cryptographic algorithms that uses a short low-entropy password to establish a strong high-entropy shared key. This key can then be used to encrypt data. wormhole uses the SPAKE2 algorithm, due to Abdalla and Pointcheval1.
PAKE effectively trades off interaction against offline attacks. The only way for a network attacker to learn the shared key is to perform a man-in-the-middle attack during the initial connection attempt, and to correctly guess the code being used by both sides. Their chance of doing this is inversely proportional to the entropy of the wormhole code. The default is to use a 16-bit code (use –code-length= to change this), so for each use of the tool, an attacker gets a 1-in-65536 chance of success. As such, users can expect to see many error messages before the attacker has a reasonable chance of success.
TimingВ¶
The program does not have any built-in timeouts, however it is expected that both clients will be run within an hour or so of each other. This makes the tool most useful for people who are having a real-time conversation already, and want to graduate to a secure connection. Both clients must be left running until the transfer has finished.
RelaysВ¶
The protocol includes provisions to deliver notices and error messages to clients: if either relay must be shut down, these channels will be used to provide information about alternatives.
CLI toolВ¶
Both commands accept additional arguments to influence their behavior:
LibraryВ¶
The wormhole module makes it possible for other applications to use these code-protected channels. This includes Twisted support, and (in the future) will include blocking/synchronous support too. See docs/api.md for details.
DevelopmentВ¶
To set up Magic Wormhole for development, you will first need to install virtualenv.
Once you’ve done that, git clone the repo, cd into the root of the repository, and run:
Now your virtualenv has been activated. You’ll want to re-run source venv/bin/activate for every new terminal session you open.
To install Magic Wormhole and its development dependencies into your virtualenv, run:
While the virtualenv is active, running wormhole will get you the development version.
Running TestsВ¶
Within your virtualenv, the command-line program trial will run the test suite:
This tests the entire wormhole package. If you want to run only the tests for a specific module, or even just a specific test, you can specify it instead via Python’s standard dotted import notation, e.g.:
Developers can also just clone the source tree and run tox to run the unit tests on all supported (and installed) versions of python: 2.7, 3.4, 3.5, and 3.6.
TroubleshootingВ¶
Every so often, you might get a traceback with the following kind of error:
OtherВ¶
License, CompatibilityВ¶
This library is released under the MIT license, see LICENSE for details.
Wormhole что это ubuntu
Get things from one computer to another, safely.
The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.
The easiest way to install magic-wormhole is to use a packaged version from your operating system. If there is none, or you want to participate in development, you can install from source.
Magic-wormhole is available with apt in Debian 9 «stretch», Ubuntu 17.04 «zesty», and later versions:
Linux (Snap package)
Many linux distributions (including Ubuntu) can install «Snap» packages. Magic-wormhole is available through a third-party package (published by the «snapcrafters» group):
Install from Source
/.local/bin/wormhole ) like this:
or put it into a virtualenv, like this:
You can then run venv/bin/wormhole without first activating the virtualenv, so e.g. you could make a symlink from
On Debian/Ubuntu systems, you may need to install some support libraries first:
Copying files onto a USB stick requires physical proximity, and is uncomfortable for transferring long-term secrets because flash memory is hard to erase. Copying files with ssh/scp is fine, but requires previous arrangements and an account on the target machine, and how do you bootstrap the account? Copying files through email first requires transcribing an email address in the opposite direction, and is even worse for secrets, because email is unencrypted. Copying files through encrypted email requires bootstrapping a GPG key as well as an email address. Copying files through Dropbox is not secure against the Dropbox server and results in a large URL that must be transcribed. Using a URL shortener adds an extra step, reveals the full URL to the shortening service, and leaves a short URL that can be guessed by outsiders.
Many common use cases start with a human-mediated communication channel, such as IRC, IM, email, a phone call, or a face-to-face conversation. Some of these are basically secret, or are «secret enough» to last until the code is delivered and used. If this does not feel strong enough, users can turn on additional verification that doesn’t depend upon the secrecy of the channel.
The notion of a «magic wormhole» comes from the image of two distant wizards speaking the same enchanted phrase at the same time, and causing a mystical connection to pop into existence between them. The wizards then throw books into the wormhole and they fall out the other side. Transferring files securely should be that easy.
The wormhole tool uses PAKE «Password-Authenticated Key Exchange», a family of cryptographic algorithms that uses a short low-entropy password to establish a strong high-entropy shared key. This key can then be used to encrypt data. wormhole uses the SPAKE2 algorithm, due to Abdalla and Pointcheval1.
The program does not have any built-in timeouts, however it is expected that both clients will be run within an hour or so of each other. This makes the tool most useful for people who are having a real-time conversation already, and want to graduate to a secure connection. Both clients must be left running until the transfer has finished.
The protocol includes provisions to deliver notices and error messages to clients: if either relay must be shut down, these channels will be used to provide information about alternatives.
Both commands accept additional arguments to influence their behavior:
The wormhole module makes it possible for other applications to use these code-protected channels. This includes Twisted support, and (in the future) will include blocking/synchronous support too. See docs/api.md for details.
To set up Magic Wormhole for development, you will first need to install virtualenv.
Once you’ve done that, git clone the repo, cd into the root of the repository, and run:
Now your virtualenv has been activated. You’ll want to re-run source venv/bin/activate for every new terminal session you open.
To install Magic Wormhole and its development dependencies into your virtualenv, run:
While the virtualenv is active, running wormhole will get you the development version.
Within your virtualenv, the command-line program trial will run the test suite:
This tests the entire wormhole package. If you want to run only the tests for a specific module, or even just a specific test, you can specify it instead via Python’s standard dotted import notation, e.g.:
Developers can also just clone the source tree and run tox to run the unit tests on all supported (and installed) versions of python: 2.7, 3.4, 3.5, and 3.6.
Every so often, you might get a traceback with the following kind of error:
This library is released under the MIT license, see LICENSE for details.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.