When to use encryption when developing for mobile?

Asked

Viewed 91 times

2

I am studying and assembling projects for mobile devices, and I always come across dozens of data transmissions, some important others not

1)I wonder if it is convenient to encrypt all the data saved in sqlite

2) In code, the time I load the function I can encrypt there, or only at the time when I set the values, I would do the conversion and send it to the bank?

if possible would like some tips on how to do, in an efficient way and whether I should.

ex: I have the following function to insert users into the bank I encrypt at the time of converting and do the insertion? What if I wanted to display the database data in a list? i decrypt in the same way, I say in the same situation as in the insertion?

 public void Cadastrar(){
 final EditText etid = (EditText) dialog.findViewById(R.id.etid);
        final EditText etnome = (EditText)dialog.findViewById(R.id.etnome);
        final EditText etusuario = (EditText) dialog.findViewById(R.id.etusuario);
        final EditText etsenha = (EditText) dialog.findViewById(R.id.etsenha);
        final EditText etemail = (EditText)dialog.findViewById(R.id.etemail);

 nome = etnome.getText().toString();
                email = etemail.getText().toString();
                usuarios = etusuario.getText().toString();
                senha = etsenha.getText().toString();
                id_tipo = etid.getText().toString();
                u = new Usuarios_Model();

                u.setNome(nome);
                u.setEmail(email);
                u.setSenha(senha);
                u.setUsuario(usuarios);
                u.setTipo_usuario(tipo);
                u.setId(Integer.parseInt(id_tipo));
                List<Usuarios_Model> ls = new ArrayList<>();

                ls.add(u);

                new DAO_usuario().Insert(ls);

}

Note: I am studying PBKDF2, I have been able to assemble simple examples, but I have a project that would like to put cryptography in it

  • Search on Sqlcipher

  • @Thiagoluizdomacoski I have a method implemented in Rijndael. However, I heard that PBKDF2 performed well so I was thinking of a way to use it. would like to clarify these doubts, so the final request of " use efficiently" in some applications could use, since traffic would be different than Rijndael.

1 answer

1

1 - You will have to evaluate each case, because if you decide to encrypt everything, you will be adding a longer processing time that can slow your app down. In my opinion information like passwords, user, credit card number etc.. should always be encrypted, the rest will depend on the criticality of the information.

2 - Do a routine that encrypts/decrypts the information in the bank read.

  • Carina, just do not mark as an answer because I still have doubts, "if possible I would like some tips on how to do, in an efficient way and if I should even do."

Browser other questions tagged

You are not signed in. Login or sign up in order to post.