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

How to encrypt a string with des in pure C?

I mean to write the DES Algorithm myself.

Feb 25 '06 #1
13 2398
In article <11**********************@i39g2000cwa.googlegroups .com>,
lnzju <ge*******@gmail.com> wrote:
I mean to write the DES Algorithm myself.


I'm sure you can find plenty of DES encryption programs by
just googling for them.

Unless, that is, your government [China] is blocking those sites:
if so then it might not be the best of ideas for us to post the
algorithm.
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes
Feb 25 '06 #2
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!

Why are you telling us this? There is no question there. You can write the
*code*, you can not write the algorithm. The algorithm is what *makes* the
thing DES.
Feb 25 '06 #3
On 2006-02-25, osmium <r1********@comcast.net> wrote:
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!

Why are you telling us this? There is no question there. You can
write the *code*, you can not write the algorithm. The algorithm is
what *makes* the thing DES.


Well, he could find a new and inventive way of getting the same results,
and then prove that it does yield the same results for all input.

[I suspect he'd be a bit out of his depth to attempt to do so, though]
Feb 25 '06 #4

osmium wrote:
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!

Why are you telling us this? There is no question there. You can write the
*code*, you can not write the algorithm. The algorithm is what *makes* the
thing DES.

sorry,I just mean to encrypt a string with the exist algorithm in C

Feb 25 '06 #5
lnzju wrote:
osmium wrote:
"lnzju" writes:
I mean to write the DES Algorithm myself.

PLEASE DON'T POST THIS GD HTML!

Why are you telling us this? There is no question there. You can write the
*code*, you can not write the algorithm. The algorithm is what *makes* the
thing DES.

sorry,I just mean to encrypt a string with the exist algorithm in C

Then use google to find it.
Feb 25 '06 #6
osmium wrote:
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!


He didn't post in html. You are apparently using buggy Micro$loth
software.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Feb 25 '06 #7
osmium skrev:
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!


Don't assume, make sure before you complain.
This is from the OPs header:

Content-Type: text/plain; charset="gb2312"

He's using simplified chinese charset, and if your newsreader can't
handle it the way you desire it to do, then trash it.

--
OU
Feb 25 '06 #8

"CBFalconer" <cb********@yahoo.com> wrote in message
news:44***************@yahoo.com...
osmium wrote:
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!


He didn't post in html. You are apparently using buggy Micro$loth
software.


I'm using outhouse express and I didn't see it as html. Go figure.

--
MrG{DRGN}
Feb 26 '06 #9
"MrG{DRGN}" writes:

"CBFalconer" <cb********@yahoo.com> wrote in message
news:44***************@yahoo.com...
osmium wrote:
"lnzju" writes:

I mean to write the DES Algorithm myself.

PLEASE DON'T POST THIS GD HTML!


He didn't post in html. You are apparently using buggy Micro$loth
software.


I'm using outhouse express and I didn't see it as html. Go figure.


The thing that triggered my outburst was apparently character set gb2312
where gb does not stand for Great Britain. I really don't mind reading HTML
that much, my annoyance was that I can not easily break the chain and revert
to normal type. (Which is not to say there is not a way to do this.) But I
see in this case my response reverted to plain text; so it wasn't really
HTML, it just looked like HTML. I saw a largish sans serif font, as a rough
guess, it looked like Arial to me.

I suppose it is a revision level thing, this computer is about a year old
and I refuse to let those Redmond types do their automatic update thing.
Feb 26 '06 #10
On 2006-02-26, osmium <r1********@comcast.net> wrote:
"MrG{DRGN}" writes:

"CBFalconer" <cb********@yahoo.com> wrote in message
news:44***************@yahoo.com...
osmium wrote:
"lnzju" writes:

> I mean to write the DES Algorithm myself.

PLEASE DON'T POST THIS GD HTML!

He didn't post in html. You are apparently using buggy Micro$loth
software.
I'm using outhouse express and I didn't see it as html. Go figure.


The thing that triggered my outburst was apparently character set
gb2312 where gb does not stand for Great Britain. I really don't mind
reading HTML that much, my annoyance was that I can not easily break
the chain and revert to normal type. (Which is not to say there is not
a way to do this.) But I see in this case my response reverted to
plain text; so it wasn't really HTML, it just looked like HTML. I saw
a largish sans serif font, as a rough guess, it looked like Arial to
me.


Probably some chinese font. Many news readers will select a font
appropriate to the character set when available, even if no characters
are used that aren't representable by the default font. It also might
have selected a unicode font - Arial Unicode MS, perhaps, which ships
with office and covers the entire unicode set as of some revision.
I suppose it is a revision level thing, this computer is about a year
old and I refuse to let those Redmond types do their automatic update
thing.


Or you just misinterpreted what you saw. A sans serif font does not "it
looked like html" make.

If you couldn't tell if it was HTML or not, leave the complaints to
someone who can [since, after all, it doesn't affect you. if it _were_
html, it would affect me (since my newsreader doesn't handle html) since
i would be actually seeing html tags.]
Feb 26 '06 #11
"osmium" <r1********@comcast.net> wrote in message
news:46************@individual.net...
"lnzju" writes:
I mean to write the DES Algorithm myself.


PLEASE DON'T POST THIS GD HTML!


He didn't post in HTML. What makes his text look different in some
newsreaders (such as your OE) is that it was encoded in GB2312.

S

--
Stephen Sprunk "Stupid people surround themselves with smart
CCIE #3723 people. Smart people surround themselves with
K5SSS smart people who disagree with them." --Aaron Sorkin

*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
Feb 26 '06 #12
On Sat, 25 Feb 2006 01:29:49 +0000 (UTC), ro******@ibd.nrc-cnrc.gc.ca
(Walter Roberson) wrote:
In article <11**********************@i39g2000cwa.googlegroups .com>,
lnzju <ge*******@gmail.com> wrote:
I mean to write the DES Algorithm myself.
I'm sure you can find plenty of DES encryption programs by
just googling for them.

That's certainly true.
Unless, that is, your government [China] is blocking those sites:
if so then it might not be the best of ideas for us to post the
algorithm.


I don't see why -- most of us (including apparently you and certainly
me) live under governments that allow it. Even during the days of ITAR
the US officially only prohibited implementations, not algorithms. The
worst that could happen is that he wouldn't see it, which would leave
him no worse off than now.

There are certainly lots of places to find the algorithm as well, but
if you want an official one, it's at csrc.nist.gov, the Computer
Security Resource Center of the National Institute for Standards and
Technology of the Commerce Department, successor to the National
Bureau of Standards which originally published it. The slightly tricky
bit is that it's no longer officially a "FIPS" (Federal Information
Processing Standard); after being superseded by AES (the Advanced
Encryption Standard, FIPS 197, aka Rijndael) FIPS 46-3 was withdrawn,
but the document is still available, and the same _algorithm_ DEA is
still specified as part of TDEA (usually called triple-DES or 3DES) in
Special Publication 800-67.

In case the OP or anyone else doesn't know, I will point out that
(classic, single) DES/DEA is now in reach of brute force attack and
not secure again a serious adversary. If you actually want _security_,
not specifically DES, use something better. The simplest and usually
easiest is AES; if you don't want that, sci.crypt is a good place to
learn about other choices. (After you explain why not AES.)

- David.Thompson1 at worldnet.att.net
Mar 6 '06 #13
In article <ap********************************@4ax.com>,
Dave Thompson <da*************@worldnet.att.net> wrote:
On Sat, 25 Feb 2006 01:29:49 +0000 (UTC), ro******@ibd.nrc-cnrc.gc.ca
(Walter Roberson) wrote:
Unless, that is, your government [China] is blocking those sites:
if so then it might not be the best of ideas for us to post the
algorithm.

I don't see why -- most of us (including apparently you and certainly
me) live under governments that allow it. Even during the days of ITAR
the US officially only prohibited implementations, not algorithms. The
worst that could happen is that he wouldn't see it, which would leave
him no worse off than now.


Call me a coward if you will, but I don't need the Government of
China considering me to be An Enemy of the State. Particularily
not from my work account, considering that I work for the Government
of Canada.
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton
Mar 6 '06 #14

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

Similar topics

1
by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does...
20
by: Drebin | last post by:
It's a long story really, but the bottom line is we need to encrypt or obfuscate a clear-text 9-digit SSN/taxpayer ID into something less than 21 characters. It doesn't need to be super-secure,...
7
by: Matthias S. | last post by:
Hi, I had a look at the vast information on encryption in the MSDN and got pretty confused. All I want to do is to encrypt a string into an encrypted string and later decrypt that (encrypted)...
8
by: Gidi | last post by:
Hi, Is there Buid-In fuction in C# that Encrypt and Decrypt strings? i have a textbox which i'm writing into file, and i want to encrypt it before writing, i'm not looking for something fancy,...
8
by: toupeira23 | last post by:
Hello, I'm trying to encrypt passwords in my app. After discovering that there's no simple function to do this, I wrote a wrapper class which decodes a string using UTF8, encrypts it with...
4
by: Islamegy® | last post by:
I give up.. I tried everything to encrypt querystring and decrypt it back but this never success.. i use RSA encryption. I always get excption when Convert fromBase64String so i tried...
2
by: fineman | last post by:
Hi all, I want to get a 64bit(8 bytes) Encrypt result use DES class in the VS2005. Though I encrypt data is 64bit(8 bytes), but DES return encrypt result that always is 128bit(16 bytes), I don't...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
0
by: lildiapaz | last post by:
Hi, everyone I'm developing a c# windows application that allows the user to encrypt any file type. i would like to encrypt the file using a powerful encrypting algorithm. I've tried to use the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.