Skip to content

patyogesh/Secure-Copy-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure-Copy-Tool

#How To Run The file encryption programs gatorcrypt and gatordec should take the following inputs:

gatorcrypt [-d IP-addr:port][-l]

gatordec [-d ][-l]

#Internal Details about Encryption and Decryption

where gatorcrypt takes an input file and transmits it to the IP address/port specified on the command-line (-d option), or dumps the encrypted contents of the input file to an output file of the same name, but with the added extension `` .uf'' e.g., if the input file is hello.txt, the output file should hello.txt.uf. Note that the gatordec should run as a network daemon (-d), awaiting incoming network connections on the command-line specified network port. When a connection comes in, it writes the file data to "filename" and exits. gatordec can also be run in local mode (-l) in which it bypasses the network functionality and simply decrypts a file specified as input. It is assumed that the input file (for decryption) ends ".uf", so the output will be the original filename without this additional extension. (This is simply the inverse of gatorcrypt).

On each invocation, gatorcrypt and gatordec prompts the user for a password. This password will be used to securely generate an encryption using PBKDF2 (Password Based Key Derivation Function 2). When running PBKDF2, use SHA-512 with 4096 iterations and the string "NaCl" as the salt. libgcrypt implements PBKDF2, so use their implementation. After generation, for grading the key should be printed as a hexadecimal number as in the example execution below. Encryption is done using AES128 in Cipher Block Chaining (CBC) Mode. Initializes the IV of each invocation to 5844 (the integer, not the ASCII character). In addition to encryption, gatorcrypt and gatordec also uses an HMAC for authentication. On encryption, the HMAC isappended to the output, and on decryption it is be removed before writing the output. gatordec gives an error and exit (with exit code 62) if the input HMAC is not correct. Hash function used is: SHA-512 , and HMAC the encrypted data. Libgcrypt provides SHA-512 and provides a flag to use it in HMAC mode. Same key as encryption is used (for simplicity). Both gatorcrypt and gatordec display an error and abort the operation if the output file already exists. main() returns 33 when this happens.

About

Secure Copy Tool for local and remote copying of data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published