Best encryption library for mobile devices?
Hello I have been using LibTomCrypt to use SHA1 encryption ( for data integrity checking ) on mobile devices (iPhone OS and Android for the moment ). I was wondering if anyone is using anything else, things to consider are Portability ( C preferred but C++ is also an option ), and libraries size ( small == better for my particular needs ).
Thanks
Asked by: Ryan322 | Posted: 24-01-2022
Answer 1
You might write a wrapper class that calls CommonCrypto routines if you're on an iPhone, to reduce your library size requirements and enforce portability. Your wrapper, for example, would call other routines if compiled on another platform. The nice thing about CommonCrypto is that it is pre-built by Apple. Calls to it are also entirely in C.
Answered by: Luke622 | Posted: 25-02-2022Answer 2
For size/speed -- you can get Openssl to generate flattened assembly for certain processors. I suggest you look into the build directories to see what is possible. I usually build my own Openssl library based on what I need.
Answered by: Anna316 | Posted: 25-02-2022Answer 3
I've looked a lot of libraries, and in the end I ended up going with "TomCrypt", for the following reasons:
1) Excellent portability. You can customize the library in a very very easy way in order to almost assure portability between lot's of devices.
2) Very modular, I could (in a very easy way) pick up and compile only the encryption algorithms I needed for my particular application, ( in this example it was SHA-1 and a couple of others)
3) Very very lightweight. Because of the modularity, it ended up being a very lightweight addition to my code.
Answered by: Brooke580 | Posted: 25-02-2022Similar questions
android - Encryption of pdf using itext Library
I am trying to encrypt a pdf, before I sucuessfully generated pdf with watermarking but while watermarke, when I encrypt a pdf its gives error:
11-08 09:03:13.579: W/System.err(29720): java.lang.IllegalArgumentException: No valid encryption mode
11-08 09:03:13.579: W/System.err(29720): at com.itextpdf.text.pdf.PdfEncryption.setCryptoMode(PdfEncryption.java:198)
11-08 09:03:13.579: W/System.err(29720): ...
Java based encryption library for Android
I'm looking for a java-based encryption library for Android. I am aware of the built-in encryption that Android offers. Don't want it. Google broke compatibility from one OS to another. My app cannot rely on that. I also looked at Bouncy Castle, which is what Android uses internally but modified. The footprint however is pretty big at around 1.5 meg. Spongy Castle is available but is just a wrapper for Bouncy Castle with t...
Android Java: Trying to get this AES encryption library to work but it doesn't
I'm trying to test this library
http://blog.cwill-dev.com/2012/10/09/encryption-between-javaandroid-and-php/
with this code
ApiCrypter ApiCrypter = new ApiCrypter();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
se...
android - AndroidX Crypto library, unable to save file after encryption
I'm using androidx.security.crypto library to encrypt a text file. I'm following the docs here.
val keyGenParameterSpec = MasterKeys.AES256_GCM_SPEC
val masterKey...
java - Encryption compatible between Android and C#
I've found plenty of examples how to do encryption in C#, and a couple for Android, but I'm particularly looking for a way to handle encrypting (using something like AES, TripleDES, etc.) from Android, and eventually wind up being decrypted in C#. I found an example for encoding AES in Android and
android - Java Encryption issue
I am using PBE encryption to encrypt and decrypt some text on an Android application but I get the BadPaddingException: with the "pad block corrupted" message when I use the wrong private key to decrypt the text.
My question, since I am not well versed with encryption in Java, is if this is the normal behavior of the encryption API, because I need to do some logic in the case when the wrong key is entered, but I do not k...
encryption - How to add Bouncy Castle algorithm to Android?
I am trying to write a small application using bouncycastle algorithm, from the BouncyCastleProvider.java it says we have to import and add the provider during runtime by the following...
encryption - how to play an encrypted file in Android
I need to be able to play an encrypted file in Android.
The file is AAC.
The only way I can see to do this is either:
decrypt the file to internal private storage and point the player at that file to play, or
decrypt & decode the file to pcm and feed it to an AudioTrack.
1 isn't great because it takes a long time to do that.
2 isn't great either because I don't ...
encryption - Should I use the bouncy castle libraries or the ones included in Android for AES
I'm writing an android app where I need to use AES. Is it better to use the bouncy castle libraries or should I just stick with what is included in default android libraries?
What is the most secure encryption mode for Android?
Currently I am using:
Algorithm_mode_padding="RSA/ECB/PKCS1Padding"
Provider="BC"
I have heard that ECB can cause patterns in the output. What is the most secure Algorithm, mode and padding for Android at the moment? I will be using this for license files.
Also, what is the best keysize to use when creating a new public and private key?
encryption - Asymmetric Crypto on Android
I would like to ask if i can use Asymmetric Crypto (like RSA or ECC) on android mobile phones, how, and what are the best libraries i should use.
android - Identify GSM encryption algorithm
I would like to find out whether my android phone (ADP) is using A5/0, A5/1 or A5/2 at a specific time. How can I achieve this?
encryption - How can I store music on an android phone without allowing the user to be able to download it and use it?
I am working on an app that connects to a media providing site and downloads mp3 files to the user phone. I would like for the user to be unable to copy these files off the phone but only listen to them through my app.
I am currently trying to encrypt the files using DES and encryption and decrypt and play the file in bits in the app. This is however not working. Is there a better way of achieving my end goal or ha...
security - Android Data Encryption dilemma
I'm creating an application that encrypts data with a key that is created each time the user logs into the app. However, there are times when data will be received via a BroadcastReceiver that needs encrypting, but the user is not logged in and so the encryption key is not available.
Security is pretty important and so using a key stored in code to encrypt the data until the user next logs in is out of the question as is s...
Still can't find your answer? Check out these communities...
Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android