GnuPG Desktop
Ensuring Maximum Security in Digital Communications
Encrypt emails and attachments, files and folders (both locally and on
remote computers), as well as chats. Manage keys and certificates and simplify
the exchange with other users. GnuPG Desktop® is a user-friendly,
comprehensive solution for Windows and Linux.
GnuPG Desktop® fulfills the requirements of the European DSGVO
(General Data Protection Regulation) and the german BDSG
(Federal Data Protection Act).
We make encrypted communication easy and intuitive intuitive so that it
integrates seamlessly into the applications and everyday work applications
and your employees’ everyday work.
GDPRcompliant
VS-NfDnon compliant
RESTRICTEDnon compliant
PQCbeta available
Our sibling product GnuPG VS-Desktop® is furthermore approved for processing
information classified as VS-NfD, EU-RESTRICTED, and NATO-RESTRICTED
Encrypted Communication Solutions for the Workplace
Overview of GnuPG Components
GnuPG (CLI & Engine)
GnuPG, a powerful crypto engine, is at the core of our encryption
solutions. It features a versatile command-line interface (CLI) that
offers a wide range of cryptographic functions including encryption,
decryption, digital signature, and key management.
Kleopatra (GUI)
Kleopatra is a graphical program that simplifies the management of keys
and certificates (OpenPGP and S/MIME). It provides features
for signing and certifying, as well as for importing and exporting
certificates. Additionally, Kleopatra communicates with key servers
(LDAP, AD, LDS) and the Web Key Directory (WKD).
GpgOL (MS Outlook Add-in)
GpgOL is an add-in for Microsoft Outlook that enables seamless email
encryption. Compatible with Outlook versions 2003, 2007, 2010, 2013, and
2016, in both 32-bit and 64-bit, GpgOL integrates smoothly into the user
interface. It supports both IMAP/SMTP and MS Exchange Server.
GpgEX (Windows Explorer Add-on)
GpgEX is an extension for Microsoft Explorer that allows you to encrypt
files and folders directly. This Add-on is the perfect solution for
those seeking a simple yet secure method for file encryption right in
their familiar work environment.
Okular (PDF Viewer)
The GnuPG edition of Okular is a modified
version of the PDF viewer. Unlike the original program, our version
is limited to the PDF format and, for security reasons, doesn’t support
plugins or scripts. Our viewer allows you to view and verify digitally
signed PDF files, as well as sign PDF documents using your X.509 smartcard.
GnuPG with Support
With us, you’re not just purchasing a license key—we don’t offer
those. Instead, we provide a holistic service. You get not only the
software but also personalized consultation, specialized third-level
support, and custom software development. GnuPG Desktop® and its
included programs are ideal for both small and large organizations seeking
a robust, adaptable, and supportive solution for their security needs.
Encryption technologies like OpenPGP and S/MIME may seem complex,
but we make their application easy. Our team of experts provides
personalized consultation and support for key management and certificate
distribution. We help integrationg our solutions into your existing infrastructure
and help optimize your processes. If adjustments to our software are
necessary, we work closely with you to develop a tailor-made solution. In
the meantime, we always ensure a practical alternative is available.
Our Services Explained
Implementation
As part of our Enterprise package for GnuPG VS-Desktop®, we offer
comprehensive consulting services. We address your questions individually
and discuss the optimal deployment of our solution with your technicians
and experts. This includes equipping your users with keys, deciding on the
use of hardware tokens, providing necessary information for secure mail
and data exchange, and creating a business continuity plan. Additionally,
we answer fundamental questions about end-to-end encryption.
Support
Should you face challenges with our software, you are not alone—we’re
here to help immediately! Are you unable to use a communication partner’s
key? Is a signature displayed as invalid? Do you suspect a bug in our
software? We are a reliable point of contact for our customers. We are
available by phone to offer advice and practical assistance and regularly
provide software updates. This ensures that you are never left alone with
any issues and receive direct, timely support from the manufacturer.
Optimization
The crypto engine GnuPG has been around since 1997. The foundation of
our programs and tools is extremely flexible and versatile. Known as the
Swiss Army Knife of Crypto, it has numerous options, all described in
our comprehensive manuals. We assist you with configuration and ensure
that GnuPG Desktop® meets your specific requirements and integrates
seamlessly into your operational workflow. Our goal: to provide you with
a tailored solution that is both powerful and user-friendly.
GPG или OpenPGP (GnuPG — GNU Privacy Guard) — это свободная программа с открытым исходным кодом для криптографической защиты Ваших личных файлов или сообщений. GnuPG был разработан как бесплатная альтернатива проприетарному PGP (Pretty Good Privacy) и выпущен под «GNU General Public License» свободной лицензией.
- Как использовать OpenPGP (GnuPG) в Windows
- Установка Gpg4win
- Создание пары PGP ключей
- Обмен публичными PGP ключами
- Шифровка и обмен файлами с использованием публичных ключей
- Шифровка и обмен почтовыми сообщениями с использованием публичных GPG ключей
- Экспорт/импорт PGP (GnuPG) ключей
- Как проверить PGP подпись файла
- Создание портативной (portable) версии Gpg4win
- Gpg4win и проблемы с кириллицей
- Ссылки по теме GnuPG
Ввиду последних скандалов с тотальной прослушкой Интернет трафика провайдерами, крупными веб-сервисами (Google, Yahoo etc.), всяческими службами безопасности (АНБ, ФСБ, СБУ, ЦРУ и т.д.), использование GnuPG в Windows будет полезно всем, кто беспокоится о сохранности своих приватных данных.
Как использовать OpenPGP (GnuPG) в Windows
Для начала нам нужно установить GnuPG, но для Windows специально создан порт под именем Gpg4win.
Для загрузки доступны три реализации Gpg4win:
- Gpg4win — один большой глючный комбайн;
- Gpg4win-Light — лайт версия глючного комбайна;
- Gpg4win-Vanilla — исключительно только основные GnuPG компоненты.
К установке рекомендуется только Gpg4win-Vanilla, другие варианты тоже можно устанавливать, но они могут часто глючить и вводить в заблуждение, например при попытке создать пару ключей в Windows XP, как через графический интерфейс так и через консоль, я получил неизвестную ошибку в приложении pinentry.exe с сообщением «gpg: problem with the agent: Input/output error» и предложением отправить отчет дядюшке Биллу
Я предупредил, а кто поставил не Gpg4win-Vanilla, то я не виноват!:) Теперь нам нужно создать пару ключей (публичный и приватный), один из которых (публичный) опубликовать на сервере ключей (по умолчанию keys.gnupg.net) для того, чтобы нам каждый раз не высылать свой публичный ключ тому, с кем мы собираемся обмениваться шифровками, а чтобы он самостоятельно мог его получить в любое время и из любой точки сети Интернет.
В целом использование OpenPGP (GnuPG) в Windows, да и не только, сводится к таким этапам:
- Установка Gpg4win-Vanilla;
- Создание пары PGP ключей;
- Обмен публичными PGP ключами, обычно через сервер ключей;
- Шифровка и обмен сообщениями/файлами с использованием публичных ключей;
- Расшифровка сообщений/файлов с помощью своего приватного ключа.
В приведённых здесь примерах используется портативный вариант Gpg4win-Vanilla версии 2.2.1.16059. О том, как создать портативную версию Gpg4win будет рассказано далее.
Главное, что нужно помнить — это то, что GnuPG (OpenPGP) в Windows корректно работает только из командной строки, а большая часть графических инструментов для Windows одарят Вас различными глюками и багами. Хотя, собственно и в командной строке Windows не всё так гладко с OpenPGP, когда речь идёт о кириллице, но об этом позже…
Установка Gpg4win
Установка Gpg4win сводится к банальному нажатию кнопки «Далее». Как ранее упоминалось желательно устанавливать Gpg4win-Vanilla, который содержит только основные GnuPG компоненты, а иначе вполне вероятно получим множественные глюки.
Создание пары PGP ключей
В ходе создания пары OpenPGP (GnuPG) ключей нужно будет ввести пароль не менее 8-ми символов для приватного ключа, в котором обязательно должны быть буквы (желательно разного регистра) и хотя бы одна-две цифры — чем длиннее пароль на приватный ключ, тем более стойким он будет к взлому! Для того, чтобы создать пару GnuPG (OpenPGP) ключей, выполним:
С:\PORTABLE\GnuPG\pub>gpg --gen-key gpg (GnuPG) 2.0.22; Copyright (C) 2013 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. gpg: keyring `С:/PORTABLE/GnuPG/home/secring.gpg' created gpg: keyring `С:/PORTABLE/GnuPG/home/pubring.gpg' created Please select what kind of key you want: (1) RSA and RSA (default) (2) DSA and Elgamal (3) DSA (sign only) (4) RSA (sign only) Your selection? RSA keys may be between 1024 and 4096 bits long. What keysize do you want? (2048) 4096 Requested keysize is 4096 bits Please specify how long the key should be valid. 0 = key does not expire <n> = key expires in n days <n>w = key expires in n weeks <n>m = key expires in n months <n>y = key expires in n years Key is valid for? (0) Key does not expire at all Is this correct? (y/N) y GnuPG needs to construct a user ID to identify your key. Real name: Windows Remote Shaman (www.remoteshaman.com) Email address: remoteshaman.com@gmаil.соm Comment: GPG key for remoteshaman.com@gmаil.соm You selected this USER-ID: "Windows Remote Shaman (www.remoteshaman.com) (GPG key for remoteshaman.com@ gmаil.соm) <remoteshaman.com@gmаil.соm>" Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o You need a Passphrase to protect your secret key. We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. gpg: С:/PORTABLE/GnuPG/home/trustdb.gpg: trustdb created gpg: key 346B72D7 marked as ultimately trusted public and secret key created and signed. gpg: checking the trustdb gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u pub 4096R/346B72D7 2014-01-19 Key fingerprint = 8CC0 592D 17F5 0B9D A625 3324 1590 B040 346B 72D7 uid Windows Remote Shaman (www.remoteshaman.com) (GPG key for r emoteshaman.com@gmаil.соm email) <remoteshaman.com@gmаil.соm> sub 4096R/6D2314B5 2014-01-19
После ввода «(O)kay» и сообщения «You need a Passphrase to protect your secret key.» мы должны сразу же увидеть окно для ввода пароля на наш приватный OpenPGP (GnuPG) ключ:
Но в моём случае процесс \GnuPG\gpgp2.exe не смог вовремя получить доступ к Loopback интерфейсу, закрыто брандмауэром, в результате окна для ввода пароля я так и не дождался, оно не появилось даже после повторной попытки создать пару ключей. Если в Вашем случае возникла также ситуация, то разрешите в брандмауэре для процесса \GnuPG\gpgp2.exe доступ к Loopback интерфейсу, после удалите всё из каталога \GnuPG\home, кроме файлов gpa.conf, gpg.conf, pubring.gpg, secring.gpg и trustdb.gpg, после чего повторите попытку.
Сначала просмотрим список установленных ключей и найдём там ИД своего «pub» ключа, он понадобится нам для отправки на сервер ключей и публикации на сайтах или в любых других местах:
С:\PORTABLE\GnuPG\pub>gpg --list-keys С:/PORTABLE/GnuPG/home/pubring.gpg ---------------------------------------- pub 4096R/346B72D7 2014-01-19 uid Windows Remote Shaman (www.remoteshaman.com) (GPG key for r emoteshaman.com@gmаil.соm email) <remoteshaman.com@gmаil.соm> sub 4096R/6D2314B5 2014-01-19
Наш pub ИД «346B72D7», его также можно было узнать/записать вовремя создания пары ключей, отправляем его на сервер ключей:
С:\PORTABLE\GnuPG\pub>gpg --keyserver keys.gnupg.net --send-key 346B72D7
gpg: sending key 346B72D7 to hkp server keys.gnupg.net
Для отправки ключей на сервер процессу «gpg2keys_hkp.exe» нужно будет разрешить исходящее TCP соединение с удалённым ИП «130.133.110.62» на удалённый порт «11371«. Для того, чтобы убедится, что наш публичный ключ уже на сервере, открываем в браузере адрес keys.gnupg.net (иногда может переадресовать на другой, рабочий в текущий момент), в поисковой форме отмечаем «Index choice — Verbose Index«, в поле «Search text» вводим часть нашего «uid» (в нашем случае «Windows Remote Shaman»), дальше жмем Search и получаем результат:
Search results for 'windows shaman remote' Type bits/keyID cr. time exp time key expir pub 4096R/346B72D7 2014-01-19 uid Windows Remote Shaman (www.remoteshaman.com) (GPG key for \ remoteshaman.com@gmаil.соm email) <remoteshaman.com@gmаil.соm> sig sig3 346B72D7 2014-01-19 __________ __________ [selfsig] sub 4096R/6D2314B5 2014-01-19 sig sbind 346B72D7 2014-01-19 __________ __________ []
Для успешной шифровки, обмена и дешифровки сообщений/файлов у отправителя и получателя должны быть публичные ключи — как минимум у отправителя шифрованного сообщения должен быть публичный ключ получателя! Для того чтобы получить (импортировать) публичный ключ получателя нужно узнать «pub» ИД ключа и выполнить:
C:\PORTABLE\GnuPG\pub\>gpg --recv-keys 346B72D7 gpg: requesting key 346B72D7 from hkp server keys.gnupg.net gpg: key 346B72D7: public key "Windows Remote Shaman (www.remoteshaman.com) (GPG key for remoteshaman.com@gmаil.соm email) <remoteshaman.com@gmаil.соm>" importe d gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1)
Шифровка и обмен файлами с использованием публичных ключей
Мы установили GnuPG и у нас есть импортированный публичный ключ «gpg --recv-keys 346B72D7» получателя, настал момент совершить обмен зашифрованным файлом.
Шифрование файла в GnuPG выполняется командой:
C:\PORTABLE\GnuPG\pub\>gpg -e -r 346B72D7 test.txt gpg: 6D2314B5: There is no assurance this key belongs to the named user pub 4096R/6D2314B5 2014-01-19 Windows Remote Shaman (www.remoteshaman.com) (GPG key for remoteshaman.com@gmаil.соm email) <remoteshaman.com@gmаil.соm> Primary key fingerprint: 8CC0 592D 17F5 0B9D A625 3324 1590 B040 346B 72D7 Subkey fingerprint: F711 E6D7 034B 4D58 B324 DFB2 6B94 B164 6D23 14B5 It is NOT certain that the key belongs to the person named in the user ID. If you *really* know what you are doing, you may answer the next question with yes. Use this key anyway? (y/N) y
В примере выше был зашифрован файл «test.txt», в котором содержалось сообщение «test message«. На выходе мы получили файл «test.txt.gpg».
Для зашифрованного файла был определён «-r» получатель (—recipient) с ИД публичного ключа «346B72D7«. Этот файл сможет расшифровать только получатель с ИД «346B72D7», а если отправитель тоже хочет иметь возможность его расшифровать в будущем, то при шифровании нужно также использовать и публичный ключ отправителя «gpg -e -r ID_FROM -r ID_TO test.txt«, где «ID_FROM» ИД публичного ключа отправителя, а «ID_TO» ИД публичного ключа получателя.
Теперь зашифрованный файл test.txt.gpg можно смело отправить по сети получателю или даже выложить на каком-то файлообменнике.
Для того чтобы расшифровать «test.txt.gpg» выполним:
С:\PORTABLE\GnuPG\pub>gpg -d test.txt.gpg > test.txt You need a passphrase to unlock the secret key for user: "Windows Remote Shaman (www.remoteshaman.com) (GPG key for remoteshaman.co m@gmаil.соm email) <remoteshaman.com@gmаil.соm>" 4096-bit RSA key, ID 6D2314B5, created 2014-01-19 (main key ID 346B72D7) gpg: encrypted with 4096-bit RSA key, ID 6D2314B5, created 2014-01-19 "Windows Remote Shaman (www.remoteshaman.com) (GPG key for remoteshaman.co m@gmаil.соm email) <remoteshaman.com@gmаil.соm>"
Вводим пароль от своего приватного ключа и получаем расшифрованный файл:
Вместо «gpg -d test.txt.gpg > test.txt» можно использовать «gpg --output test.txt -d test.txt.gpg» или просто «gpg test.txt.gpg«, а иначе содержимое файла будет выведено в консоль.
При расшифровке файла/сообщения в обычной файловой системе (не на виртуальном шифрованном диске) нужно помнить, что расшифрованный файл после обычного удаления будет доступен доступен для восстановления, а чтобы этого избежать, то для его безвозвратного удаления нужно использовать специальные программы, например sdelete (входит в пакет «сисьинтерналс суита»).
Шифровка и обмен почтовыми сообщениями с использованием публичных GPG ключей
Описанный ниже метод обмена шифрованными GPG сообщениями будет полезен в случаях, когда почтовый клиент оппонента не поддерживает автоматическую обработку шифрованных GPG сообщений, как например Outlook Express.
Шифрование электронных почтовых сообщений с использованием GPG ключей выполняется почти аналогично шифрованию файлов, но с некоторыми отличиями. В чём заключаются эти отличия?
В примере выше шифрование файла выполнялось в двоичном формате (binary), что не хорошо при передаче в теле почтового сообщения, но допустимо при передаче самого зашифрованного файла во вложении к электронному письму.
Если мы хотим передать само зашифрованное сообщение в теле письма, то у нас ест несколько вариантов:
- Создать обычный текстовый файл (расширение .txt) в котором набрать нужное сообщение, после чего зашифровать его с флагом «-a» (—armor);
- Скопировать в буфер обмена и там его зашифровать при помощи графических утилит kleopatra.exe или gpa.exe
Первый вариант реализуется из консоли, с помощью команды «gpg -e -a -r TO_ID -r FROM_ID filename.txt«, в результате чего получим файл «filename.txt.asc» с примерно таким содержимым:
-----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.22 (MingW32) hQIMA2uUsWRtIxS1ARAApAEj1FfvasNx68tQbjU6G80LVl5WGeqiZmnYR+Dy/ryD ................ TQHuyM587gfUf/3kwiKPvbzgCtH3yaiwAuVXbl8JufdxKaMaKrPrXhGQHdueWlQD gE0NKMmwO/MbtKDAZtq61ojiM2E49O98XnYDVlS1 =oGdy -----END PGP MESSAGE-----
Это сообщение в ASCII формате можно свободно отправлять в теле электронного сообщения, желательно в виде обычного текста, а не в виде ХТМЛ.
Вторым вариантом шифрования текста сообщения является использование программ из пакетов Gpg4win или Gpg4win-Light — это либо GPA (GNU Privacy Assistant (альтернатива WinPT)) или Kleopatra (Менеджер ключей Kleopatra).
Например, при использовании Менеджера ключей Kleopatra последовательность шифрования следующая:
- Нужно запустить менеджер ключей Kleopatra, после чего в «трее» появится соответствующий значок;
- В текстовом редакторе набрать нужное сообщение, которое мы хотим зашифровать, после чего выделить его и скопировать через контекстное меню или использовать для этого комбинацию клавиш Ctrl+C;
- В трее, на значке менеджера ключей Kleopatra, кликнуть правой кнопкой крыски, чем вызвать контекстное меню, где выбрать пункт «Clipboard — Encrypt«, в открывшемся окне добавить ИД ключей получателей (ака Add Recipient), далее нажать «Next — Ok«, после чего буфер обмена будет содержать уже зашифрованное сообщение, которое можно вставить куда угодно используя контекстное меню «Вставить» или комбинацию клавиш «Ctrl+V«.
В обоих случаях зашифрованный текст сообщения будет в ASCII формате, который можно смело отправлять в теле электронного почтового сообщения.
Экспорт/импорт PGP (GnuPG) ключей
Если мы не желаем обмениваться публичным ключом через публичные сервера ключей, то мы можем выполнить его экспорт в файл и переслать по почте. Экспорт публичного ключа выполняется с помощью флага «—export«
gpg --export --output 346B72D7.public.gpg 346B72D7
Приведённая выше команда выполнит экспорт публичного PGP ключа (с ИД 346B72D7) в файл 346B72D7.public.gpg в двоичном (binary) формате, но это может быть неудобно при его пересылке например в теле сообщения по электронной почте. Мы можем выполнить экспорт ключа в ASCII формате добавив флаг «—armor» (или просто «-a»):
gpg --export --armor --output 346B72D7.public.gpg 346B72D7
Для того чтобы выполнить экспорт приватного PGP ключа, вместо флага «—export» мы должны использовать флаг «—export-secret-keys«, но, странно, что этого флага нет в справке «gpg --help«:
gpg --export-secret-keys -a --output 346B72D7.private.gpg 346B72D7
Импорт ключей выполняется командой «gpg --import public.gpg» или «gpg --allow-secret-key-import --import private.gpg» соответственно. Смотрим список ключей «gpg --list-keys«.
Экспорт приватных ключей желательно выполнять прямо на съёмные носители или же виртуальные шифрованные диски, имхо в обычной файловой системе после обычного удаления они будут доступны для восстановления.
Для создания точек соединения между файловой системой и виртуальным шифрованным диском, а если проще создания символьной ссылки (ака symlink в Unix), можно использовать linkd.
Как проверить PGP подпись файла
В примере ниже мы проверяем PGP подпись файла multibit-0.5.16-windows-setup.exe, которая расположена в файле с тем же именем, но только с приставкой «.asc» — оба файла должны располагаться в одной и той же директории («C:\» в нашем случае):
С:\PORTABLE\GnuPG\pub>gpg --verify multibit-0.5.16-windows-setup.exe.asc gpg: no signed data gpg: can't hash datafile: No data С:\PORTABLE\GnuPG\pub> С:\PORTABLE\GnuPG\pub>gpg --verify multibit-0.5.16-windows-setup.exe.asc gpg: Signature made 12/18/13 13:33:21 +ЁхЎш , TєЁЎш (чшьр) using RSA key ID 23F 7FB7B gpg: Good signature from "Jim Burton (multibit.org developer) <jim618@fastmail.c o.uk>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 299C 423C 672F 47F4 756A 6BA4 C197 2AED 79F7 C572 Subkey fingerprint: 4A71 A836 F572 01B4 D088 7D60 0820 A658 23F7 FB7B
При первой проверке файл «multibit-0.5.16-windows-setup.exe» был расположен в другом каталоге, при второй проверке оба файла были в корне диска «С:\PORTABLE\GnuPG\pub» откуда мы и выполняли проверку подписи. Результат проверки положительный: «Good signature from …«.
Предупреждение говорит нам о том, что мы не доверяем любым ключам, которыми был подписан ключ Джима (Jim Burton):
GPG: ВНИМАНИЕ: Этот ключ не заверен доверенной подписью! GPG: Здесь нет никаких признаков, что подпись принадлежит владельцу.
Если Вы хотите включить этот ключ в свою цепочку доверия, тогда Вам нужно подписать ключ Джима своим собственным ключом. Дополнительную информацию о подписи ключей и других особенностях GPG можно найти здесь.
Создание портативной (portable) версии Gpg4win
Для того чтобы создать портативную версию GnuPG сначала нужно установить полную, «лайт» или «vanilla» версию, после чего из консоли перейти в директорию установки и выполнить:
Microsoft Windows XP [Версия 5.1.2600] (С) Корпорация Майкрософт, 1985-2001. C:\Documents and Settings\root>cd C:\Program Files\GNU\GnuPG C:\Program Files\GNU\GnuPG>mkportable C:\PORTABLE\GnuPG C:\Program Files\GNU\GnuPG>
В каталоге C:\PORTABLE\GnuPG будет создана портативная версия GnuPG. Ваши GnuPG ключи и настройки будут считываться из директории ‘home’ корневого каталога портативной версии.
Если хотим использовать gpg команду из любого каталога, тогда добавим путь к каталогу С:\PORTABLE\GnuPG\pub в переменную PATH. Можно создать пользовательскую переменную PATH, т.е. не обязательно править системную!
Gpg4win и проблемы с кириллицей
Если в консоли возникают проблемы с кириллицей, а они обычно возникают всегда, то обходим (не решаем) их переименованием каталога «%Program Files%\GPG4win\share\locale\ru«, например в «%Program Files%\GPG4win\share\locale\sru«:) После этого будем иметь английский интерфейс, но уж пусть лучше английский, чем куча каракуль в консоли.
GnuPG под Windows также не любит кириллические символы в именах шифруемых файлов, поэтому лучше избегать кириллицы в именах файлов!
…
Всё, кажись основные моменты для успешного использования GnuPG в Windows раскрыты. Теперь, после GnuPG шифрования, наши с Вами приватные данные будут в относительно большей безопасности, чем если бы они передавались в открытом виде.
Дополнительно предлагается изучить информацию по представленным ниже ссылкам, а про всё, что не найдено и не понято, пишите в комментарии.
Ссылки по теме GnuPG
- GnuPG — Википедия
- openPGP в России / Часто задаваемые вопросы / Общие вопросы
- openPGP в России / Часто задаваемые вопросы / Шифрование, подпись, уничтожение данных
- Gpg4win — Documentation
- GnuPG — Documentation
- Gpg4win Compendium — A Information on the GpgOL Outlook extension
Installing GPG on Windows: A Step-by-Step Guide
Introduction
GPG (GNU Privacy Guard) is a free and open-source encryption software that provides secure communication and data protection. It is widely used by individuals and organizations to protect their online activities and sensitive information. In this article, we will guide you through the process of installing GPG on Windows.
Why Install GPG on Windows?
Before we dive into the installation process, let’s discuss why you might want to install GPG on Windows. GPG offers several benefits, including:
- Secure communication: GPG encrypts your emails, messages, and files, making them unreadable to anyone who doesn’t have the decryption key.
- Data protection: GPG protects your sensitive information, such as passwords, credit card numbers, and personal data.
- Open-source: GPG is free and open-source, which means you can use it without any licensing fees.
Installing GPG on Windows
To install GPG on Windows, you’ll need to download and install the GnuPG software. Here’s a step-by-step guide:
Step 1: Download GPG
- Go to the official GPG website (www.gpgmail.org) and download the latest version of GPG for Windows.
- Choose the correct version for your Windows version (32-bit or 64-bit).
Step 2: Install GPG
- Once you’ve downloaded the GPG installer, run the installer and follow the prompts to install GPG.
- Make sure to select the «Add to PATH» option during the installation process.
Step 3: Configure GPG
- After installation, you’ll need to configure GPG to use your email account.
- Go to the GPG settings page (https://www.gpgmail.org/settings) and follow the instructions to set up your email account.
Step 4: Verify GPG Installation
- To verify that GPG is installed correctly, open a command prompt and type the following command:
gpg --version
- This should display the version of GPG that you installed.
Using GPG on Windows
Once GPG is installed and configured, you can use it to encrypt and decrypt your emails, messages, and files.
Encrypting Emails
To encrypt an email using GPG, follow these steps:
- Open a new email client, such as Microsoft Outlook or Mozilla Thunderbird.
- Attach the email you want to encrypt to the email client.
- Click on the «File» menu and select «Open» to open the email client.
- Click on the «GPG» tab and select «Encrypt» to encrypt the email.
Decrypting Emails
To decrypt an encrypted email using GPG, follow these steps:
- Open a new email client, such as Microsoft Outlook or Mozilla Thunderbird.
- Click on the «File» menu and select «Open» to open the email client.
- Click on the «GPG» tab and select «Decrypt» to decrypt the email.
Using GPG with Other Applications
GPG can also be used with other applications, such as:
- Email clients: GPG can be used with email clients like Microsoft Outlook and Mozilla Thunderbird to encrypt and decrypt emails.
- File transfer protocols: GPG can be used with file transfer protocols like SFTP and FTP to encrypt and decrypt files.
- Cloud storage: GPG can be used with cloud storage services like Dropbox and Google Drive to encrypt and decrypt files.
Security Considerations
When using GPG on Windows, there are several security considerations to keep in mind:
- Use strong passwords: Use strong passwords for your email account and other online accounts that use GPG.
- Keep GPG up to date: Keep GPG up to date by installing the latest version of GPG.
- Use a secure email client: Use a secure email client that supports GPG encryption.
Conclusion
Installing GPG on Windows is a straightforward process that requires only a few steps. By following these steps, you can use GPG to encrypt and decrypt your emails, messages, and files, and protect your sensitive information. Remember to keep GPG up to date and use strong passwords to ensure the security of your online activities.
Additional Resources
- GPG Website: www.gpgmail.org
- GPG Documentation: https://www.gpgmail.org/docs
- GPG Community: https://www.gpgmail.org/community
Unlock the Future: Watch Our Essential Tech Videos!
You can skip right to the installation for Windows or macOS. GnuPG is included in all major Linux distributions.
Introduction
GnuPG or “GNU Privacy Guard” is a free and open source implementation of the OpenPGP standard. GnuPG was first released in 1997, and has been actively developed and updated ever since. It is primarily used to secure communications between two or more people, however, you can encrypt any file for personal storage as well. Encryption can be done with the latest secure methods either by public key cryptography via RSA or ECC, or symmetric cryptography via AES or other ciphers.
Public Key Cryptography
Public key cryptography, also known as asymmetric cryptography, works by using someone else’s public key to encrypt information that they can decrypt with their private key. The idea is that only that person has possession and control of their private key, therefore you can be sure that they are the only person that can access the data. However, you should be sure that the public key you are using actually belongs to the intended recipient.
As a side note, you can use your private key to sign data so that the recipient knows that you sent it and that it hasn’t changed since you signed it.
Symmetric Key Cryptography
Symmetric key cryptography works by setting a password, and using that password in some cipher to encrypt data. The recipient would then use that password to decrypt the data. The issue here is that the recipient must first know the password. The other concern is that the recipient may not be the only one who knows the password, also the password could be brute-forced. As of this writing, GnuPG uses the AES256 cipher, so you know your data is secured, as long as the password isn’t compromised.
Installation on Windows
GnuPG can be installed on Windows through the official installer or via Gpg4Win. We’ll covering the official installer, as that is all that is needed for basic functionality. If you would like a graphical interface, you can use Gpg4Win if you choose.
- Visit https://gnupg.org/ftp/gcrypt/binary/ in your browser and select the most recent version.
- As of this writing the lastest installer is
gnupg-w32-2.3.3_20211012.exe
- As of this writing the lastest installer is
- Run the installer. You may need to provide administrator access.
- Open a terminal or powershell window.
- Type in
gpg --version
- You should get something similar to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
PS C:\Users\User> gpg --version gpg (GnuPG) 2.3.3 libgcrypt 1.9.4 Copyright (C) 2021 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: C:\Users\User\AppData\Roaming\gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 AEAD: EAX, OCB Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 |
Installation on macOS
GnuPG can be installed on macOS through Homebrew, via GPGSuite or gpgOSX. I’ll be covering the Homebrew method, as that is all that is needed for basic functionality. If you would like a graphical interface, you can use GPGSuite if you choose.
- If Homebrew is not installed, follow the instructions at https://brew.sh
- Once Homebrew is installed run
brew install gnupg
in a Terminal window. - Now that GnuPG is installed, run
gpg --version
in the terminal.- You should get something similar to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
~/ > gpg --version gpg (GnuPG) 2.3.3 libgcrypt 1.9.4 Copyright (C) 2021 Free Software Foundation, Inc. License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: /Users/User/.gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 AEAD: EAX, OCB Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 |
Introduction
This guide will show you how to use the free public key cryptography system, GNU Privacy Guard (GnuPG or GPG). GPG provides functions to encrypt and decrypt data and to create and verify signatures using public key cryptography.
While GPG is available for many different platforms, including Windows, the instructions given here are Windows-oriented. This guide will focus on using Gpg4win, the Windows version of GnuPG, featuring several tools that integrate seamlessly with Windows, including Kleopatra, GPA, GpgOL, and GpgEX.
Installing Gpg4win
GNU Privacy Guard is available for free from www.gnupg.org for various operating systems, including Windows, Linux, many other flavors of Unix, and Mac OS X.
Installing in Windows
To install Gpg4win on Windows, follow these steps:
- Download Gpg4win: Visit the Gpg4win website and download the latest version (currently 4.3.1).
- Run the Installer: Launch the downloaded installer and follow the prompts. Ensure all components (GnuPG, Kleopatra, GPA, GpgOL, and GpgEX) are selected.
- Edit Your PATH: After installation, edit your PATH environment variable so that Windows knows where to find the program. In Windows 10/11, go to
Control Panel > System and Security > System > Advanced system settings > Environment Variables
, then edit thePath
variable to include the directory where GPG is installed, typicallyC:\Program Files (x86)\GnuPG\bin
.
Now you need to make that PATH change effective. Start a fresh command prompt and type:
You should see output similar to:
gpg (GnuPG) 2.2.27
libgcrypt 1.8.7
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: C:/Users/YourName/AppData/Roaming/gnupg
Verifying Your GPG Download
To verify the authenticity of your GPG download, you can use a program called sha256sum. Here’s how:
- Download sha256sum: Download sha256sum.exe from a reliable source and place it in a convenient directory.
- Verify the GPG Installer: Open a command prompt and navigate to the directory where the GPG installer is located.
- Type:
sha256sum gnupg-w32-2.2.27_20210325.exe
- Compare the Hash: Compare the output hash with the hash provided on the GPG website. If they match, your download is authentic.
Creating Your Personal Key Pair
GPG uses public key cryptography for encrypting and signing messages. Public key cryptography involves a public key, which is distributed to the public and is used to encrypt messages to be delivered to you and to decrypt signatures you have created, and a private key, which complements your public key by allowing you to decrypt messages you receive and to encrypt signatures.
About Key Security
When you create a key pair, both your public and private keys must be stored on your computer. This creates a security risk because anyone who gains access to your private key can decrypt your messages and impersonate you. GPG encrypts your private key using a passphrase. Each time you perform an operation involving your private key, GPG reads the encrypted key from the disk, prompts you for your passphrase, decrypts the key in memory, and finally uses it.
Using the GPG Gen-key Command
To generate your personal key pair, at the command prompt, type:
Follow the prompts to select the key type (RSA and RSA), key size (3072 bits recommended), and key expiration (choose a reasonable time period or set to never expire). Enter your real name, email address, and an optional comment. Finally, enter a strong passphrase.
Generating a Revocation Certificate
A revocation certificate allows you to revoke your public key if your private key is lost or compromised. To generate a revocation certificate, at the command prompt, type:
gpg --output revocation.crt --gen-revoke "Your Name"
Store the revocation certificate in a secure location, separate from your private key.
Publishing Your Public Key
To transmit your public key over the Internet, export it to ASCII format. Open a command prompt window and go to a folder where you want to place the exported key. Type:
gpg --armor --output "key.txt" --export "Your Name"
You can share the contents of key.txt via email or upload it to a public key server.
Here is an example of what your public key might look like:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.2.27 (GNU/Linux)
mQENBGAZ2ZoBCAC7bsfDprfEYglZKf91zwm3opm0UbjsHTCjLBM/F7/BP4xNMe0I
dD+omDbo/e6+omrfOM7gOEv6PnR7PeVsHj4ZT9iz49IabXLEON8x7Y4XpEFMLi8W
OSdyXfZFYOn7n8kk3Fdv/tOvwR1nH9UAK4QlsLv/CmNClf1r2dXWJ7NHlm5Yw7L6
gfYBNzYWvLtZ8jZsbXoHHYrhEJSmJ50i3+4MdV2ImOwTxrJ+ECb4KUZVuKvvAlTG
Av5ZajJ+S9+ffCwUCAQL1nKBdFpeX5dFBrRBpVf/WGbc7tCv6Bb+9XOPVbU4QlCz
SK8p0L8Rnkhldgy0nPcdErPSRDSF/b8GLUnPABEBAAG0I1lvdXIgTmFtZSA8eW91
ck5hbWVAYmFybGV5c21pdGguY29tPokBVAQTAQgAPhYhBC+QXfrtAsb4p4T9IN5+
9NTnP8u5BQJgmfdqAhsDBQkDw7dXAhoEFQgKAgMWAgECGQECGwMCHgEAAAxGCBYJ
AAYDAwMCAQgCAQgDAgIVgRZIwEAAAQgJQMBEBN0cXGZ7uRI5K9BJpLM9H7AxE1JN
gjjHb0oDr0v9IRRBhDo0iYgsgYX7XqFJKwHAOdI4Hj73O6Zfy3Pr+X0bbU8VbH/Z
gL2WNLwsD96aWxOtPhkjFayZ6DgdPVSDOrRtmsPB6HtTOjht5CEkESsGVqov6eDw
IgKkIIdGg7Ej8X5gUIgO+K8hyOAHNfF5ch9NuNP9D8LrPrQSEHedG6JWehdhR7y5
UnOUpRSPIgOmD6kDxm5a5umv7LKHX/BOJWXcYo3CympZ9uAnDxB46PCbSt1qCxhD
ABAFmyAik4Gc51OozjqxGePfwspM1x8a7tOsW7v5JQ67hsIfdXqMhSxA8F2ZWQ2R
Y9K5J2fnfTUnM1ox
=sdr1
-----END PGP PUBLIC KEY BLOCK-----
Backing Up Your Keys
Keep your GPG key files safe. Locate the files pubring.kbx
, secring.gpg
, and trustdb.gpg
(usually in C:\Users\Name\AppData\Roaming\gnupg
) and copy them to a safe location, such as an external drive or cloud storage.
Listing Your Keys
To list the keys on your keyring, at the command prompt, type:
You will see a list of all the public keys stored in your keyring. Here’s an example of what the output might look like:
C:\Users\YourName>gpg --list-keys
C:/Users/YourName/AppData/Roaming/gnupg/pubring.kbx
--------------------------------------------------
pub rsa3072 2024-04-10 [SC] [expires: 2026-04-09]
1234567890ABCDEF1234567890ABCDEF12345678
uid [ultimate] Your Name <your.email@example.com>
sub rsa3072 2024-04-10 [E] [expires: 2026-04-09]
pub rsa3072 2023-01-01 [SC] [expires: 2025-01-01]
ABCDEF1234567890ABCDEF1234567890ABCDEF12
uid [ultimate] John Doe <john.doe@example.com>
sub rsa3072 2023-01-01 [E] [expires: 2025-01-01]
Encrypting and Decrypting Files
GPG can encrypt and decrypt files using public key cryptography. When you encrypt a file, GPG uses the public key of the recipient to encrypt the file. The recipient can then decrypt the file using their private key. When you decrypt a file, GPG uses your private key to decrypt the file.
Using the GPG Encrypt Command
To encrypt a file, at the command prompt, type:
gpg --recipient "Recipient Name" --output "encryptedfile.gpg" --encrypt "plaintextfile.txt"
This will create an encrypted file named encryptedfile.gpg
.
Using the GPG Decrypt Command
To decrypt a file, at the command prompt, type:
gpg --output "decryptedfile.txt" --decrypt "encryptedfile.gpg"
Enter your passphrase when prompted.
Signing Files
GPG can sign files to ensure their integrity and authenticity. When you sign a file, GPG uses your private key to create a digital signature. The recipient can then verify the signature using your public key.
Using the GPG Sign Command
To sign a file, at the command prompt, type:
gpg --local-user "Your Name" --output "signedfile.sig" --sign "file.txt"
Verifying a Signature
To verify a signed file, at the command prompt, type:
gpg --verify "signedfile.sig"
GPG will check the signature and report whether it is valid.
Integrating GPG into Your Workflow
GPG can be integrated into various workflows, including email encryption and decryption, and securing files for transmission over the internet.
Encrypting and Signing an Email
To encrypt and sign an email, first compose the email and save it as a text file. Then, at the command prompt, type:
gpg --local-user "Your Name" --recipient "Recipient Name" --armor --sign --output "email.asc" --encrypt "email.txt"
Decrypting and Verifying an Email
To decrypt and verify an email, save the received email content to a file and at the command prompt, type:
gpg --decrypt "email.asc"
Conclusion
GnuPG and Gpg4win provide robust tools for securing your digital communications. By following this guide, you can encrypt and sign your emails and files, ensuring your privacy and the integrity of your communications. For more detailed information, refer to the Gpg4win Compendium.
Visit the Email Self-Defense site to learn more about why and how to use GnuPG for your electronic communication. Reconquer your privacy today by incorporating these powerful encryption tools into your daily digital interactions.