Giter Site home page Giter Site logo

paolostivanin / otpclient Goto Github PK

View Code? Open in Web Editor NEW
441.0 9.0 44.0 1.85 MB

Highly secure and easy to use OTP client written in C/GTK3 that supports both TOTP and HOTP

License: GNU General Public License v3.0

C 97.71% CMake 2.03% Shell 0.26%
c gtk3 hotp totp otp gnome 2fa 2fa-client 2fa-security 2factor

otpclient's Introduction

OTPClient

CircleCI Coverity Scan Build Status

Highly secure and easy to use GTK+ software for two-factor authentication that supports both Time-based One-time Passwords (TOTP) and HMAC-Based One-Time Passwords (HOTP).

Requirements

Name Min Version
GTK+ 3.24
Glib 2.68.0
jansson 2.12
libgcrypt 1.10.1
libpng 1.6.30
libcotp 3.0.0
zbar 0.20
protobuf-c 1.3.0
protobuf 3.6.0
uuid 2.34
libsecret 0.20
qrencode 4.0.2

⚠️ Please note that the memlock value should be >= 64 MB. Any value less than this may cause issues when dealing with tens of tokens (especially when importing from third parties backups). See this wiki section for info on how to check the current value and set, if needed, a higher one.

Features

  • integration with the OS' secret service provider via libsecret
  • support both TOTP and HOTP
  • support setting custom digits (between 4 and 10 inclusive)
  • support setting a custom period (between 10 and 120 seconds inclusive)
  • support SHA1, SHA256 and SHA512 algorithms
  • support for Steam codes (please read THIS PAGE)
  • import and export encrypted/plain andOTP backup
  • import and export encrypted/plain Aegis backup
  • import and export plain FreeOTPPlus backup (key URI format only)
  • import and export encrypted/plain AuthenticatorPro backup
  • import and export encrypted/plain 2FAS backup
  • import of Google's migration QR codes
  • local database is encrypted using AES256-GCM
    • key is derived using PBKDF2 with SHA512 and 100k iterations
    • decrypted file is never saved (and hopefully never swapped) to disk. While the app is running, the decrypted content resides in a "secure memory" buffer allocated by Gcrypt

Testing

  • Before each release, I run PVS Studio and Coverity in order to catch even more bugs.
  • With every commit to master, OTPClient is compiled in CircleCI against different distros

Protobuf

The protobuf files needed to decode Google's otpauth-migration qr codes have been generated with protoc --c_out=src/ proto/google-migration.proto

Wiki

For things like roadmap, screenshots, how to use OTPClient, etc, please have a look at the project's wiki. You'll find a lot of useful information there.

Manual installation

If OTPClient hasn't been packaged for your distro (check here) and your distro doesn't support Flatpak, then you'll have to manually compile and install OTPClient.

  1. install all the needed libraries listed under requirements
  2. clone and install OTPClient:
git clone https://github.com/paolostivanin/OTPClient.git
cd OTPClient
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install

License

This software is released under the GPLv3 license. Please have a look at the LICENSE file for more details.

otpclient's People

Contributors

1peter10 avatar a1346054 avatar bertob avatar brianjmurrell avatar bsd-source avatar chrislauinger77 avatar crrodriguez avatar dawidd6 avatar franciscopombal avatar fvcr avatar glitsj16 avatar her001 avatar hubnut avatar maxice8 avatar michalborek avatar milaq avatar mpolr avatar neoflexx726 avatar pabloyoyoista avatar paolostivanin avatar ph1l avatar simonrepp avatar supersandro2000 avatar theo546 avatar tingping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

otpclient's Issues

add icons to treeview

  • download favicon/icon
  • optional feature, disabled by default

⚠️ this would increase the db size quite a bit, thus making it more difficult to store all the data in memory. I can see only three options here:

  1. don't implement this feature
  2. icons are downloaded every time the app is launched
  3. refactor the app to load in secure memory only the important stuff and not the icons

secure memory

Currently, the program is trying to allocate MAX_FILE_SIZE bytes of secure memory. It can be that a system doesn't have so much secure memory available.

  1. reduce sec mem size
  2. use mlock on normal memory
  3. erase normal memory
mlockall(MCL_CURRENT | MCL_FUTURE)

cloud sync

It would be handy to have a cloud backup option integrated directly into the software.
Providers that could be supported:

  • webdav
  • dropbox
  • google drive
  • ...

update docu

  • Mac OS 10.13 works again (update installation instruction for jansson)
  • new screenshots

duplicates handling

  • prevent duplicates to be added on import
  • show warning when a duplicate wasn't added

default secure memory pool size on ubuntu 16.04

On Ubuntu 16.04, the secure memory pool can only be increased by root (so only 16 KB can be used by default). This means that either the app has to run with sudo or it must be installed as "setuid(root)".

edit fields

add possibility to edit issuer and label fields

Easier token add (scan/upload barcode)

The token add workflow is a bit scary for newer users (lots of text boxes without much explanation). It should be possible to make a simpler capture experience - perhaps by using a laptops webcam and a QR code parsing library - or more clearly explaining how to get the information for a series of popular services.

use ui files

use .ui files to create the ui. This will reduce the amount of code and make the codebase more maintainable

add icon

I have no graphic skills, so I can't create a nice icon :(

Needed icons would be:

  • 32x32
  • 64x64
  • 128x128
  • 256x256
  • 512x512

add flatpak

Packaging is really time expensive, thus only sources and flatpak will be available

Wrong app-id

In main.c you use org.gnome.OTPClient instead of com.github.paolostivanin.OTPClient.

Explain why you want the password

I installed the OTPClient flatpak and the first thing I was presented with was a dialog window that just asked for my password twice. Now having a read into this a little bit i knew why, and wasn't too distressed but a less educated user would be somewhat disturbed. It might be nice to explain a little more about why you want a password and what it'll be used for.

Create a blank slate experience

When you start the application for the first time you get a fairly unfriendly blank slate experience with and empty list and a countdown above it that doesn't apply to anything.

Ideally there would be a custom blank slate experience that shows the user that they need to press the + button to add a token or use the menu to import.

Prepare release v1.2.0

  • update screenshosts ✔️
  • update appdata file ✔️
    • update also screenshots urls ✔️
  • test on:
    • ubuntu 18.04 ✔️
    • debian 9 ✔️
    • fedora 27 and 28 ✔️
    • arch linux ✔️
    • flatpak ✔️
  • update flatpak manifest on flathub with new deps and settings (dbus and webcam access) ✔️
  • create detached signature (#85) ✔️

improve UI and add keyboard shortcuts

Evaluate switch to GtkListBox and global ui file:

  • cleaner ui
  • can be used on small screen (eg, librem 5)
  • accels can be easily added when using one single ui file
  • codebase becomes cleaner if the ui part is taken out

add select from file option

Taking a screenshot is not enough because this feature needs gnome-shell. In order to facilitate the import operation on other DEs, a "select from file" option should be implemented.

add CI

Would be nice to have distro specific deb and rpm. Should think about setting up something

flatpak hardening

  • use only a specific folder (for example, app's .config folder)
  • update manifest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.