473,218 Members | 1,501 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,218 software developers and data experts.

.net framework AND Unix code for encryption/decryption.

Hi, I need to encrypt/decrypt some data for my C# application that can
also be read on a unix system, and need a quick, simple, cross-platform
solution I can embed in my own code that doesn't require dependencies
on outside applications.

I don't know much about encryption. What I would like to do is come up
with an encryption/decryption code that will work with my C#/.NET
framework windows code (there are a number of cryptographic functions
built into the .net framework) AND a unix program (could be perl,
python, shell, C, etc). One requirement is that it should run on
virtually any unix system without installing additional software.

AES, DES, public key, anything is really fine, but it should be a
simple solution.

I have tried experimenting with a lot of code out there, but I am
unfamiliar enough with the process that I can't get it to work, e.g., I
create an encrypted file with my C# app, try to decrypt it using a PERL
or python scrip on the other end, and, I can't get it to work.

If you have code in both C# on the .net side and on the unix side that
would be greatly appreciated!

Thanks!

Feb 16 '06 #1
2 2378
IMO, you should try harder... The algorithms you mention are all standard
and _should_ work. I say you should try harder because there could be
secondary issues like character set problems when you move encrypted data
across platforms... Encrypted files could be treated like text file when
you move them to *NIX and could have, for example, have CR/LF <--> LF
translation mistakenly applied.

For example, you could encrypt a file, take an MD5 checksum, transmit the
file, and take the MD5 checksum of it on the target platform. If the MD5
checksum matches, then you had no transmission problems, if there is a
problem decrypting the file, then the problem for sure is in the
encryption/decryption methods.

I think you have to make a better effort at diagnosing the problem. A
library that can encrypt/decrypt using standard algorithms should not care
where the data came from.
Feb 16 '06 #2
Hi Gabriel,

All security library writers seek to consume and produce cipher text others
can use. (Text protected by encryption ciphers are all "serialized" and
"deserialized" around published block and streaming serialization rules and
standards. I am too lazy to look up the exact word here, hence the
wordiness. My bad.)

Things to look out for: 1) check endieness at the very worst; 2) look for
and address any other type of encoding the sender/receiver of the
cipher-text may have introduced.

Best personal regards,
-- Li-fan
--
Li-fan Chen
Software analyst/developer, Entrepreneur
Markham, Ontario, Canada
"Gabriel Magaña" <no*****@no-spam.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
IMO, you should try harder... The algorithms you mention are all standard
and _should_ work. I say you should try harder because there could be
secondary issues like character set problems when you move encrypted data
across platforms... Encrypted files could be treated like text file when
you move them to *NIX and could have, for example, have CR/LF <--> LF
translation mistakenly applied.

For example, you could encrypt a file, take an MD5 checksum, transmit the
file, and take the MD5 checksum of it on the target platform. If the MD5
checksum matches, then you had no transmission problems, if there is a
problem decrypting the file, then the problem for sure is in the
encryption/decryption methods.

I think you have to make a better effort at diagnosing the problem. A
library that can encrypt/decrypt using standard algorithms should not care
where the data came from.

Feb 16 '06 #3

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

Similar topics

3
by: Ralph Freshour | last post by:
I'm having trouble decrypting a file I encrypted and wrote to the server - the following code displays the $decrypted_string variable but the data is still encrypted - any help would be...
1
by: D. Alvarado | last post by:
On my Fedora Core 2 Linux dev box, I have installed mcrypt and compiled PHP with the --with-mcrypt option. I am concerned that when I move to another hosting enviornment mcrypt will not be...
4
by: Harold Crump | last post by:
Greetings, I have a requirement of storing some .xml files on a web server. The files will contain financial information like credit card numbers, so I would like to encrypt them. The files...
4
by: John Smith | last post by:
My program includes a use of strstr(). It looks like this: if(strstr(*str1, *str2) ........... After compiling the code, I opened the program with a hex editor (this is on Windows). Sure...
2
by: sushant.bhatia | last post by:
Hi All. I'm using the NCrypto dll for RSA Encryption/Decryption (http://sourceforge.net/projects/ncrypto/). My encryption code in .Net is pretty simple. The dataToEncrypt length is 1024. The...
20
by: vermarajeev | last post by:
Hi guys, I have some text files. I need to encrypt the files and then decrypt it again. This is my first experience in encryption and decryption. I want some suggestions about how this can be...
25
by: eggie5 | last post by:
I have a form where a user can change his password, but I'm confused on how to prevent this from being transmitted in plain text. Well, I know how not to transmit it in plain text - use any type...
9
by: Betikci Boris | last post by:
I get bored last night and wrote a script that uses xor for encrypt- decrypt, however it woks fine under linux 2.6.25, text and documents are ok, but fails on compressed files *.jpg, *.pdf , etc ....
9
by: Alan M Dunsmuir | last post by:
In my (PHP-5) application I have to write some records to a table in my database, which I don't want even my clients using the system to be able to read. This is not a problem in National...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.