github samuel-lucas6/Kryptor v2.0.0
v2.0.0-beta

latest releases: v4.1.0, v4.0.1, v4.0.0...
pre-release3 years ago

Version 2 brings several breaking changes. If you are upgrading from version 1.0.0, then you will need to decrypt your files before you update.

Everything is much faster than in version 1. Libsodium is now used as the library for Argon2 (instead of Konscious.Security.Cryptography), HMAC has been replaced with BLAKE2b, and the Argon2 parameters/salt/nonce are now stored as headers rather than trailers. Please view the changelog for more details.

Requirements

Windows: .NET Framework 4.8
Linux & macOS: Mono

Changelog:

Cryptography

  • Switched to the libsodium Argon2 implementation. This implementation is several times faster than Konscious.Security.Cryptography and allows for more secure parameters to be used with the same time delay.
  • Argon2 now uses a 16 byte (128-bit) random salt instead of 32 bytes (256-bits) because this is the requirement for libsodium. Furthermore, no associated data and no known secret are used with Argon2 as these are not supported.
  • Switched to keyed BLAKE2b instead of HMAC-SHA512 as the message authentication code for file encryption. BLAKE2 is several times faster than HMAC.
  • The MAC key has been reduced from 1024-bits (128 bytes) to 512-bits (64 bytes) because 64 bytes is the max key size for BLAKE2. 1024-bits was excessive anyway, but it was the size used in .NET's HMAC-SHA512 implementation.
  • Keyed BLAKE2b is now used to combine the associated data with the password bytes before the password bytes are sent to Argon2.
  • Keyed BLAKE2b is used to combine the keyfile bytes with the password bytes instead of HMAC-SHA512.
  • Libsodium is now used to generate random bytes instead of RNGCryptoServiceProvider. This was changed because I can't find any information about RNGCryptoServiceProvider in Mono. This makes no difference for generating random data on Windows, but it likely makes things more secure on Linux & macOS.
  • Removed the AES-CTR encryption algorithm as it was custom made and too slow. AES-CBC is significantly faster and makes CTR redundant.
  • Switched from ISO10126 to PKCS7 padding for AES-CBC. PKCS7 is more widely used, and ISO10126 was withdrawn in 2007.

File Encryption

  • Keyfiles have been reduced from 1024-bits (128 bytes) to 512-bits (64 bytes) as 64 bytes is the max key size for BLAKE2.
  • The Argon2 parameters, salt, and nonce are now stored as headers at the beginning of each encrypted file.
  • Added 128 KiB buffers for reading files larger than 1 MiB. Previously all FileStreams used 4 KiB buffers, except when a file was less than 4 KiB in size.
  • Changed the Argon2 parameters end flag from uppercase to lowercase - '|END|' to '|end|' in the file header.
  • Changed the way the MAC hash is backed up in case decryption fails. It's now stored in memory and appended to the encrypted file if there's an exception. As a last resort, if the append fails, it is written to a '.backup' file. This '.backup' last resort will probably be removed in the future as it's unlikely to work if there's an exception appending the MAC to the file.

Argon2 Benchmark

  • The 500 ms benchmark option has been removed. Now there's either a delay of 250 ms (More Secure) or 150 ms (Fast) per file. This is to help with encrypting a large number of files at once.
  • The Argon2 benchmark now always starts at 10 MiB and stops at 250 MiB. It previously started at either 10 MiB or 50 MiB.

GUI

  • Fixed 'Test Parameters' button in Settings causing crashes on Mono (Linux & macOS).
  • Changed minimum Argon2 iterations to 3 & memory size to 10 MiB in Settings.
  • Removed the Argon2 warning message for high memory size/iteration count combinations in Settings.
  • Removed 'Parallelism' setting as there's no parallelism adjustment with libsodium.
  • Moved 'Encryption Erasure' position in the 'Shred Files Methods' combo box in Settings.
  • Renamed 'Exit Clipboard Clear' to 'Exit Clear Clipboard' in Settings.
  • Made the file encryption form topmost on Linux & macOS to help with drag & drop.
  • Changed the Argon2 benchmark form to a white font colour on Mono.
  • Changed the update link from the Kryptor website to GitHub because I will keep changelogs on GitHub.
  • Adjusted the position of the character set checkboxes on the Password Generator form.
  • The description label has been aligned with the title label on the About form.
  • Now using semantic versioning - displaying 3 version numbers rather than 4 in About.

Other Functionality

  • XChaCha20 is now used instead of AES-CBC for 'Encryption' erasure in Shred Files. XChaCha20 is faster.
  • File.SetLastAccessTime() has been removed in Shred Files because it's pointless - File.Delete() modifies the access time.
  • The version file for update checks now gets deleted after it is read.

Code Improvements

  • Changed lots of &s to && and |s to || for efficiency.
  • Improved the maintainability of dark theme and Mono label alignment code.
  • Rearranged some code into other classes, etc.
  • Quickly reviewed the entire code once more.

Building Kryptor

If you'd like to build Kryptor from source, then please download the master branch. Instructions can be found in the README.

Verifying Signatures

The GPG signatures are attached (the '.sig' files) and so is my public key (the 'kryptor_gpg_key.asc' file). Instructions for verifying the signatures can be found here.

Checksums

Windows - Installer

  • SHA256: 65130a41991431f3d0bf38fa90282eb79d63855cf3ffdafbd8b5fde41b8589ab

Windows - Portable

  • SHA256: db7bee51a842af80a8b937131b130b3825094591d75bcdd332048db2215a852e

Linux - Portable

  • SHA256: 941896a2c6aeb397f991ff9d78648f8c30292415bb6b4ebfc7f121c41d639bc2

macOS - Portable

  • SHA256: 4e3077750baaea47c35142d167ae9f4ea7cd09f9e569ef7039736ffc89118e80

Don't miss a new Kryptor release

NewReleases is sending notifications on new releases.