[FREE] AES Encrypt/Decrypt

Thank you for your feedback.

The the app is for sending and receiving text messages needs to be able to read the incoming text message and then decrypt it. So if you receive an encrypted text message, the encrypt labels will not apply, does that make sense?

I do have a test app that can encrypt and decrypt in the one app, but it works as you are sending and receiving in the same app. With text messages, the receiver will only receive the message and will not have the encrypt field information.

I hope this makes sense.

Cheers

Alan

You will need the same secret and salt used to encrypt the message to decrypt the message.

Yes, I agree and the plan was to type in the salt password and then decrypt the message, but I cannot work out how to do this? I'm new to app inventor so I'm still learning how to do the blocks. :slight_smile:

If I understand what you are trying correctly, the process should be like this:

  1. The sender types their message, then enters the salt and secret to create the encrypted text which they send to the receiver. Here the salt is "mysalt" and the secret is "mysecret"

image

  1. The receiver gets the message. In order to decrypt the message they MUST KNOW the salt and secret that the sender used. They enter these values and the message is decrypted

image

That's fantastic, thank you.

I'll give this a go and let you know how I get on. :slight_smile:

Alan

If you were to use the "make salt from secret" block to generate the salt, then users would only need to share the secret used to encyrpt/decrypt.

HI,

The plan was is to eventually attached a secret to each user that has the app, so I don't need to keep typing in the secret salt password every time and then there will be an option down the line to edit the salt password that is attached to a contact.

This is more advanced and I'm far away from that at the moment. I have the sending part working, but the receiving part seems to be harder. I can view the text message which is contained in the "get messagetext", but I've had trouble trying to take what is in message text and getting the app to ask for the salt password associated with the message and if correct, then it decrypts the message.

I hope that makes sense. Here is the full "receive" part of the app.

Alan

Use a TextInput dialog from the Notifier component to request a text from the user. This text can be the salt or the secret, then pass the response into your decrypt block.

You should aim for either the salt or the secret to not be anywhere in the app, it would have to be typed in.

Yes, I agree as the passwords will change.

Do I replace the block that you originally posted up with this new one that you have up now with the notifier addition?

Sorry I'm new to app inventor as I'm still learning the "buzz" words and what they mean.

Here is the latest version of the block. I've had to add (initialize global secret to " ") as a red x was coming up at the end of the AES Decryption block.

Alan

There should be no issue placing text in the secret variable ?

Hi,

Thanks for your feedback. I'm still trying to get my head around what I need to do, maybe it's just above my pay grade. :frowning:

Alan