26

GitHub - cossacklabs/themis: Easy to use cryptographic framework for data protec...

 5 years ago
source link: https://github.com/cossacklabs/themis
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Themis provides strong, usable cryptography for busy people

Themis provides strong, usable cryptography for busy people


GitHub release Circle CI Bitrise Platforms Coverage Status 68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f636f737361636b6c6162732f7468656d6973

General purpose cryptographic library for storage and messaging for Swift, Obj-C, Android, desktop Java, С++, Node.js, Python, Ruby, PHP, Go, Rust. Hides cryptographic details. Made by cryptographers for developers ?

Crypto systems

Themis is an open-source high-level cryptographic services library for mobile and server platforms that provides secure data exchange, authentication, and storage protection. Themis provides ready-made building components, which simplify usage of core cryptographic security operations.

Themis provides 4 important cryptographic services:

  • Secure Cell: a multi-mode cryptographic container suitable for storing anything from encrypted files to database records and format-preserved strings. Secure Cell is built around AES-256 in GCM (Token and Seal modes) and CTR (Context imprint mode).
  • Secure Message: a simple encrypted messaging solution for the widest scope of applications. Exchange the keys between the parties and you're good to go. Two pairs of underlying cryptosystems: ECC + ECDSA / RSA + PSS + PKCS#7.
  • Secure Session: session-oriented encrypted data exchange with forward secrecy for better security guarantees and more demanding infrastructures. Secure Session can perfectly function as socket encryption, session security, or a high-level messaging primitive (with some additional infrastructure like PKI). ECDH key agreement, ECC & AES encryption.
  • Secure Comparator: Zero knowledge-based cryptographic protocol for authentication and comparing secrets.

We created Themis to build other products on top of it - i.e. Acra and Hermes.

Easy to use, hard to misuse

Implementing cryptography in applications is often hard. Choosing cipher suites, defining key lengths, and designing key exchange schemes require plenty of particular competencies and lead to mistakes when done by applied developers.

Themis was designed to provide complicated cryptosystems in an easy-to-use infrastructure, with modern rapid development in mind:

  • EASY: Themis does not require users to obsess over parameters, cipher combination, IV, salt, yet it provides high levels of security.
  • DO YOUR THING: Themis allows developers to focus on the main thing: developing their applications.
  • BEST PRACTICE: Themis is based on the best modern practices in implementing complicated security systems.

Themis relies on the best available open-source implementations of cryptographic primitives (ciphers).

Quickstart

Install from package managers

The easiest way to install Themis is to use package repositories for your OS and language. Package repositories contain stable versions of Themis, prebuilt and packaged for the most widely-used systems.

Installation for server-side platforms (like Linux, Debian, Ubuntu, macOS) consists of two parts: installing Themis Core library into the system and installing Themis language wrapper to use from your application. Refer to the Installation guide.

Installation for mobile platforms (iOS, Android) is easier: just use package manager popular at this platform. Refer to the Installation guide.

Install from sources

If you need the latest development version of Themis or your system is not supported yet, you can build and install Themis from GitHub source code.

Languages

Themis is available for the following languages/platforms:

Platform Documentation Examples Version ? Swift (iOS, macOS) Swift Howto docs/examples/swift CocoaPods ? Objective-C (iOS, macOS) Objective-C Howto docs/examples/objc CocoaPods ☕️ Java (Desktop) Java & Android Howto Java projects

☎️ Java (Android) Java & Android Howto Android projects maven ♦️ Ruby Ruby Howto docs/examples/ruby Gem ? Python Python Howto docs/examples/python PyPI ? PHP PHP Howto docs/examples/php

➕ C++ CPP Howto docs/examples/c++

? Node.js Node.js Howto docs/examples/js npm ? Go Go Howto docs/examples/go

? Rust Rust Howto docs/examples/rust crates ? С++ PNaCl for Google Chrome

WebThemis project

Want to jump straight to the documentation? Please head over here.

Plugins

Themis-based plugins are built to enable Themis' features across various platforms and products:

Availability

Themis supports the following architectures: x86/x64, armv*, various Android architectures.

It is checked to compile on the latest stable versions of:

  • Debian (8, 9), CentOS 7, Ubuntu (14.04, 16.04, 18.04),
  • macOS (10.12, 10.13, 10.14),
  • Android (4 - 9) / CyanogenMod 11+,
  • iOS (9 - 12).

We plan to expand this list with a broader set of platforms. If you'd like to help improve or bring Themis to your favourite platform / language — get in touch.

Tutorials

As long as it remains feasible, we'll be accumulating the list of all our tutorials on how to use Themis in different cases here:

Sample projects

During the development stage, we frequently do Proof-of-Concept projects to test different assumptions. They serve as interesting demos (examples) of what Themis is capable of:

Demo Description Repo Blog post 0fc Anonymous web chat
* Python
* webthemis (C++ + HTML/JS) repo blog post Sesto Secure storage
* Python
* webthemis (C++ + HTML/JS) repo blog post Swift Alps demo Secure communication (iOS app with Python server based on Secure Session)
* Swift
* Python repo slides Zero-Knowledge
Architectures
workshop iOS app for storing and sharing encrypted notes stored in Firebase database
* Swift repo

Java and
Android examples A set of handy examples that show how to encrypt data for storing (Themis Secure Cell) or for sending it to peers (Themis Secure Message and Themis Secure Session)
* Java repo

Android secure storage
library SecureStorage is used for keeping private information in a safe mode without requiring a password or a fingerprint
* Java
* Kotlin repo

Themis Server

If you'd like to experiment with Themis in a more interactive environment, check out Themis Server interactive debugging environment for Themis. Themis Server can verify and decrypt the code encrypted by Secure Cell or Secure Message and provides a fully-functional backend for Secure Session. Examples for many languages are available in docs/examples/Themis-server.

Documentation

Documentation Server for Themis contains the ever-evolving official documentation, which covers everything from deployment guidelines to use cases, with brief explanations of cryptosystems and architecture behind the main Themis library.

Cryptography

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations, and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution make it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

Submitting apps to the App Store

If you’re using Themis as your means of encryption within your iOS/macOS app that you’re submitting to the App Store, your encryption falls under the “open source” exception (although if your app is not open source/distributed free of charge, we strongly recommend that you seek legal advice).

Themis is a free cryptographic library that builds on the existing, community-tested cryptographic instruments (OpenSSL, LibreSSL, BoringSSL, depending on the target platform). It is open source and Apache 2-licensed, with its full source code publicly available online on GitHub.

This means you should indicate that you’re using encryption and only submit annual self-classification reports. Read more about Apple regulations on cryptography.

Security

Each change in Themis core library is being reviewed and approved by our internal team of cryptographers and security engineers. For every release, we perform internal audits by cryptographers who don't work on Themis.

We use a lot of automated security testing, i.e. static code analysers, fuzzlers, memory analysers, unit tests (per each platform), integration tests (to find compatibility issues between different Themis-supported languages, OS and x86/x64 architectures). Read more about our security testing practices in a blog post.

If you believe that you've found a security-related issue, please drop us an email to [email protected]. Bug bounty program may apply.

Community

Themis is recommended by OWASP as data encryption library for mobile platforms.

Themis is widely-used for both non-commercial and commercial projects, some public projects can be found here. Android secure storage library by EPAM is using Themis under the hood.

Want to be featured on our blog and on the list of contributors, too? Write us about the project you’ve created using Themis!

Contributing to us

If you're looking for something to contribute to and gain eternal respect, just pick the things in the list of issues. Head over to our Contribution guidelines as your starting point.

Supporting Themis for all these numerous platforms is hard work, but we try to do our best to make using Themis convenient for everyone. Most issues that our users encounter are connected with the installation process and dependency management. If you face any challenges, please let us know.

Commercial support

At Cossack Labs, we offer professional support services for Themis and applications using Themis.

This support includes, but is not limited to the library integration, with a focus on web and mobile applications; designing and building end-to-end encryption schemes for mobile applications; security audits, for in-house library integrations or high-level protocol; custom application development that requires cryptography; consulting and training services.

Drop us an email to [email protected] or check out the DataGuardian assistance program.

Contacts

If you want to ask a technical question, feel free to raise an issue or write to [email protected].

To talk to the business wing of Cossack Labs Limited, drop us an email to [email protected].

Blog Twitter CossackLabs Medium CossackLabs Join the chat at https://gitter.im/cossacklabs/themis


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK