Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

Jauler
Copy link

@Jauler Jauler commented Jan 7, 2015

I have written a little utility for files encryption and decryption on unix machine. Please have a look :).

file_crypt.c Outdated
goto CLEANUP;

//try to open input file
in_f = fopen(params.input_filename, "r");

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");

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)

@Jauler
Copy link
Author

Jauler commented Apr 30, 2017

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.

@tricong
Copy link

tricong commented Jun 4, 2017

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.

@Jauler
Copy link
Author

Jauler commented Jun 5, 2017

Would you like to convert that hex string to binary? Or encrypt string as is?

@tricong
Copy link

tricong commented Jun 5, 2017

i mean encrypt hex string, example "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710", my file has a lot lines "6bc1....3710".

@tricong
Copy link

tricong commented Jun 5, 2017

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?

@kokke kokke mentioned this pull request Sep 29, 2017
@kokke kokke closed this Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants