473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem appending to an encrypted file

How can this be done?

Thanks
Nov 17 '05 #1
4 1849
Jasper,

Sure, but you can't just write to the file. Most encryption methods are
based on values that were encrypted earlier in the file, so just appending
to the end would prevent decryption.

What you really need to do is decrypt the data in the file, append to
that data, then re-encrypt the file.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"jasper" <ja******@hotmail.com> wrote in message
news:%SOcf.26370$2k5.10459@dukeread09...
How can this be done?

Thanks

Nov 17 '05 #2
This guy did it....I cant get it working tho...
http://www.mcse.ms/archive113-2004-10-1157980.html
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eu**************@TK2MSFTNGP14.phx.gbl...
Jasper,

Sure, but you can't just write to the file. Most encryption methods
are based on values that were encrypted earlier in the file, so just
appending to the end would prevent decryption.

What you really need to do is decrypt the data in the file, append to
that data, then re-encrypt the file.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"jasper" <ja******@hotmail.com> wrote in message
news:%SOcf.26370$2k5.10459@dukeread09...
How can this be done?

Thanks


Nov 17 '05 #3
Do it record based. So each record gets encrypted/decrypted independently
of other records. That way, your not dependant on anything before or after
a record. Probably what I would do is length prepend each record instead of
using delimiter(s).

--
William Stacey [MVP]

"jasper" <ja******@hotmail.com> wrote in message
news:QfQcf.26379$2k5.2759@dukeread09...
This guy did it....I cant get it working tho...
http://www.mcse.ms/archive113-2004-10-1157980.html
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:eu**************@TK2MSFTNGP14.phx.gbl...
Jasper,

Sure, but you can't just write to the file. Most encryption methods
are based on values that were encrypted earlier in the file, so just
appending to the end would prevent decryption.

What you really need to do is decrypt the data in the file, append to
that data, then re-encrypt the file.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"jasper" <ja******@hotmail.com> wrote in message
news:%SOcf.26370$2k5.10459@dukeread09...
How can this be done?

Thanks



Nov 17 '05 #4
jasper wrote:
This guy did it....I cant get it working tho...
http://www.mcse.ms/archive113-2004-10-1157980.html


Read carefully what Valery says in this thread, he's very respected for
his knowledge about security.

The reasons for CBC and padding are to make your encryption as secure as
possible. If you decide to remove padding, and to change the cipher mode
to ECB, then you give crackers a small advantage because repeated blocks
in the cleartext may appear in the ciphertext. You have to ba;ance the
reduction in your security with the advantage you get of being able to
append blocks to the end of encrypted text.

Personally, where security is concerned, I don't think anything is worth
having to compromise your security.

Here's some more about private key cryptography:

http://www.grimes.demon.co.uk/workshops/secWSTen.htm

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: chris | last post by:
I'm writing a small app to help me learn more about cryptography. All it does is encrypt all of the files in directory A, and put the encrypted versions of the files in directory B. It then...
10
by: crawlerxp | last post by:
This is the problem: I do not get the output I need when encoding and decoding data using rijndael alghoritm. Look at the code and see what the problem is actually: Please paste this code into...
0
by: Yanick | last post by:
This is a duplicate post from microsoft.public.access.security. As suggest by TC (from the same group) I repost my problem here. I hope to find help here. Thanks!...
7
by: c duden | last post by:
I am attempting to encrypt some text and be able to decrypt it at a later time. I have two methods to do this: public static Byte EncryptText(string textToEncrypt, string encryptionHash) {...
4
by: Debbie Carter | last post by:
Would anyone know how to read the file attributes of a file on the hard drive to check if the file is encrypted or not? I have searched Visual Studio Help and MSDN and the samples I have found do...
8
by: robert | last post by:
Hello, I want to put (incrementally) changed/new files from a big file tree "directly,compressed and password-only-encrypted" to a remote backup server incrementally via FTP,SFTP or DAV.... At...
5
by: John | last post by:
Hi I am trying to set a new password using the following code; Dim u As MembershipUser = Membership.GetUser(UserName) Dim OldPassword As String OldPassword = u.GetPassword If...
22
by: Wilson | last post by:
i am learning to program using c++ and was set a task of making a simple encryption algorithim. I choose to start with one where simply each letter is replaced with its equivilent in the alphabet...
3
by: =?Utf-8?B?TG9yZW4=?= | last post by:
I’m trying to encrypt and decrypt a file in vb.net. I am using the TripleDESCryptoServiceProvider encryption found in System.Security.Cryptography. Below is the code for my Encrypt and Decrypt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.