How To Create My Own File Encryption Algorithm
-
Hello. I've created a text encryption algorithm and it works fine. The problem is I don't know how to encrype a file. Can anyone tell me how to do that? I don't want any code just some tips. Thanks in advance.
1.) Read the file into a byte[] and convert into base64 string. 2.) Encrypt the text using algo and write it back.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
Hello. I've created a text encryption algorithm and it works fine. The problem is I don't know how to encrype a file. Can anyone tell me how to do that? I don't want any code just some tips. Thanks in advance.
Use this article: Simple encrypting and decrypting data in C#[^]
-
Hello. I've created a text encryption algorithm and it works fine. The problem is I don't know how to encrype a file. Can anyone tell me how to do that? I don't want any code just some tips. Thanks in advance.
Sokka93 wrote:
I've created a text encryption algorithm and it works fine.
Would you like us to take a look at that? It's very easy to make mistakes with that.. By the way, why did you make a new one? It's usually much safer to use a public algorithm that has been extensively analyzed..
-
Sokka93 wrote:
I've created a text encryption algorithm and it works fine.
Would you like us to take a look at that? It's very easy to make mistakes with that.. By the way, why did you make a new one? It's usually much safer to use a public algorithm that has been extensively analyzed..
Because I'm going to use it to enroll a competition. All I'll do is to create a random encryption algorithm. It works with text but the problem is I create the key and I can't think any way of giving the key to someone. Because the key is random too. So I decided to use it to encrypte files.
-
Because I'm going to use it to enroll a competition. All I'll do is to create a random encryption algorithm. It works with text but the problem is I create the key and I can't think any way of giving the key to someone. Because the key is random too. So I decided to use it to encrypte files.
-
Are there any restrictions on the format of your key or is it just a number? If it's just a number, you could use Diffie-Hellman key exchange right (so your key won't be leaked in any way)
No not just numbers. Letters and numbers. BTW Is it a problem for a key to be long? Are there any restrictions about it? Because the key can be so long. My algorith decides Its length according to the lenght of the text. So the key might be so long. I plan to put the text into a cube and turn it according to random numbers. Like The Cube Of Rubik. ANd I'm thinking of saving all the moves and create a key with it.
-
No not just numbers. Letters and numbers. BTW Is it a problem for a key to be long? Are there any restrictions about it? Because the key can be so long. My algorith decides Its length according to the lenght of the text. So the key might be so long. I plan to put the text into a cube and turn it according to random numbers. Like The Cube Of Rubik. ANd I'm thinking of saving all the moves and create a key with it.
note: I apologize in advance for any errors I may make. Letters are numbers too of course, but I meant that if your key has a specific format then you have to do an extra step to compress your key to raw binary (and you have to be able to reverse that operation from any binary string), otherwise the result of the DH-exchange is "not a key" For DH-exchange the key can be arbitrarily long, but when it's several KB's long it becomes somewhat slow (prohibitively slow for 10KB+)