-2

I have very little knowledge of cryptography. However I want to encrypt and decrypt few strings for my android app. Previously I was using methods given in this post to do this simple task. However Android N is deprecating "Crypto" provider which is giving me error

java.security.NoSuchProviderException: no such provider: Crypto

Can anyone direct me to some tutorial or code gist which can have implementation of this new methods for Android N ? Many of the answers which I found in stackoverflow are still giving answer to such questions with old cypto library. I couldn't understand changes to make from Google blog because of my lack of knowledge in this field.

Community
  • 1
  • 1
Dexter
  • 1,421
  • 3
  • 22
  • 43
  • [Here](https://github.com/ryan652/EasyCrypt/) is a good library for secure AES encryption on Android. Don't reinvent the wheel. – priyank Jul 16 '17 at 04:02

1 Answers1

2

A serious non-answer here: when talking about security, there are no detours.

What I mean: that link you posted contains your answer:

That's it. You should not need anything else.

Meaning: if you want to use cryptography, you have to understand what you are doing. In that sense the answer is: keep reading that blog post; line by line. Do research on terms you do not know; maybe write up specific questions for things that you can't resolve (and post them either here or on security.

Please don't get me wrong: nobody (except Jon Skeet) can now every detail about every little abstraction that the whole "Java" stack (JVM, underlying operating system, ...) contains. Sometimes "half knowledge" is acceptable; as it leads to acceptable results. But cryptography and security isn't one of these areas.

GhostCat
  • 137,827
  • 25
  • 176
  • 248
  • I knew such answer is coming , I thought for simple encryption and decryption task (for some insensitive data) , I can just copy paste code and get it done. But well, looks like life is hard :) – Dexter Apr 18 '17 at 07:52
  • When you knew it would be coming, why did you ask? ;-) ... but seriously: you don't have to study 10 years of math to understand how elliptic curves are used in order to do what you want. But you should spend the half day it would take to dive into this subject. Believe me: it will be worth your time (I did a similar thing for python and encryption the other week; and I learned a lot; just by experimenting ... see [here](http://stackoverflow.com/questions/43274703/trouble-with-encode-encrypt-pad-using-same-code-for-python2-and-python3) if you are curious ... – GhostCat Apr 18 '17 at 07:55
  • I was looking for shortcut :P Anyways, on serious note, I am reading about ciphers and related texts. Maybe next time I will ask such question with little bit of extra knowledge of cryptography ! I will take a look at the link you provided. – Dexter Apr 18 '17 at 08:00
  • You are welcome ... just don't forget to accept before getting lost in the depths of studying those crypto thingies ;-) – GhostCat Apr 18 '17 at 08:03