473,473 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.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 2396
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: 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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.