example code for your use 
Author Message
 example code for your use

I have written a nice (I think so) little program in C to help me learn the use
of the language.  I'm not sure if it's legal to post an encryption algorithm
that uses a 128 bit key.  I'd like to offer it to whoever wants to see the code
so that they might can use parts of it or learn from it or whatever.

Below is a text mode screen shot of the program.  It is a simple IDEA
calculator that takes an input and a key and makes an output, or an output and
key to find an input.  The cursor is moved by the arrow keys and the space bar
toggles the value of the bit or nibble it sits on.  F11 saves and F12 loads a
saved state.  The program is of no real use, other than educational values, as
the key space and avalanche properties of the IDEA algorithm is too great to be
comprehended by the human mind.  It is little more than a crypto-analysis tool
for the algorithm.

If you would like to look over the source code, e-mail me and I'll send it to
ya if ya live in the USA.  I'm not sure export laws allow 128 bit crypto
algorithms to be exported.  However, I can point you in the right direction to
where you can get the source for the IDEA algorithm that was used in the
program below.  I can still send you the main() function.

I realize that these stupid crypto laws are a direct infringement of my first
amendment constitutional right!

_______________________________________________________________________________
    Input:  00 01 02 03 04 05 06 07
 00000000  00000001  00000010  00000011  00000100  00000101  00000110  00000111

Using Key:  01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10
 00000001  00000010  00000011  00000100  00000101  00000110  00000111  00001000
 00001001  00001010  00001011  00001100  00001101  00001110  00001111  00010000

Encrypt Subkey:
  0000000100000010    0000001100000100    0000010100000110    0000011100001000
  0000100100001010    0000101100001100    0000110100001110    0000111100010000
  0000100000001010    0000110000001110    0001000000010010    0001010000010110
  0001100000011010    0001110000011110    0010000000000010    0000010000000110
  0001110000100000    0010010000101000    0010110000110000    0011010000111000
  0011110001000000    0000010000001000    0000110000010000    0001010000011000
  0101000001011000    0110000001101000    0111000001111000    1000000000001000
  0001000000011000    0010000000101000    0011000000111000    0100000001001000
  1101000011100000    1111000100000000    0001000000100000    0011000001000000
  0101000001100000    0111000010000000    1001000010100000    1011000011000000
  0000000000100000    0100000001100000    1000000010100000    1100000011100001
  0000000100100001    0100000101100001    1000000110100001    1100000111100010
  1100000100000001    0100000110000001    1100001000000010    0100001010000010

   Output:  59 4D BB A4 98 27 D4 78
 01011001  01001101  10111011  10100100  10011000  00100111  11010100  01111000
_______________________________________________________________________________
--



Tue, 22 Apr 2003 03:00:00 GMT  
 example code for your use
[this reply written in comp.lang.c - sci.crypt will have a different
perspective]

Quote:

> I have written a nice (I think so) little program in C to help me learn the use
> of the language.  I'm not sure if it's legal to post an encryption algorithm
> that uses a 128 bit key.  I'd like to offer it to whoever wants to see the code
> so that they might can use parts of it or learn from it or whatever.

> Below is a text mode screen shot of the program.  It is a simple IDEA
> calculator that takes an input and a key and makes an output, or an output and
> key to find an input.  The cursor is moved by the arrow keys and the space bar
> toggles the value of the bit or nibble it sits on.  F11 saves and F12 loads a
> saved state.  The program is of no real use, other than educational values, as
> the key space and avalanche properties of the IDEA algorithm is too great to be
> comprehended by the human mind.  It is little more than a crypto-analysis tool
> for the algorithm.
>From comp.lang.c's point of view, the program appears to use features of

a particular compiler. The interface parts of it, at least, are not
topical here. You don't mention which platform it is for. This could be
rather important for people wishing to use it.

Quote:

> If you would like to look over the source code, e-mail me and I'll send it to
> ya if ya live in the USA.  I'm not sure export laws allow 128 bit crypto
> algorithms to be exported.  However, I can point you in the right direction to
> where you can get the source for the IDEA algorithm that was used in the
> program below.  I can still send you the main() function.

You are right to be cautious. I'm not sure whether you're being overly
cautious or not. I live outside the USA, and have full electronic source
code for DES, TwoFish, Blowfish, etc, quite legally. (I bought the
relevant books, and typed in the code!)

Quote:

> I realize that these stupid crypto laws are a direct infringement of my first
> amendment constitutional right!

No. You can print out the source code and snailmail it. Legally! Just
don't send it on a floppy disk or CD-ROM. Those might well be illegal.
You gotta love USA logic...

--
Richard Heathfield
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
--



Fri, 25 Apr 2003 03:00:00 GMT  
 example code for your use

Quote:
>I have written a nice (I think so) little program in C to help me learn the use
>of the language.  I'm not sure if it's legal to post an encryption algorithm
>that uses a 128 bit key.

Yes in the Free world but probably not in the USA.

Quote:
> I'd like to offer it to whoever wants to see the code
>so that they might can use parts of it or learn from it or whatever.

There are several crypto News groups where you will probably get a
better response. Crypto is a very specialised field. Have a look at the
links from www.counterpane.com.

Quote:
>If you would like to look over the source code, e-mail me and I'll send it to
>ya if ya live in the USA.  I'm not sure export laws allow 128 bit crypto
>algorithms to be exported.  However, I can point you in the right direction to
>where you can get the source for the IDEA algorithm that was used in the
>program below.  I can still send you the main() function.

AFAIK IDEA is Swiss and therefore originated outside the USA
anyway?

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
--



Fri, 25 Apr 2003 03:00:00 GMT  
 example code for your use

Quote:

> No. You can print out the source code and snailmail it. Legally! Just
> don't send it on a floppy disk or CD-ROM. Those might well be illegal.
> You gotta love USA logic...

Not any more. The USA no longer has any restrictions on sending
crypto to Europe, Japan, and several other countries. I think
they wanted to make Al{*filter*}more electable. Meanwhile, the UK
is becoming one of the most crypto-unfriendly countries in the
free world.
--



Sat, 26 Apr 2003 10:56:53 GMT  
 example code for your use

Quote:


> > No. You can print out the source code and snailmail it. Legally! Just
> > don't send it on a floppy disk or CD-ROM. Those might well be illegal.
> > You gotta love USA logic...

> Not any more. The USA no longer has any restrictions on sending
> crypto to Europe, Japan, and several other countries. I think
> they wanted to make Al{*filter*}more electable. Meanwhile, the UK
> is becoming one of the most crypto-unfriendly countries in the
> free world.

On the contrary. The UK Government loves enciphered messages - so much
so, in fact, that it wants to read them all.

--
Richard Heathfield
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.*-*-*.com/ ~scs/C-faq/top.html
K&R answers, C books, etc: http://www.*-*-*.com/
--



Sun, 27 Apr 2003 09:48:00 GMT  
 example code for your use
Da Big Book quoteth on 03 Nov 2000 23:00:27 GMT, famous Monk

Quote:
> I have written a nice (I think so) little program in C to help me learn the use
> of the language.  I'm not sure if it's legal to post an encryption algorithm
> that uses a 128 bit key.  I'd like to offer it to whoever wants to see the code
> so that they might can use parts of it or learn from it or whatever.

[snip]
I'd be interrested out of curiosity :)
however...  I live in Europe.

Quote:
> If you would like to look over the source code, e-mail me and I'll send it to
> ya if ya live in the USA.  I'm not sure export laws allow 128 bit crypto
> algorithms to be exported.  However, I can point you in the right direction to
> where you can get the source for the IDEA algorithm that was used in the
> program below.  I can still send you the main() function.

[snip]
point ahead :)
I don't know if it's still forbidden, but you could just as well
modify your program and have an "international 40 bits" version...
once one has the code, getting it from 128 to 40 to 128 bits shouldn't
be too complicated :)

As someone pointed however, you might indicate/document for which
computer (I'd guess at a PC) and OS and compiler it's meant.

Quote:
> I realize that these stupid crypto laws are a direct infringement of my first
> amendment constitutional right!

How about ours :)  [not that onyone cares]

Serge

------------------------------------------------------------------------------
  The opinions expressed are mine and none other's
------------------------------------------------------------------------------
Serge Marelli

--



Tue, 17 Jun 2003 02:35:55 GMT  
 example code for your use

Quote:

> Da Big Book quoteth on 03 Nov 2000 23:00:27 GMT, famous Monk

> > I have written a nice (I think so) little program in C to help me
learn the use
> > of the language.  I'm not sure if it's legal to post an encryption
algorithm
> > that uses a 128 bit key.  I'd like to offer it to whoever wants to
see the code
> > so that they might can use parts of it or learn from it or whatever.

> [snip]
> I'd be interrested out of curiosity :)
> however...  I live in Europe.

> > If you would like to look over the source code, e-mail me and I'll
send it to
> > ya if ya live in the USA.  I'm not sure export laws allow 128 bit
crypto
> > algorithms to be exported.  However, I can point you in the right
direction to
> > where you can get the source for the IDEA algorithm that was used
in the
> > program below.  I can still send you the main() function.

> [snip]
> point ahead :)
> I don't know if it's still forbidden, but you could just as well
> modify your program and have an "international 40 bits" version...
> once one has the code, getting it from 128 to 40 to 128 bits shouldn't
> be too complicated :)

> As someone pointed however, you might indicate/document for which
> computer (I'd guess at a PC) and OS and compiler it's meant.

> > I realize that these stupid crypto laws are a direct infringement
of my first
> > amendment constitutional right!

> How about ours :)  [not that onyone cares]

> Serge

> ----------------------------------------------------------------------
--------
>   The opinions expressed are mine and none other's
> ----------------------------------------------------------------------
--------
> Serge Marelli

> --


I often wonder how successful that export legislation has been, have
any convictions been made on it?

Simon.
--
Hi, i'm the signuture virus,
help me spread by copying me into Signiture File
--



Tue, 17 Jun 2003 13:28:53 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. ISequentialStream read using attributed code : example required

2. Using filters within C code - example

3. ISequentialStream read using attributed code : example required

4. code examples using ofstream

5. Proposal: alt.binaries.examples.vb4 , alt.binaries.examples.vcpp , alt.binaries.examples.java

6. C Code Examples

7. VC++.NET sample code examples

8. Help: Problem with comparing floating point numbers (example source code and output is given)

9. Any example of C# codes accessing HTTP Server?

10. Where to download the example code?

11. Where can I find source code examples?

12. Example code

 

 
Powered by phpBB® Forum Software