1. AES Encryption
- Posted by euphoric (admin) Jul 13, 2023
- 753 views
How do we do AES encryption with Euphoria? (Unfortunately, Search provides no good links.)
2. Re: AES Encryption
- Posted by mitgedanken Jul 14, 2023
- 721 views
How do we do AES encryption with Euphoria? (Unfortunately, Search provides no good links.)
You need a library like "Microsoft CryptoAPI".
If I remember correctly, encryption methods will be implemented in OE 4.2.
3. Re: AES Encryption
- Posted by ghaberek (admin) Jul 14, 2023
- 683 views
How do we do AES encryption with Euphoria? (Unfortunately, Search provides no good links.)
Best bet is probably to wrap libtomcrypt.
-Greg
4. Re: AES Encryption
- Posted by Icy_Viking Jul 14, 2023
- 688 views
How do we do AES encryption with Euphoria? (Unfortunately, Search provides no good links.)
Best bet is probably to wrap libtomcrypt.
-Greg
I wouldn't mind taking a stab at trying to wrap these libtom libraries. However when I tried compiling/building themselves, I ran into issues. If someone wants to send me the DLLs, I'll take a crack at it. I might try building these under Linux using the Windows Linux Subsystem as these libraries appear to be developed under a linux environment.
5. Re: AES Encryption
- Posted by euphoric (admin) Jul 20, 2023
- 633 views
Isn't there some sort of built-in or standard lib encryption for Euphoria already?
6. Re: AES Encryption
- Posted by ghaberek (admin) Jul 20, 2023
- 626 views
Isn't there some sort of built-in or standard lib encryption for Euphoria already?
You would think that, but no. Encryption isn't something you want to implement from scratch; I'd feel more confident bundling something already well tested, like libtomcrypt or similar. You're welcome to lead that project if you'd like.
-Greg
7. Re: AES Encryption
- Posted by euphoric (admin) Jul 20, 2023
- 634 views
Encryption isn't something you want to implement from scratch; I'd feel more confident bundling something already well tested, like libtomcrypt or similar.
Maybe one of these will work: Euphoria Encryption Libs
8. Re: AES Encryption
- Posted by ghaberek (admin) Jul 20, 2023
- 625 views
Maybe one of these will work: Euphoria Encryption Libs
If you want to call what you're doing "encryption" then those are not the answer. Encryption has come a long way in the last twenty years and it would be unwise to use anything that isn't well tested, supported, and maintained. The Archive, by the way, should really be regarded as "for informational purposes only" as anything that is hand-made and purports to be "secure" is likely not. Plus, you started this thread asking specifically for AES encryption which none of those are anyway. The closest is Blowfish but even that is outdated and not at all compatible with AES. Here is a thread from Stack Exchange that explains the nuance and difficulty involved: Why shouldn't we roll our own?
-Greg
9. Re: AES Encryption
- Posted by Icy_Viking Jul 20, 2023
- 585 views
Well vcPkg has a libtomcrypt package. However it only compiles as a .lib file. I looked into Microsoft Seal, but its very C Plus Plus codebase. What about OpenSSL? Or is that not have AES Encryption or is OpenSSL bigger than what is needed?
10. Re: AES Encryption
- Posted by ghaberek (admin) Jul 21, 2023
- 610 views
Well vcPkg has a libtomcrypt package. However it only compiles as a .lib file. I looked into Microsoft Seal, but its very C Plus Plus codebase.
Building libtomcrypt on Windows is pretty simple but there are a few small caveats. libtomcrypt.dll depends on libtommath.dll so you need to build that first. The makefile for libtomcrypt is specifically looking for ../libtommath and you can technically override this but it's easier to just rename the directories after you extract them. Just make sure they're next to each other. Probably not an issue if you're cloning the repo from GitHub instead of using the zip files.
Here are the steps I used to build both libraries:
tdm-gcc
- Install TDM-GCC 10.3.0 first if you don't have it already
libtommath
- Download and extract ltm-1.2.0.zip
- Rename libtommath-1.2.0 to simply libtommath
- cd libtommath and build the library:
mingw32-make -f makefile.mingw -j4 libtommath.dll
libtomcrypt
- Download and extract crypt-1.18.2.zip
- Rename libtomcrypt-1.18.2 to simply libtomcrypt
- cd libtomcrypt and build the library:
mingw32-make -f makefile.mingw -j4 libtomcrypt.dll
What about OpenSSL? Or is that not have AES Encryption or is OpenSSL bigger than what is needed?
OpenSSL, as its name suggests, is primarily build to provide encrypted networking via SSL and TLS. But it only provides the encryption later and not the protocols running inside. LibCURL provides most of that on top of OpenSSL. Using OpenSSL for only its encryption features is overkill and libtomcrypt is a much simpler option.
-Greg
11. Re: AES Encryption
- Posted by Icy_Viking Jul 21, 2023
- 599 views
Thanks Greg. I was able to get libtommath to build. However when I try to build libtomcrypt, it says it can't find -ltommath. collect2.exe: error ld return 1 exit status. I put the directories next to each other.
EDIT: After putting libtomcrypt and libtommath next to each other in the same directory, I got it to build. Thanks Greg.
12. Re: AES Encryption
- Posted by euphoric (admin) Jul 21, 2023
- 610 views
If you want to call what you're doing "encryption" then those are not the answer...
Your case is, of course, compelling, but you are a professional, so nothing less is expected.
There's no way in heck I would ever deign to roll my own. That's a time-wasting disaster waiting to happen!