All Projects → terl → Lazysodium Android

terl / Lazysodium Android

Licence: mpl-2.0
An Android implementation of the Libsodium cryptography library. For the lazy dev.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Lazysodium Android

Pgsodium
Modern cryptography for PostgreSQL using libsodium.
Stars: ✭ 202 (+192.75%)
Mutual labels:  cryptography, encryption, decryption, libsodium
Easycrypt
Android cryptography library with SecureRandom patches.
Stars: ✭ 102 (+47.83%)
Mutual labels:  hashing, cryptography, encryption, decryption
Halite
High-level cryptography interface powered by libsodium
Stars: ✭ 933 (+1252.17%)
Mutual labels:  cryptography, encryption, libsodium, argon2
Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (+97.1%)
Mutual labels:  cryptography, encryption, decryption
Java Crypto Utils
Java Cryptographic, Encoding and Hash Utilities
Stars: ✭ 15 (-78.26%)
Mutual labels:  cryptography, encryption, decryption
Cryptr
A simple shell utility for encrypting and decrypting files using OpenSSL.
Stars: ✭ 81 (+17.39%)
Mutual labels:  cryptography, encryption, decryption
Simon speck ciphers
Implementations of the Simon and Speck Block Ciphers
Stars: ✭ 74 (+7.25%)
Mutual labels:  cryptography, encryption, decryption
Openssl
TLS/SSL and crypto library
Stars: ✭ 17,157 (+24765.22%)
Mutual labels:  cryptography, encryption, decryption
Enigma
Enigma cipher tool
Stars: ✭ 13 (-81.16%)
Mutual labels:  cryptography, encryption, decryption
Password4j
Password4j is a user-friendly cryptographic library that supports Argon2, Bcrypt, Scrypt, PBKDF2 and various cryptographic hash functions.
Stars: ✭ 124 (+79.71%)
Mutual labels:  hashing, cryptography, argon2
lazysodium-java
A Java implementation of the Libsodium crypto library. For the lazy dev.
Stars: ✭ 110 (+59.42%)
Mutual labels:  argon2, libsodium, decryption
Nsec
A modern and easy-to-use cryptographic library for .NET Core based on libsodium
Stars: ✭ 217 (+214.49%)
Mutual labels:  cryptography, encryption, libsodium
Webcrypto
W3C Web Cryptography API for Node.js
Stars: ✭ 79 (+14.49%)
Mutual labels:  hashing, cryptography, encryption
Gonnacry
A Linux Ransomware
Stars: ✭ 341 (+394.2%)
Mutual labels:  cryptography, encryption, decryption
Node Argon2
Node.js bindings for Argon2 hashing algorithm
Stars: ✭ 1,008 (+1360.87%)
Mutual labels:  hashing, encryption, argon2
Low Latency Android Ios Linux Windows Tvos Macos Interactive Audio Platform
🇸Superpowered Audio, Networking and Cryptographics SDKs. High performance and cross platform on Android, iOS, macOS, tvOS, Linux, Windows and modern web browsers.
Stars: ✭ 1,121 (+1524.64%)
Mutual labels:  hashing, cryptography
Fhe Toolkit Linux
IBM Fully Homomorphic Encryption Toolkit For Linux. This toolkit is a Linux based Docker container that demonstrates computing on encrypted data without decrypting it! The toolkit ships with two demos including a fully encrypted Machine Learning inference with a Neural Network and a Privacy-Preserving key-value search.
Stars: ✭ 1,123 (+1527.54%)
Mutual labels:  cryptography, encryption
Lockbox
Modern encryption for Ruby and Rails
Stars: ✭ 905 (+1211.59%)
Mutual labels:  encryption, libsodium
Featherduster
An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction
Stars: ✭ 876 (+1169.57%)
Mutual labels:  cryptography, encryption
Hat.sh
encrypt and decrypt files in your browser. Fast, Secure client-side File Encryption and Decryption using the web crypto api
Stars: ✭ 886 (+1184.06%)
Mutual labels:  encryption, decryption


Lazysodium for Android

Lazysodium is a complete Android implementation of the Libsodium library that provides developers with a smooth and effortless cryptography experience.

Build Status Download

Why Lazysodium

We created Lazysodium because we really wanted a solid Libsodium compatible Java/Android library that would just work without fuss. We were exasperated and annoyed with current Libsodium implementations as some of them were just poorly maintained and poorly architected.

You can find more info here.

Used by

Name Short description
WordPress WordPress, one of the largest website builders, has Lazysodium powering their encryption in their Android app.
Threema (SaltyRTC) Threema is a global end-to-end encrypted chatting app and SaltyRTC is their protocol for encryption.
OpenHAB OpenHAB allows you to automate and superpower your home.
PayPay CardPaymentSDK is a card payments library to make payments through several payment methods painless. It uses PayPay as an endpoint to establish a payment security channel.
UXBOX UXBox, the open-source solution for design and prototyping
E3DB An encrypted NoSQL database designed from the ground-up for user privacy and security.
ADAMANT The most private messenger possible. Your device does not store any info. It directly interacts with the blockchain, where every byte is fully-encrypted.
Kepler A small TCP server written in Java powered by Netty, an asynchronous networking library.
Regen Ledger A global marketplace & contracting platform for Earth's ecosystem assets, services, and data.
Tezos The TezosJ SDK library enables plain Java developers to create applications that communicates with Tezos blockchain.
Exonum Exonum Java Binding is a framework for building blockchain applications in Java, powered by Exonum.
Paseto Java Implementation of Platform-Agnostic Security Tokens.
Recordo A super secure diary/journal that provides end to end encryption.

Features

This library is fully compatible with Kotlin powered Android projects.

You can find an up-to-date feature list here.

Quick start

This is by no means a comprehensive introduction to Lazysodium. Please view the official documentation for a more comprehensive guide.

1. Install

Install by adding the jcenter() repository. For Maven users, please see here.

// Top level build file
repositories {
    jcenter()
}

// Add to dependencies section
dependencies {
    implementation "com.goterl.lazycode:lazysodium-android:[email protected]"
    implementation 'net.java.dev.jna:jna:[email protected]'
}

Substitute VERSION_NUMBER for the version in this box:

Download

2. Let's go!

You can now initialise and start encrypting! Please note that this library follows the official libsodium docs closely. You need to use those docs to help you find the functions you need.

// Let's initialise LazySodium, perhaps in an Application class somewhere
LazySodiumAndroid lazySodium = new LazySodiumAndroid(new SodiumAndroid());

Let's encrypt! Again, most of them are available on the official libsodium documentation.

// Cast our lazySodium object so we're only using "lazy" methods, 
// i.e methods that do the heavy work of encryption.
SecretBox.Lazy secretBoxLazy = (SecretBox.Lazy) lazySodium;
String message = "This is a super secret message.";

// Generate a symmetric key to encrypt the message.
Key key = secretBoxLazy.cryptoSecretBoxKeygen();

// Generate a random nonce.
byte[] nonce = lazySodium.nonce(SecretBox.NONCEBYTES);

// Encrypt now! Now you have a super secure encrypted message
// available in the variable cipher.
String cipher = secretBoxLazy.cryptoSecretBoxEasy(message, nonce, key);

3. You decide

Every project is different, you may need to use lower-level APIs to achieve the control you need so you use the Native interface. Or alternatively you just don't want to deal with the details so you stick to the Lazy interface.

Every interface you can cast to is helpfully all in one directory so you can easily pick the functions you need. This isolates your code and prevents you from making mistakes.

Important: If possible, please stick to using either the Native or the Lazy interface. The reason for this is that the Lazy interface defaults to converting everything to hexadecimal whereas the Native interface assumes everything is non-hexadecimal. If you don't know what you're doing, you could end up making mistakes.

You can provide your own encoder as follows:

// Base64MessageEncoder has to implement our MessageEncoder interface
Base64MessageEncoder encoder = new Base64MessageEncoder(); 
// ... then from now on all Lazy methods will be encoded in Base64.
LazySodiumAndroid lazySodium = new LazySodiumAndroid(new SodiumAndroid(), encoder); 

Documentation

See our official documentation to get started.

Apps

You can preview some of the features in our free Lazysodium app available on Google Play:

Get it on Google Play

Lazysodium for Java

We also have a Java implementation available at Lazysodium for Java. It has the same API as this library so you can share code easily!


Created by Terl.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].