Giter Site home page Giter Site logo

seafile-cryptostick's People

Contributors

ggkitsas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

seafile-cryptostick's Issues

order of buttons

In the "sync library" window and others, the order of buttons is confusing. It should be this order: Cancel, OK (from left to right). Even though this seems like an irrelevant bug, it confused several test users which accidentally pressed Cancel instead of OK.

backup keypair to file

When generating a key-pair for Crypto Stick, user should have the option to create a file backup

Possible formats:

  • PKCS12
  • OpenPGP

Initial file indexing not working

When a new library is created using Crypto Stick, the files that exist in the folder to be synced (and sub-folders) are not sync.
The folder structure is saved correctly to the server.

On the other hand, when a file is edited, is it synced correctly.

Mac OS port

Port seafile with Crypto Stick feature to Mac OS.
Needed changes should be at Crypto Stick pcsc driver

Show 'tries left' in user/admin pin dialogs

Get the value of the retry counter for user/admin pins from the smart card and dislpay to the password dialogs.

Refresh the value every time the user inserts a wrong pin

Library integrity verification

Each file of a library is to be hashed and the list of filehashes of the library should be equipped with a timestamp and signed by the public key of the Crypto Stick. This allows to verify if all uploaded files could be retrieved and are integer.

Smart card driver integration

Smart Card Drivers

Create an abstraction layer to the smart card drivers. This layer should define the high level operation needed by the client. Also it should abstract the OS's driver usage details.

Error message when importing backup keys

when importing the backup, i get an error message "incorrect cryptostick". however, the actual import seems to have worked correctly. i can just press OK a second time and get the library resynced as expected.

Full support of GnuPG keyrings

Seafile should be able to work with GnuPG keyrings.

This includes parsing subkey signatures to determine the type of usage (authentication, encryption, signing) of each subkey and importing them to the device.

Windows port

Port seafile with Crypto Stick feature to Windows OS.
This task should need modifications to the Crypto Stick pcsc driver

Workflow for generating keys

I generated a key. after pressing OK in the "Generate Key Pair" dialog, i got back to the previous window where i create a new library. this confused me and i was wondering if the key generation failed or succeeded. suggestions:

  • Add a confirmation dialog. e.g. "Keys for your Crypto Stick have been generated successfully." and:
  • Not move back to the earlier create-library window, because i confirmed this already. instead close it and move to the main window. this implicates that the dialog "you don't created a password" should become BEFORE the Generate keys dialog.

The flow would be like this:

  1. create library
  2. confirm really-no-password?
  3. generate key pair
  4. success message
  5. main window

Generate strong random password for libraries

  • Change password's length lower limit to 8 characters long
  • Add a random password generator
  • Gui modifications include a button for requesting password generation, visible password field and password strength bar

Password and Crypto Stick protected library at the same time

User should have the option to use a password and a cryptostick for protecting libraries.
With this feature, a library can be shared using the password and the user that created it can authenticate herself using either the Crypto Stick or the password.

Sharing using OpenPGP

Sharing option could be used with OpenPGP.

First option is to share the .keys file (and the password that was used to encrypt this file) with all the members of a team. Each member then can import the keys from the file to a device and access the library.

Second option is that the owner of the library asks the public key of each new member and registers them to the server.

The first option has the advantage of simplicity, because only one device is needed to be registered to the server
The second option is more secure because no passwords are transfered using another communication channel (possibly insecure). It also provides the freedom that each user can use each own key pair without having to erase and import keys to her device.

Using Mutliple Crypto Sticks

User should be able to use more than one Crypto Stick to protect a library.
This feature will be usefull for shared libraries, where each user has it's own Crypto Stick

A Security Settings dialog should be present, with a corresponding right click menu entry for the listed libraries. This dialog shold give the user the capability to add and remove Crypto Stick devices.

blank Crypto Stick not recognized

When using a blank Crypto Stick without keys, the device is detected successfully and can be selected to encrypt a library. But later the process fails with "Selected Cryptostick not found. Check if it was accidentially unplugged."

Quick fix Display a message to the user, informing her to initialize the Crypto Stick with keys.
Proper solution: Integrate functionality to generate keys directly within the application.

Auto detect smart card enabled libraries

Libraries that are protected with a smart card should have disabled the password fields on the create and download dialogs.

Also may use a new icon when presented at the library list.

Ublocking smart card through Seafile's gui

If the smart card is blocked due to many unsuccessful PIN verification tries, the user should be able to unblock the card using the admin password.

Needed functionality:

  • detecting when a smart card is blocked
  • ask admin PIN and verify it

allow changing the PINs

add a feature to allow changing the default PINs. this would be required for users which have a blank device and don't want to use any other software.

Cryptostick GUI modifications

GUI changes

  1. Smart card authentication dialog asking for the PIN
  2. Choice to authenticate using a Crypto Stick to all existing dialogs that need authentication
  3. Warning/question message boxes
  4. Listing of cryptosticks to create repo dialog

Library keys should not be created at the server side

When creating a new encrypted library, the procedure is the following:

  • The password/puk is sent to the server
  • Server creates a random AES key
  • Server encrypts the AES key using the password/puk

This procedure must be changed to:

  • Client/ Web browser creates a random AES key
  • Client/ Web browser encrypts the AES key
  • Client/ Web browser sends the encrypted AES key to server to be stored

Clearing password/key buffers with random data

When a buffer that is responsible for holding sensitive security data such as cryptographic keys or passwords is freed, it's contents should also be wiped out with random data to erase memory residues.

These buffers include:

  • User password for a library
  • Secret key of a library
  • User/Admin PIN of a smartcard

Crypto Stick Seafile installation with vanilla Seafile present

This is due to change of the schema of clone.db (under /.seafile-data.

Possible fixes:

  1. Programmatically detect if the needed table fields are missing and insert them
  2. Force the user to create new Seafile root folder, thus forcing Seafile to create new DBs

Add Crypto Stick support to Seafile client

General

Seafile client can secure and encrypt libraries using a user password.

The goal is to add functionality to Seafile client, such that a user can secure a library using a Cryptostick.

More specifically:

  1. User can choose to use Cryptostick to secure a library
  2. User can manage (add/remove) Cryptosticks
  3. Randomly generated strong user password

GUI changes

Some new controls and dialogs will be introduced.

  1. A smart card authentication dialog asking for the PIN
  2. Security Settings dialog with a corresponding right click menu entry for the listed libraries
  3. Choice to authenticate using a Cryptostick to all existing dialogs that need authentication
  4. Warning/question message boxes

Technical Details

Current Status

Libraries are encrypted using AES-256. The AES key is referred as secret key and produced randomly. This key is encrypted using a key derived from the user password and saved with the library's metadata. The resulting key is referred as the random key.
Also a magic is produced using the password and the library's id. The purpose of the magic is to
check if the given user password during authentication is correct. This is done by calculating the magic for this password and library and comparing it with the saved magic.
For the decryption procedure, first the magic is checked and, if the check is passed, the random key is decrypted (using the derived key from the password) to obtain the secret key. Then the secret key is given to AES and the decryption takes place.

Cryptostick feature

This feature's goals are:

  • The user can authenticate using a Cryptostick
  • User can authenticate with a password
  • Is possible to use many Cryptosticks
  • Management of registered Cryptosticks and user password
  • Randomly generated strong user password

To add Cryptostick support, we will encrypt the secret key using the smart card's public key and save the produced random key at the server side, within the library's metadata. Also the ID/serial # of the smart card must be saved and linked with the specific random key so during the authentication we can choose the corresponding key to decrypt.
The above require changes to the server. Specifically the server must be able to save and the produced random keys and the smart cards' IDs. Also the client/server communication protocol will need some changes too. The server's development takes place here:
https://github.com/ggkitsas/seahub-cryptostick

forget library key

For encrypted libraries, Seafile stores the password or library key at the client system. When starting Seafile it doesn't require the user to enter the library password. This is a security flaw. Instead Seafile should never store the library key/password and ask the user during startup. The same is true for the Crypto Stick integration.

type:security

Security: Static salt usage with repo password

The salt used with the KDF for producing the secret key of a new library is static.
This means that all libraries have the same salt
Also there is an instance of usage of this KDF when creating session keys for communicating with the server

Generate and Import keys to blank cryptostick

Create a dialog for generating and importing keys to a blank cryptostick.
This dialog opens when a blank cryptostick is selected by the user to create a library.
It should also have the option to keep a backup file (p12) of the key pair.

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.