-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utility for file encryption and decryption on unix machines #10
Conversation
file_crypt.c
Outdated
goto CLEANUP; | ||
|
||
//try to open input file | ||
in_f = fopen(params.input_filename, "r"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to "rb" (read-only binary)
file_crypt.c
Outdated
} | ||
|
||
//Try to open output file | ||
out_f = fopen(params.output_filename, "w"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to "wb" (write binary)
When I wrote those changes (few years ago) I changed initialisation vector storage place. But now I think, that this is a bad Idea, as there is no way to reset it for new encryption session, so I removed that commit. |
How can i read hexa string from file01 then encrypt them using AES128_ECB_encrypt(). After that, write encypted result to file02. I am a newbie. Plz help me. Thank u. |
Would you like to convert that hex string to binary? Or encrypt string as is? |
i mean encrypt hex string, example "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710", my file has a lot lines "6bc1....3710". |
From tiny-AES-128 program I have to compute the execution time of encryption and decryption in ECB and CBC mode. Do you have any solution to help me? |
I have written a little utility for files encryption and decryption on unix machine. Please have a look :).