Automagic encryption

Post your questions and help other users.

Moderator: Martin

Post Reply
icefox56
Posts: 38
Joined: 15 Aug 2017 02:56

Automagic encryption

Post by icefox56 » 01 Nov 2019 07:00

Is there any way to encrypt a text in automagic?

Suppose I want to forward OTP messages I receive on one phone to another phone, and I want that text to be encrypted with a passphrase before sending. Is this possible using some command line or something?
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted

User avatar
Desmanto
Posts: 2320
Joined: 21 Jul 2017 17:50

Re: Automagic encryption

Post by Desmanto » 03 Nov 2019 17:50

I have requested the feature here : viewtopic.php?f=4&t=7892
Maybe anuraag can help with the java method to use the common used encryption, such as AES 128 bit.

You can implement your own personal encryption algorithm. But since you can't test the strength, it is better to use the widely known encryption which has been prooftested to be strong enough from many kinds of decryption attack. Wrong implemented encryption can lead to false sense of security, which is worse than have no security at all.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20191212 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 297
Joined: 24 Jan 2015 02:06

Re: Automagic encryption

Post by anuraag » 11 Jan 2020 12:12

Here is a flow to encrypt text based on https://github.com/pasha656/Crypto/blob ... rypto.java
Attachments
flow_Encrypt_Decrypt_text_20200111_174050.xml
(11.54 KiB) Downloaded 10 times

User avatar
Desmanto
Posts: 2320
Joined: 21 Jul 2017 17:50

Re: Automagic encryption

Post by Desmanto » 11 Jan 2020 17:39

@anuraag : thank you, this can be used to safely transmit data on public feature, example using public MQTT server (everyone can see the message, but they can't read decrypt it)

I try with the encrypt/decrypt, it works well. However I am usually skeptic and always need double check. I try the encrypted text in the online website, put in my password and can't decrypt it. example, this is "hello word' with the password "123"

Code: Select all

frGXo/uv9UoJHLCFFsOX1rMtxeqlzxc5MWiXbUmXDG0=]pQgd3VK4Y/QsHktGsM+ILg==]e2gL8lRGi8sOC/doJWY/YA==
Example website to decrypt https://www.devglan.com/online-tools/ae ... decryption
It says the secret key must be 32 byte for the 256 bit AES.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20191212 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 297
Joined: 24 Jan 2015 02:06

Re: Automagic encryption

Post by anuraag » 12 Jan 2020 08:58

@desmanto There may be some problem with that site. That site can't even create a encrypted text.

I think encrypted text created using my posted script can't be decrypted with other tools unless both uses same method. For example i am using "]" as delimiter, Autotools uses ":" (autotools uses different method to encrypt i guess this https://github.com/tozny/java-aes-crypt ... grity.java).
Last edited by anuraag on 12 Jan 2020 16:15, edited 1 time in total.

User avatar
Desmanto
Posts: 2320
Joined: 21 Jul 2017 17:50

Re: Automagic encryption

Post by Desmanto » 12 Jan 2020 15:53

@anuraag : Hmmm, I am thinking to store some of my private stuff in encrypted mode. But I need it to be universal standard. So if I don't have access to automagic, I can still decrypt the file/text. I wonder how most website/banking or other security system implement this.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20191212 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 297
Joined: 24 Jan 2015 02:06

Re: Automagic encryption

Post by anuraag » 13 Jan 2020 06:48

Do you know any reference which defines universal standard or any other tools which works across platforms?

User avatar
Desmanto
Posts: 2320
Joined: 21 Jul 2017 17:50

Re: Automagic encryption

Post by Desmanto » 14 Jan 2020 17:23

I previously use SSE - File/Text Encryption for some stuff : https://play.google.com/store/apps/deta ... ndroid.sse
But since I don't need it anymore, uninstalled. At that I don't need universal decryption method yet, so I just trust the app alone, it is open source.

I might look at it again this weekend, testing the decryption on serveral websites. I just changed ROM and there are several flow need to be adjusted.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20191212 Official, Android Pie 9.0, Rooted.

Post Reply