• Stars
    star
    213
  • Rank 185,410 (Top 4 %)
  • Language
    C++
  • License
    Other
  • Created about 7 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The multiversal cryptoengine!

Gitter Build Status Code Coverage

NeoPG implements the OpenPGP standard.

NeoPG is written in C++11. It starts out as an opinionated fork of the GnuPG code base, and hopefully will evolve to something entirely different.

For now, many parts of NeoPG are licensed by the upstream authors under various licenses, including GPL and LGPL variants. Please refer to the copyright notice at the top of every file.

New source code contributed by the NeoPG authors is licensed under the permissive Simplified BSD license (the same license as Botan, the cryptography library we want to use).

AT THIS TIME, THE COMPLETE WORK IS NECESSARILY LICENSED UNDER THE MOST RESTRICTIVE LICENSE OF ANY OF ITS PARTS, THE GPLv3. See the file license.txt for details.

The dependencies are also released under their respective various licenses.

Note: As we are using libcurl, you might have to pay attention to possible license incompatibilities between the GPL as used by the legacy gnupg code and the TLS library linked to libcurl. In the future, when libcurl supports Botan as TLS option, we might include a copy and link statically to make this easier.

Status

Currently, NeoPG is under development, and in an exploratory phase. No promises are made about the stability, functionality, and security of the development releases "0.0.x". I am actively seeking feedback and guidance for the API design and scope of functionality from users and application developers.

From a purely practical point, the software should build and run, and a lot of legacy functionality is available through the "gpg2", "gpg-agent", "dirmngr" etc. subcommands. New subcommands are introduced as functionality is added or replaced.

From an organizational point of view, this is currently a one-man project without third-party funding. A significant amount of time is spent on developing a more substantial basis for the project. So you will see periods of coding activity, but also periods of organizational activity (such as talks, and grant application writing).

Installation

Supported Compiler Versions

  • Ubuntu 14.04.5 LTS: GCC 4.9, 5, 6, 7
  • Ubuntu 14.04.5 LTS: Clang 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 5.0
  • MacOS: Xcode 6.4, 7.3, 8.3, 9.1

GCC 4.8 is not supported (see nlohmann/json).

Dependencies

Aside from a working C++ toolchain you'll need the following libraries.

  1. CMake >= 3.2
  2. SQLite >= 3.0
  3. Botan >= 2.0 --with-zlib --with-bzip2
  4. Boost >= 1.64.0
  5. libcurl >= 7.49.0
  6. gettext-tools

Make

With all dependencies installed NeoPG can be build with CMake.

$ git submodule update --init
$ cmake -H. -Bbuild
$ cmake --build build
$ cmake --build build --target test # opt: ARGS=-V or CTEST_OUTPUT_ON_FAILURE=1

To install (default is /usr/local)

$ cmake --build build --target install

To change default installation, set cmake parameter CMAKE_INSTALL_PREFIX for example:

$ cmake -H. -Build -DCMAKE_INSTALL_PREFIX=<path>

Select your compiler and language version by setting CXX and CXXSTD environment variables, e.g.:

$ CXX=clang++-5 CXXSTD=14 cmake -H. -Bbuild

or set cmake parameter CMAKE_CXX_COMPILER CMAKE_CXX_STANDARD

Legacy support

You can create links to the neopg binary under a name that ends with a legacy subcommand. If called through such a link, neopg will invoke that subcommand directly. For example, neo-gpg2 --version would be the same as neopg gpg2 --version, and so on. Examples for names that would behave that way are neopg-gpg2, neo-gpg2, neogpg2, gpg2 etc. Here is a list of supported endings:

Ending Subcommand
gpg gpg2
gpg2 gpg2
agent agent
scd scd
dirmngr dirmngr
dirmngr-client dirmngr-client

Development

Development builds have extra dependencies:

  1. gcovr (make coverage)
  2. clang-format (make pretty)
  3. cppcheck (make lint; TODO: Replace with cmake-tidy?)
  4. doxygen (make doc)

To enable a debug build, set the CMAKE_BUILD_TYPE flag (default is Release):

$ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON ..
$ cmake --build build --target coverage

Other targets:

$ cmake --build build --target pretty        # Run clang-format on all source files
$ cmake --build build --target lint          # Run cppcheck
$ cmake --build build --target coverage      # Just coverage.info for codecov.io
$ cmake --build build --target coverage-html # Local HTML report
$ cmake --build build --target coverage-data # Cobertura XML report

TODO

  • format strings for list-keys etc

Code metrics:

  • sloccount, git-loc
  • secretgrind
  • sonarqube

Windows

  • chocolatey

macOS

  • brew (homebrew)

openpgp profile

  • ascii armor default
  • auto keylocate default auto keyretrieve
  • dirmngr: hkps connections should default to system trust if --hkp-cacert is not given

Hacking

Fedora

To get started on Fedora 28, or later, do the following.

# Install dev dependencies
$ sudo dnf install -y \
    boost-devel \
    botan2-devel \
    cmake \
    gcc-c++ \
    gcovr \
    git \
    gnutls-devel \
    lcov \
    libusbx-devel \
    python \
    sqlite-devel \

# Clone repo and build
$ git clone --recursive [email protected]:das-labor/neopg.git
$ cmake -Hneopg -Bneopg/build
$ cmake --build neopg/build

macOS

To get started on macOS, follow these steps. For the dependencies use a package manager like Homebrew:

$ brew install botan boost cmake doxygen gettext

By default homebrew does not link the gettext binaries into the path, to enforce this:

$ brew link gettext --force

Build it!

# Clone repo and build
$ git clone --recursive [email protected]:das-labor/neopg.git
$ cmake -Hneopg -Bneopg/build
$ cmake --build neopg/build

Have fun!

More Repositories

1

panopticon

A libre cross-platform disassembler.
Rust
1,426
star
2

legacy

C
34
star
3

badge-2021

Badge for Labortage 2021
Python
11
star
4

librfm12

The popular rfm12 library for avr microcontrollers
C
11
star
5

laser-exposer

Firmware and control software for a device that exposes PCBs with a laser
C#
10
star
6

xbx

XBX Embedded Hashing
9
star
7

borgware-2d

Firmware for AVR driven LED matrices (especially LABOR Borgs)
C
6
star
8

badge-2021-rs

Rust on the 2021 badge (ESP32)
Rust
4
star
9

workadv_das-labor

Workadventure map for das-labor
HTML
4
star
10

server

Our ansible and docker scripts for server management.
Dockerfile
4
star
11

overlay

Gentoo labor overlay
Shell
4
star
12

das-labor.sexy

The sexy landing page of the
CSS
3
star
13

SerialUSB

serialUSB is a c code-example for STM32F4xx. It will create a virtual com port VCP using the built in USB device stack. On the host PC the VCP acts like a physical terminal (COM-port).
C
3
star
14

libmicro

Library that combines avr and can low level functions
C
2
star
15

labdesign

Design and PR Material
TeX
2
star
16

labcontrol

C
2
star
17

cand

The ultimate CAN protocol daemon for linux and windows used in home automatisation
C
2
star
18

openSVLEDBar

Open Source Firmware for a known product series of LED Bars
C
2
star
19

repaircafe-bochum.de

Code of repaircafe-bochum.de
JavaScript
2
star
20

dvbt

Python
2
star
21

RGB-Laser-DMX-Addon

Eagle
1
star
22

dovetail

Ruby
1
star
23

shop.das-labor.sexy

Theme of our Magento instance
CSS
1
star
24

Voron24_01

1
star
25

Labor3D_Orca

Orca-Slicer configurations for the 3D-Printers @LABOR e.V.
1
star
26

kalender-mumble

Set the name of a mumble-channel depending on pending events
Python
1
star
27

treppenblink

C
1
star
28

10JahreLabor

1
star
29

USBasp

Eagle
1
star
30

powermeter

C
1
star
31

www-bin

random scripts glueing together some feeds
Ruby
1
star
32

lt15

Labortage 2015 website
HTML
1
star
33

Laborcandy

Creating charts about the ingredience of candy at our hackerspace in 'R'
R
1
star
34

Stimmmopped

Diese Stimmgerรคt funktioniert rein optisch auf Basis des Stroboskoeffekts, indem es die Saite in der richtigen Frequenz impulsweise kurz anleuchtet.
C
1
star
35

powercommander

C
1
star
36

labor-scripts

Small programs and scripts for hackerspace infrastructure and automation https://wiki.das-labor.org/w/Projekt/Server_Scripte
Shell
1
star
37

automatization4.0

Automatization of our Hackerspace
C
1
star
38

labtouchcontrol

C
1
star
39

nixie-clock

Nixie-Uhr im Labor
Eagle
1
star
40

labortage2011badge

Eagle
1
star