[Module] qAES - Module (all OS)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

[Module] qAES - Module (all OS)

Post by Thorsten1867 »

qAES - Module (PB 5.7x/ all OS / 64Bit)

Quick encryption with AES
  • Encrypt strings and save as file if necessary
  • Encrypt files
  • Encrypt files when adding them to an archive & decrypt when unpacking them
  • Direct loading & saving of encrypted XML, JSON and images
  • Create secure keys to make BruteForce attacks much more difficult
[Security Level 1] (BasicCoders / Load & Save / Packer)
Ordinary mortals shouldn't be able to access my data.
(=> Key / Counter / Hash, ...)

[Security Level 2] (SmartFileCoder)
I'm a little paranoid about my data.
(=> multiple encrypted key / additional counter possible / Hash / 'FakeLength' / ..... )

Code: Select all

; qAES::CreateSecureKey()           - use secure keys to make brute force attacks more difficult
; qAES::SetAttribute()              - [#EnlargeBytes/#HashLength/#ProtectedMarker/#CryptMarker]
; qAES::SetSalt()                   - add your own salt
; qAES::GetErrorMessage()           - returns error message 
; qAES::SmartCoder()                - encrypt / decrypt ascii strings, unicode strings and binary data (#Binary/#Ascii/#Unicode)

; ----- #Enable_BasicCoders [Security Level 1] -----

; qAES::EncodeFile()                - encrypt file with SmartCoder()
; qAES::DecodeFile()                - decrypt file with SmartCoder()
; qAES::FileCoder()                 - encrypt & decrypt  with SmartCoder()
; qAES::String()                    - encrypt / decrypt string with SmartCoder()
; qAES::StringToFile()              - create an encrypted string file with SmartCoder()
; qAES::File2String()               - read an encrypted string file with SmartCoder()
; qAES::IsCryptFile()               - checks if the file is encrypted. with SmartCoder()

; ----- #Enable_LoadSaveCrypt [Security Level 1] -----

; qAES::LoadCryptImage()            - similar to LoadImage()
; qAES::SaveCryptImage()            - similar to SaveImage()
; qAES::LoadCryptJSON()             - similar to LoadJSON()
; qAES::SaveCryptJSON()             - similar to SaveJSON()
; qAES::LoadCryptXML()              - similar to LoadXML()
; qAES::SaveCryptXML()              - similar to SaveXML()

; ----- #Enable_CryptPacker [Security Level 1] -----

; qAES::AddCryptPackFile()          - similar to AddPackFile()
; qAES::UncompressCryptPackFile()   - similar to UncompressPackFile()
; qAES::AddCryptPackMemory()        - similar to AddPackMemory()
; qAES::UncompressCryptPackMemory() - similar to UncompressPackMemory()
; qAES::AddCryptPackXML()           - similar to SaveXML(), but for packer
; qAES::UncompressCryptPackXML()    - similar to LoadXML(), but for packer
; qAES::AddCryptPackJSON()          - similar to SaveJSON(), but for packer
; qAES::UncompressCryptPackJSON()   - similar to LoadJSON(), but for packer
; qAES::AddCryptPackImage()         - similar to SaveImage(), but for packer
; qAES::UncompressCryptPackImage()  - similar to LoadImage(), but for packer
; qAES::IsCryptPackFile()           - checks if the packed file is encrypted

; ----- #Enable_SmartFileCoder [Security Level 2] -----

; qAES::SmartFileCoder()            - encrypting or decrypting file
; qAES::CheckIntegrity()            - checks the integrity of a encrypted file
; qAES::IsEncrypted()               - checks if a file is already encrypted
; qAES::IsProtected()               - checks if a file is already protected
; qAES::GetFileSize()               - returns the real file size
; qAES::CreateStringFile()          - create an encrypted string file
; qAES::ReadStringFile()            - read an encrypted string file
; qAES::ReadProtectedFile()         - read protected file and write it to memory
; qAES::EncryptImage()              - encrypt an image
; qAES::DecryptImage()              - decrypt an image
; qAES::LoadEncryptedImage()        - load an encrypted image (returns image number)
Download: aAES_Module.pbi

Image
Download: SmartCrypter.exe (+ SourceCode)
Last edited by Thorsten1867 on Fri Dec 20, 2019 3:59 pm, edited 7 times in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: [Module] qAES - Module (all OS)

Post by RSBasic »

Image
Image
Image
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] qAES - Module (all OS)

Post by Thorsten1867 »

Update:
  • Changed: file format (qAES-ID added)
  • Added: IsCryptFile() / IsCryptPackFile()
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] qAES - Module (all OS)

Post by Thorsten1867 »

Update:
  • file format changed (improved safety)
  • some optimizations & bugfixes
  • ProgressBar added to SmartFileCoder()
  • EnableKeyStretching()
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] qAES - Module (all OS)

Post by Thorsten1867 »

After intensive exchange with Walbus a bigger update.

[ Please make sure to re-encrypt files ]

Update:
  • File format changed. (BasicCoder: Hash added / SmartFileCoder: FakeLength added)
  • Hashes to verify the integrity of the file.
  • Flags #EnlargeSize & #RandomizeSize for SmartFileCoder() to randomize the file length and enlarge the file with random data
  • Modes #Auto / #Encrypt / #Decrypt / #Protect / #Unprotect for SmartFileCoder().
  • Addons for SmartFileCoder():
    • CreateStringFile() & ReadStringFile()
    • EncryptImage() & DecryptImage()
    • LoadEncryptedImage()
    • ReadProtectedFile()
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] qAES - Module (all OS)

Post by Thorsten1867 »

Here is a small application example:

Image

Download: SmartCrypter.exe (+ SourceCode)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] qAES - Module (all OS)

Post by Thorsten1867 »

Update: SmartCrypter.exe
  • Bugfixes: Remove File(s)
  • Added: Popupmenu (e.g. Copy Hash)
  • Added: Check the integrity of the file
  • Added: Check if files were encrypted
  • Added: Multilingual support
[17.08.2019] Bugfix Resize
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Post Reply