Filencryp - A file encryptor

About

This is a file encryption and decryption software used to encrypt a file using aes_gcm library. Providing a seperate key to facilitate decryption

Known issues

  • Significant speed drop on encryption, because of the algorithm.
  • Inability to decrypt with stream

  • [ ] Switch to aes_gcm_stream to allow decryption above 16kb
  • [ ] Generate unique nonce per file using OsRng.
    // Reuse key and nonce bytes
    let key = Aes256Gcm::generate_key(&mut OsRng);
    let mut nonce_bytes = [0; 12];
    let cipher = Aes256Gcm::new(&key);
    OsRng.fill_bytes(&mut nonce_bytes);
    let nonce = Nonce::from_slice(&decrypt.as_bytes());
    let altNonce = Nonce::from_slice(nonce_bytes);
        
  • [ ] Save file nonce within the encrypted file. By Saving the nonce in the file as plaintext in a set byte range of maybe 12. Then having the encrypted data after the 12th byte