All Projects → scottyab → Aescrypt Android

scottyab / Aescrypt Android

Licence: apache-2.0
Simple API to perform AES encryption on Android. This is the Android counterpart to the AESCrypt library Ruby and Obj-C (with the same weak security defaults :( ) created by Gurpartap Singh. https://github.com/Gurpartap/aescrypt

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Aescrypt Android

PassLock
PassLock is a medium-security password manager that encrypts passwords using Advanced Encryption Standards (AES)
Stars: ✭ 44 (-92.85%)
Mutual labels:  aes-encryption
libVES.c
VESvault End-to-End Encryption API: Encrypt Everything Without Fear of Losing the Key
Stars: ✭ 28 (-95.45%)
Mutual labels:  aes-encryption
Cryptojs Aes Php
CryptoJS 3.x AES encryption/decryption on client side with Javascript and on server side with PHP
Stars: ✭ 259 (-57.89%)
Mutual labels:  aes-encryption
MGObfuscator
An easy encryptor / decryptor for iOS
Stars: ✭ 17 (-97.24%)
Mutual labels:  aes-encryption
id-mask
IDMask is a Java library for masking internal ids (e.g. from your DB) when they need to be published to hide their actual value and to prevent forging. It has support optional randomisation has a wide support for various Java types including long, UUID and BigInteger. This library bases its security on strong cryptographic primitives.
Stars: ✭ 39 (-93.66%)
Mutual labels:  aes-encryption
Python-File-Encryptor
Encrypt and Decrypt files using Python (AES CBC MODE)
Stars: ✭ 51 (-91.71%)
Mutual labels:  aes-encryption
Ransom
Various codes related to Ransomware Developement
Stars: ✭ 119 (-80.65%)
Mutual labels:  aes-encryption
Aes Killer
Burp plugin to decrypt AES Encrypted traffic of mobile apps on the fly
Stars: ✭ 446 (-27.48%)
Mutual labels:  aes-encryption
abrute
Multi-threaded AES Brute Force File Decryption
Stars: ✭ 22 (-96.42%)
Mutual labels:  aes-encryption
EncrypC
🔑 File Encryption Application using Python.
Stars: ✭ 14 (-97.72%)
Mutual labels:  aes-encryption
Encipherr
Open Source online AES encryption and decryption tool
Stars: ✭ 21 (-96.59%)
Mutual labels:  aes-encryption
AESEncryption
A demo of how to implement AES encryption in Android & iOS
Stars: ✭ 21 (-96.59%)
Mutual labels:  aes-encryption
AESCipher-Java
AES encryption working between Objective-C and Java.
Stars: ✭ 88 (-85.69%)
Mutual labels:  aes-encryption
openssl
A functions wrapping of OpenSSL library for symmetric and asymmetric encryption and decryption.
Stars: ✭ 199 (-67.64%)
Mutual labels:  aes-encryption
Gonnacry
A Linux Ransomware
Stars: ✭ 341 (-44.55%)
Mutual labels:  aes-encryption
php-mysql-aes-crypt
Encrypt/decrypt data in PHP to a format compatible with MySQL AES_ENCRYPT & AES_DECRYPT functions.
Stars: ✭ 21 (-96.59%)
Mutual labels:  aes-encryption
Dracker
An iOS and React App to track debt and send/receive payments.
Stars: ✭ 22 (-96.42%)
Mutual labels:  aes-encryption
Secure Ls
🔒 Secure localStorage data with high level of encryption and data compression
Stars: ✭ 486 (-20.98%)
Mutual labels:  aes-encryption
Link Lock
Password-protect URLs using AES in the browser; create hidden bookmarks without a browser extension
Stars: ✭ 418 (-32.03%)
Mutual labels:  aes-encryption
sicher
Sicher is a go module that allows secure storage of encrypted credentials in a version control system.
Stars: ✭ 27 (-95.61%)
Mutual labels:  aes-encryption

AESCrypt-Android

Android Arsenal

Simple API to perform AES encryption on Android with no dependancies. This is the Android counterpart to the AESCrypt library Ruby and AESCrypt-ObjC created by Gurpartap Singh. It used the same weak :'( security defaults i.e Blank IV noted below.

For compatiblity with AESCrypt, AESCrypt-Android has the same defaults namely:

  • 256-bit AES key
  • CBC mode
  • PKCS7Padding
  • Blank/Empty IV (default)*

*Using CBC with the default blank IV is vulnerable. This has been left in for compatibility with AESCrypt implementations. See Adv method for providing your own IV. If you don't need to be compatable with AESCrypt then look at java-aes-crypto it's API is just as simple and generates more secure keys.

Dependency

Download from Maven Central (.aar)

or

dependencies {
  compile 'com.scottyab:aescrypt:0.0.1'
}

Usage

Encrypt

String password = "password";
String message = "hello world";	
try {
    String encryptedMsg = AESCrypt.encrypt(password, message);
}catch (GeneralSecurityException e){
    //handle error
}

Decrypt

String password = "password";
String encryptedMsg = "2B22cS3UC5s35WBihLBo8w==";
try {
    String messageAfterDecrypt = AESCrypt.decrypt(password, encryptedMsg);
}catch (GeneralSecurityException e){
     //handle error - could be due to incorrect password or tampered encryptedMsg
}

Recommended Advanced usage

Please if you are going to use this library provide your own key, and use a different IV per message that you encrypt..

AESCrypt.encrypt(final SecretKeySpec key, final byte[] iv, final byte[] message)

AESCrypt.decrypt(final SecretKeySpec key, final byte[] iv, final byte[] decodedCipherText)

Note: for flexibility these 'adv' methods don't provide BASE64 encoding/decoding.

Debugging/Logging

To enable logging simple change switch on the logging flag as shown below.

AESCrypt.DEBUG_LOG_ENABLED = true;

Remember to disable in Live, recommend the below snippet if possible

if (BuildConfig.DEBUG) {
    AESCrypt.DEBUG_LOG_ENABLED = true;
}

To be honest it's a strech to call this a library given it's only a single util class, but I created as went through a ton of pain working out the conpatible settings for AESCrypt. I hope this will save some one time in the future.

Contributing

I welcome pull requests, issues and feedback.

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Licence

Copyright (c) 2014 Scott Alexander-Bown

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].