AES-XXX-GCM

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
markclark
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6
Joined: Thu Jan 24, 2013 4:38 pm

AES-XXX-GCM

Post by markclark » Fri May 20, 2022 6:16 pm

Just to put some notes in a searchable forum, I wanted to post some info on why AES-XXX-GCM does not seem to work with LiveCode. What I am seeing is that the encrypted bytes are the same as the plaintext bytes (plus a salted key).

I am using CBC mode with HMACs for my work, but thought this post might save someone else some head scratching if they wanted to use GCM.


https://groups.google.com/g/mailing.ope ... bS9pFa79wJ


On Mon, Feb 09, 2015, Sec_Aficionado wrote:

> Hello,
>
> I am trying to encrypt a short message using AES-256-GCM as mentioned in the subject.
>
> My command is:
> openssl enc -aes-256-gcm -p -in payload.txt -out enc.txt
>
> I get prompted for password as expected.
>
> The encryption goes well, and then I proceed to decrypt using:
> openssl enc -d -aes-256-gcm -p -in enc.txt -out dec.txt
>
> The program executes but I get a "bad decrypt" message. However, when I open dec.txt, it is the same as the original file payload.txt
>
> My guess is that the problem is in the padding, but I have not been able to eliminate the error message, even setting the -nopad option and padding manually.
>
> Can someone please explain to me why this might be happening?
>
> I am running openSSL 1.0.1f (6 Jan 14) on an Ubuntu 14.04 LTS VM with current patches.
>

AES GCM is not supported by the 'enc' utility. More recent versions of OpenSSL
throw out and error message if you try to use it from the command line.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org



On 10/02/15 14:09, Sec_Aficionado wrote:
> Ah, thank you! I tried a lot of things and was very frustrated. I wish the documentation reflected that. I'll see if I can contribute by updating it.

It does:

https://www.openssl.org/docs/apps/enc.html
"The enc program does not support authenticated encryption modes like
CCM and GCM. The utility does not store or retrieve the authentication tag."


Dr. Stephen Henson

TriciaDoyle
Posts: 1
Joined: Wed Oct 12, 2022 4:15 am
Contact:

Re: AES-XXX-GCM

Post by TriciaDoyle » Wed Oct 12, 2022 4:18 am

(I hope you don't mind when i share a platform for MOD APKs & Premium Apps. All is free! Search TechZAPK on Google and enjoy! I've been using it for more than 2 years)
Last edited by TriciaDoyle on Thu Oct 13, 2022 2:43 am, edited 1 time in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: AES-XXX-GCM

Post by FourthWorld » Wed Oct 12, 2022 7:08 am

Hi Tricia -

Which LiveCode version are you using?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Off-Topic”