NODE 90225fb6Re: Reuter on Bernstein Ruling
Is Snuffle on line anywhere now? If not, anyone got a source? Or is Dan reserving the honor?
6 expanded posts ยท every known parent and child
Is Snuffle on line anywhere now? If not, anyone got a source? Or is Dan reserving the honor?
snuffle and unsnuffle are only 64 lines each... so here they are. You
need snefru also (snuffle for those not following is a construction to
convert a hash function into an encryption function ... Bernstein's
example is set up to use snefru ... a hash function).
Hash function seem be generally exportable, though they are several
constructs which allow you to convert a hash function into an
encryption function, so it's not too clear why they should be exempt.
Probably one reason is that hash functions are used to create and
check signatures, and signature checking and making code
(authentication only) also seems to be allowed for export.
I expect you could come up with some creative ways of using
authentication systems to provide encryption too.
We've already got an MD5 and SHA1 in perl, now all we need is a nice
small implementation (probably in perl) of the below which can be used
for a .sig :-)
So I guess you guys are now allowed to talk about snuffle
implementation and it's design... any comments/reposts etc?
Shall we reimplement it in perl?
Adam
== snuffle.c =================8<==============================
#include <stdio.h>
#include "snefru.h"
#define NMAX 10000
main(argc,argv)
int argc;
char *argv[];
{
register int ch;
static unsigned char x[NMAX];
register unsigned char y = 0;
static unsigned char h[NMAX];
static unsigned char m[32];
static unsigned char l[64];
static unsigned char k[64];
register int n = 64;
register int i;
register WORD32 *wm = &m[0];
register WORD32 *wl = &l[0];
register int level = 3;
SetupHash512();
for (i = 0;i < 64;i++)
x[i] = k[i] = h[i] = 0;
/* What matters is x[9...63], y, k[0...63], h[0...63]. */
i = 0;
while (((ch = getchar()) != EOF) && (ch != '\n'))
if (i < 64)
k[i++] = (unsigned char) ch;
else if (i < 119)
x[i++ - 55] = (unsigned char) ch;
if (argv[1])
for (i = 0;argv[1][i] && (i < 64);i++)
h[i] = argv[1][i];
while ((ch = getchar()) != EOF)
{
if (!(n & 31))
{
for (i = 0;i < 64;i++)
l[i] = k[i] ^ h[n - 64 + i];
Hash512(wm,wl,level,8);
}
x[n] = x[n - 24] + x[n - 55] + ((unsigned char) ch);
h[n] = x[n] + m[n & 31];
y += h[n];
(void) putchar((char) y);
n++;
if (n == NMAX)
{
for (i = 0;i < 64;i++)
{
x[(n & 31) + i] = x[n - 64 + i];
h[(n & 31) + i] = h[n - 64 + i];
}
n = (NMAX & 31) + 64;
}
}
}
==============================8<==============================
= unsnuffl.c =================8<==============================
#include <stdio.h>
#include "snefru.h"
#define NMAX 10000
main(argc,argv)
int argc;
char *argv[];
{
register int ch;
static unsigned char x[NMAX];
register unsigned char y = 0;
static unsigned char h[NMAX];
static unsigned char m[32];
static unsigned char l[64];
static unsigned char k[64];
register int n = 64;
register int i;
register WORD32 *wm = &m[0];
register WORD32 *wl = &l[0];
register int level = 3;
SetupHash512();
for (i = 0;i < 64;i++)
x[i] = k[i] = h[i] = 0;
/* What matters is x[9...63], y, k[0...63], h[0...63]. */
i = 0;
while (((ch = getchar()) != EOF) && (ch != '\n'))
if (i < 64)
k[i++] = (unsigned char) ch;
else if (i < 119)
x[i++ - 55] = (unsigned char) ch;
if (argv[1])
for (i = 0;argv[1][i] && (i < 64);i++)
h[i] = argv[1][i];
while ((ch = getchar()) != EOF)
{
if (!(n & 31))
{
for (i = 0;i < 64;i++)
l[i] = k[i] ^ h[n - 64 + i];
Hash512(wm,wl,level,8);
}
h[n] = ch - y;
y = ch;
x[n] = h[n] - m[n & 31];
(void) putchar((char) (x[n] - x[n - 24] - x[n - 55]));
n++;
if (n == NMAX)
{
for (i = 0;i < 64;i++)
{
x[(n & 31) + i] = x[n - 64 + i];
h[(n & 31) + i] = h[n - 64 + i];
}
n = (NMAX & 31) + 64;
}
}
}
==============================8<==============================On Tue, 26 Aug 1997, Adam Back wrote:
You ->>
You ->>snuffle and unsnuffle are only 64 lines each... so here they are. You
You ->>need snefru also (snuffle for those not following is a construction to
You ->>convert a hash function into an encryption function ... Bernstein's
You ->>example is set up to use snefru ... a hash function).
How can I get snefru and the detailed snuffle algorithm?
I am not from USA(I am from India)....I also wanted the perl
implementations of the algos.....
I heard that C implementation of DES is also available for public use...
I donot want to break any law...and i donot know what exactly the US
say about encryption and related stuff...
TIA
bye,
vijo
***********
_/ _/ Vijo Cherian
_/ _/ Final year undergraduate student,
_/ _/ _/ _/ /__/_/ Computer Engineering,
_/ _/ _/ _/ / |/ SVREC,Surat
_/ _/ _/ | |/ India
_/ | |/
vijo@svrec.ernet.in _/ -/ \____ /
vijo@acm.org -/_/_/ ***************************************At 10:18 PM -0700 9/1/97, Vijo Cherian wrote: > How can I get snefru and the detailed snuffle algorithm? >I am not from USA(I am from India)....I also wanted the perl >implementations of the algos..... > I heard that C implementation of DES is also available for public use... >I donot want to break any law...and i donot know what exactly the US >say about encryption and related stuff... Well, for starters, what are the laws about crypto use in India? (I'm serious. None of our Indian list subscribers, that I can recall, has carefully stated what the Indian laws are.) If it isn't illegal in India, what do you care what some laws in the U.S.A. say? I certainly don't let whatever the laws are in India, or Botswana, or Germany, or Latvia dictate my actions in the U.S. So, when you say "I donot want to break any law," how do you think you could be breaking any laws that bind you? (If you are concerned that using DES could cause you to be subject to kidnapping and wrapping in a Persian carpet by one of the NSA's snatch teams, I expect you have little to worry about. Noriega was kidnapped and spirited out of Panama because he knew the details of Bush's CIA dealings in Panama. I expect you have nothing that scares them.) --Tim May There's something wrong when I'm a felon under an increasing number of laws. Only one response to the key grabbers is warranted: "Death to Tyrants!" ---------:---------:---------:---------:---------:---------:---------:---- Timothy C. May | Crypto Anarchy: encryption, digital money, tcmay@got.net 408-728-0152 | anonymous networks, digital pseudonyms, zero W.A.S.T.E.: Corralitos, CA | knowledge, reputations, information markets, Higher Power: 2^1398269 | black markets, collapse of governments. "National borders aren't even speed bumps on the information superhighway."
On Tue, 2 Sep 1997, Tim May wrote:
You ->>Well, for starters, what are the laws about crypto use in India?
About crypto ,Indian law is silent...it does not put any restriction on
individuals selling or explaining their algo or anything like that
You ->>(I'm serious. None of our Indian list subscribers, that I can recall, has
You ->>carefully stated what the Indian laws are.)
You ->>
You ->>If it isn't illegal in India, what do you care what some laws in the U.S.A.
You ->>say?
OK I will make it little more clear.I meant --I donot want anyone to
break the law for me... and i donot what the laws are....Or how they
censorship ......or anything like that
You ->>I certainly don't let whatever the laws are in India, or Botswana, or
You ->>Germany, or Latvia dictate my actions in the U.S.
Even I donot
You ->>So, when you say "I donot want to break any law," how do you think you
You ->>could be breaking any laws that bind you?
As I mentioned before,I did not make myself very clear when i told that.
You ->>(If you are concerned that using DES could cause you to be subject to
You ->>kidnapping and wrapping in a Persian carpet by one of the NSA's snatch
You ->>teams, I expect you have little to worry about. Noriega was kidnapped and
You ->>spirited out of Panama because he knew the details of Bush's CIA dealings
You ->>in Panama. I expect you have nothing that scares them.)
I never knew of all these........
Ok but the basic question remains
CAN YOU HELP ME????
I am just starting my work for a paper on encryption algorithms.I am quite
new in the feild....so just need some help
TIA,
vijo
***********
_/ _/ Vijo Cherian
_/ _/ Final year undergraduate student,
_/ _/ _/ _/ /__/_/ Computer Engineering,
_/ _/ _/ _/ / |/ SVREC,Surat
_/ _/ _/ | |/ India
_/ | |/
vijo@svrec.ernet.in _/ -/ \____ /
-/_/_/ ***************************************On Tue, Aug 26, 1997 at 11:15:28PM +0100, Adam Back wrote: > > snuffle and unsnuffle are only 64 lines each... so here they are. You > need snefru also (snuffle for those not following is a construction to > convert a hash function into an encryption function ... Bernstein's > example is set up to use snefru ... a hash function). [...] > > Shall we reimplement it in perl? I'm sure you would enjoy the exercise. However, I think it will probably sound better in C :-) [ftp://songbird.com/pub/snuffle.mid -- I may build up a collection of these...] > Adam -- Kent Crispin "No reason to get excited", kent@songbird.com the thief he kindly spoke... PGP fingerprint: B1 8B 72 ED 55 21 5E 44 61 F4 58 0F 72 10 65 55 http://songbird.com/kent/pgp_key.html