It is currently Sun Sep 22, 2019 1:18 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: [Module] qAES - Module (all OS)
PostPosted: Mon Aug 05, 2019 7:44 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
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:
; 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

Download: SmartCrypter.exe (+ SourceCode)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Fri Aug 16, 2019 5:15 pm, edited 5 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] qAES - Module (all OS)
PostPosted: Tue Aug 06, 2019 8:04 am 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1098
Location: Germany::Berlin()
Image

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] qAES - Module (all OS)
PostPosted: Tue Aug 06, 2019 2:46 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
Update:
  • Changed: file format (qAES-ID added)
  • Added: IsCryptFile() / IsCryptPackFile()

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] qAES - Module (all OS)
PostPosted: Thu Aug 08, 2019 7:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
Update:
  • file format changed (improved safety)
  • some optimizations & bugfixes
  • ProgressBar added to SmartFileCoder()
  • EnableKeyStretching()

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] qAES - Module (all OS)
PostPosted: Mon Aug 12, 2019 9:22 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
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()

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] qAES - Module (all OS)
PostPosted: Thu Aug 15, 2019 8:54 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
Here is a small application example:

Image

Download: SmartCrypter.exe (+ SourceCode)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] qAES - Module (all OS)
PostPosted: Fri Aug 16, 2019 5:14 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
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

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye