head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.38
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.36
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.34
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.32
	pgoyette-compat-base:1.2
	perseant-stdc-iso10646:1.2.0.30
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.28
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.26
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.24
	pgoyette-localcount-base:1.2
	netbsd-5-2-3-RELEASE:1.2
	netbsd-5-1-5-RELEASE:1.2
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	tls-earlyentropy:1.2.0.20
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-5-2-2-RELEASE:1.2
	netbsd-5-1-4-RELEASE:1.2
	netbsd-5-2-1-RELEASE:1.2
	netbsd-5-1-3-RELEASE:1.2
	agc-symver:1.2.0.22
	agc-symver-base:1.2
	tls-maxphys-base:1.2
	yamt-pagecache-base8:1.2
	netbsd-5-2:1.2.0.18
	yamt-pagecache-base7:1.2
	netbsd-5-2-RELEASE:1.2
	netbsd-5-2-RC1:1.2
	yamt-pagecache-base6:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-5-1-2-RELEASE:1.2
	netbsd-5-1-1-RELEASE:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.4
	yamt-pagecache-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.16
	bouyer-quota2-base:1.2
	matt-nb5-pq3:1.2.0.14
	matt-nb5-pq3-base:1.2
	netbsd-5-1:1.2.0.12
	netbsd-5-1-RELEASE:1.2
	netbsd-5-1-RC4:1.2
	netbsd-5-1-RC3:1.2
	netbsd-5-1-RC2:1.2
	netbsd-5-1-RC1:1.2
	netbsd-5-0-2-RELEASE:1.2
	netbsd-5-0-1-RELEASE:1.2
	jym-xensuspend-nbase:1.2
	netbsd-5-0:1.2.0.10
	netbsd-5-0-RELEASE:1.2
	netbsd-5-0-RC4:1.2
	netbsd-5-0-RC3:1.2
	netbsd-5-0-RC2:1.2
	jym-xensuspend:1.2.0.8
	jym-xensuspend-base:1.2
	netbsd-5-0-RC1:1.2
	netbsd-5:1.2.0.6
	netbsd-5-base:1.2
	matt-mips64:1.1.1.1.0.36
	netbsd-4-0-1-RELEASE:1.1.1.1
	wrstuden-fixsa-newbase:1.1.1.1
	yamt-pf42-base4:1.2
	yamt-pf42-base3:1.2
	hpcarm-cleanup-nbase:1.2
	yamt-pf42-base2:1.2
	yamt-pf42:1.2.0.2
	yamt-pf42-base:1.2
	keiichi-mipv6:1.1.1.1.0.34
	keiichi-mipv6-base:1.1.1.1
	matt-armv6-nbase:1.1.1.1
	matt-armv6-prevmlocking:1.1.1.1
	wrstuden-fixsa-base-1:1.1.1.1
	netbsd-4-0:1.1.1.1.0.32
	netbsd-4-0-RELEASE:1.1.1.1
	cube-autoconf:1.1.1.1.0.30
	cube-autoconf-base:1.1.1.1
	netbsd-4-0-RC5:1.1.1.1
	netbsd-4-0-RC4:1.1.1.1
	netbsd-4-0-RC3:1.1.1.1
	netbsd-4-0-RC2:1.1.1.1
	netbsd-4-0-RC1:1.1.1.1
	matt-armv6:1.1.1.1.0.28
	matt-armv6-base:1.1.1.1
	matt-mips64-base:1.1.1.1
	hpcarm-cleanup:1.1.1.1.0.26
	hpcarm-cleanup-base:1.1.1.1
	netbsd-3-1-1-RELEASE:1.1.1.1
	netbsd-3-0-3-RELEASE:1.1.1.1
	wrstuden-fixsa:1.1.1.1.0.24
	wrstuden-fixsa-base:1.1.1.1
	abandoned-netbsd-4-base:1.1.1.1
	abandoned-netbsd-4:1.1.1.1.0.18
	netbsd-3-1:1.1.1.1.0.20
	netbsd-3-1-RELEASE:1.1.1.1
	netbsd-3-0-2-RELEASE:1.1.1.1
	netbsd-3-1-RC4:1.1.1.1
	netbsd-3-1-RC3:1.1.1.1
	netbsd-3-1-RC2:1.1.1.1
	netbsd-3-1-RC1:1.1.1.1
	netbsd-4:1.1.1.1.0.22
	netbsd-4-base:1.1.1.1
	netbsd-3-0-1-RELEASE:1.1.1.1
	netbsd-3-0:1.1.1.1.0.16
	netbsd-3-0-RELEASE:1.1.1.1
	netbsd-3-0-RC6:1.1.1.1
	netbsd-3-0-RC5:1.1.1.1
	netbsd-3-0-RC4:1.1.1.1
	netbsd-3-0-RC3:1.1.1.1
	netbsd-3-0-RC2:1.1.1.1
	netbsd-3-0-RC1:1.1.1.1
	netbsd-2-0-3-RELEASE:1.1.1.1
	netbsd-2-1:1.1.1.1.0.14
	netbsd-2-1-RELEASE:1.1.1.1
	netbsd-2-1-RC6:1.1.1.1
	netbsd-2-1-RC5:1.1.1.1
	netbsd-2-1-RC4:1.1.1.1
	netbsd-2-1-RC3:1.1.1.1
	netbsd-2-1-RC2:1.1.1.1
	netbsd-2-1-RC1:1.1.1.1
	netbsd-2-0-2-RELEASE:1.1.1.1
	netbsd-3:1.1.1.1.0.12
	netbsd-3-base:1.1.1.1
	netbsd-2-0-1-RELEASE:1.1.1.1
	netbsd-2:1.1.1.1.0.10
	netbsd-2-base:1.1.1.1
	netbsd-2-0-RELEASE:1.1.1.1
	netbsd-2-0-RC5:1.1.1.1
	netbsd-2-0-RC4:1.1.1.1
	netbsd-2-0-RC3:1.1.1.1
	netbsd-2-0-RC2:1.1.1.1
	netbsd-2-0-RC1:1.1.1.1
	heimdal-1-6-3-merge-to-netbsd-2-0-top:1.1.1.1
	heimdal-0-6-3:1.1.1.1
	heimdal-0-6-2-merge-to-netbsd-2-0:1.1.1.1
	heimdal-0-6-2:1.1.1.1
	heimdal-1-6-1-merge-to-netbsd-2-0:1.1.1.1
	heimdal-0-6-1:1.1.1.1
	netbsd-2-0:1.1.1.1.0.8
	netbsd-2-0-base:1.1.1.1
	netbsd-1-6-PATCH002-RELEASE:1.1.1.1
	netbsd-1-6-PATCH002:1.1.1.1
	netbsd-1-6-PATCH002-RC4:1.1.1.1
	netbsd-1-6-PATCH002-RC3:1.1.1.1
	netbsd-1-6-PATCH002-RC2:1.1.1.1
	netbsd-1-6-PATCH002-RC1:1.1.1.1
	heimdal-0-6:1.1.1.1
	netbsd-1-6-PATCH001:1.1.1.1
	netbsd-1-6-PATCH001-RELEASE:1.1.1.1
	netbsd-1-6-PATCH001-RC3:1.1.1.1
	netbsd-1-6-PATCH001-RC2:1.1.1.1
	netbsd-1-6-PATCH001-RC1:1.1.1.1
	fvdl_fs64_base:1.1.1.1
	heimdal-0-5:1.1.1.1
	netbsd-1-6-RELEASE:1.1.1.1
	netbsd-1-6-RC3:1.1.1.1
	netbsd-1-6-RC2:1.1.1.1
	netbsd-1-6-RC1:1.1.1.1
	netbsd-1-6:1.1.1.1.0.6
	netbsd-1-6-base:1.1.1.1
	netbsd-1-5-PATCH003:1.1.1.1
	v0-4e:1.1.1.1
	netbsd-1-5-PATCH002:1.1.1.1
	v0-3f:1.1.1.1
	netbsd-1-5-PATCH001:1.1.1.1
	v0-3e:1.1.1.1
	netbsd-1-5-RELEASE:1.1.1.1
	netbsd-1-5-BETA2:1.1.1.1
	netbsd-1-5-BETA:1.1.1.1
	netbsd-1-5-ALPHA2:1.1.1.1
	v0-3a:1.1.1.1
	minoura-xpg4dl:1.1.1.1.0.4
	minoura-xpg4dl-base:1.1.1.1
	netbsd-1-5:1.1.1.1.0.2
	netbsd-1-5-base:1.1.1.1
	v0-2t-netbsd-cryptosrc-intl:1.1.1.1
	HEIMDAL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2008.03.22.08.37.08;	author mlelstv;	state dead;
branches;
next	1.1;

1.1
date	2000.06.16.18.32.24;	author thorpej;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.06.16.18.32.24;	author thorpej;	state Exp;
branches
	1.1.1.1.4.1;
next	;

1.1.1.1.4.1
date	2000.06.16.18.32.24;	author thorpej;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2000.06.16.18.32.25;	author thorpej;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Import Heimdal-1.1
@
text
@#!/usr/local/bin/perl

@@PC2_C=(14,17,11,24, 1, 5,
	 3,28,15, 6,21,10,
	23,19,12, 4,26, 8,
	16, 7,27,20,13, 2,
	);

@@PC2_D=(41,52,31,37,47,55,
	30,40,51,45,33,48,
	44,49,39,56,34,53,
	46,42,50,36,29,32,
	);

$i=0;
foreach (@@PC2_C) {
	$_--;
#	printf "%2d,",$_;
	$C{$_}=$i;
	++$i;
#	print "\n" if ((($i) % 8) == 0);
	}
$i=0;
#print "\n";
foreach (@@PC2_D) {
	$_-=28;
	$_--;
#	printf "%2d,",$_;
	$D{$_}=$i;
	$i++;
#	print "\n" if ((($i) % 8) == 0);
	}

#print "\n";
foreach $i (0 .. 27)
	{
	$_=$C{$i};
#	printf "%2d,",$_;
	$i++;
#	print "\n" if ((($i) % 8) == 0);
	}
#print "\n";

#print "\n";
foreach $i (0 .. 27)
	{
	$_=$D{$i};
#	printf "%2d,",$_;
	$i++;
#	print "\n" if ((($i) % 8) == 0);
	}
#print "\n";

print "static ulong skb[8][64]={\n";
&doit("C",*C, 0, 1, 2, 3, 4, 5);
&doit("C",*C, 6, 7, 9,10,11,12);
&doit("C",*C,13,14,15,16,18,19);
&doit("C",*C,20,22,23,25,26,27);

&doit("D",*D, 0, 1, 2, 3, 4, 5);
&doit("D",*D, 7, 8,10,11,12,13);
&doit("D",*D,15,16,17,18,19,20);
&doit("D",*D,21,22,23,24,26,27);
print "};\n";

sub doit
	{
	local($l,*A,@@b)=@@_;
	local(@@out);

	printf("/* for $l bits (numbered as per FIPS 46) %d %d %d %d %d %d */\n",
		$b[0]+1, $b[1]+1, $b[2]+1, $b[3]+1, $b[4]+1, $b[5]+1);
	for ($i=0; $i<64; $i++)
		{
		$out[$i]=0;
		$j=1;
#print "\n";
		for ($k=0; $k<6; $k++)
			{
			$l=$A{$b[$k]};
#print"$l - ";
			if ((1<<$k) & $i)
				{
				$ll=int($l/6)*8+($l%6);
				$out[$i]|=1<<($ll);
				}
			}
		$pp=$out[$i];
		$pp=($pp&0xff0000ff)|   (($pp&0x00ff0000)>>8)|
					(($pp&0x0000ff00)<<8);
		printf("0x%08X,",$pp);
		print "\n" if (($i+1) % 4 == 0);
		}
	}
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import Heimdal Kerberos 5 from cryptosrc-intl.
@
text
@@


1.1.1.1.4.1
log
@file doPC2 was added on branch minoura-xpg4dl on 2000-06-16 18:32:25 +0000
@
text
@d1 94
@


1.1.1.1.4.2
log
@Import Heimdal Kerberos 5 from cryptosrc-intl.
@
text
@a0 94
#!/usr/local/bin/perl

@@PC2_C=(14,17,11,24, 1, 5,
	 3,28,15, 6,21,10,
	23,19,12, 4,26, 8,
	16, 7,27,20,13, 2,
	);

@@PC2_D=(41,52,31,37,47,55,
	30,40,51,45,33,48,
	44,49,39,56,34,53,
	46,42,50,36,29,32,
	);

$i=0;
foreach (@@PC2_C) {
	$_--;
#	printf "%2d,",$_;
	$C{$_}=$i;
	++$i;
#	print "\n" if ((($i) % 8) == 0);
	}
$i=0;
#print "\n";
foreach (@@PC2_D) {
	$_-=28;
	$_--;
#	printf "%2d,",$_;
	$D{$_}=$i;
	$i++;
#	print "\n" if ((($i) % 8) == 0);
	}

#print "\n";
foreach $i (0 .. 27)
	{
	$_=$C{$i};
#	printf "%2d,",$_;
	$i++;
#	print "\n" if ((($i) % 8) == 0);
	}
#print "\n";

#print "\n";
foreach $i (0 .. 27)
	{
	$_=$D{$i};
#	printf "%2d,",$_;
	$i++;
#	print "\n" if ((($i) % 8) == 0);
	}
#print "\n";

print "static ulong skb[8][64]={\n";
&doit("C",*C, 0, 1, 2, 3, 4, 5);
&doit("C",*C, 6, 7, 9,10,11,12);
&doit("C",*C,13,14,15,16,18,19);
&doit("C",*C,20,22,23,25,26,27);

&doit("D",*D, 0, 1, 2, 3, 4, 5);
&doit("D",*D, 7, 8,10,11,12,13);
&doit("D",*D,15,16,17,18,19,20);
&doit("D",*D,21,22,23,24,26,27);
print "};\n";

sub doit
	{
	local($l,*A,@@b)=@@_;
	local(@@out);

	printf("/* for $l bits (numbered as per FIPS 46) %d %d %d %d %d %d */\n",
		$b[0]+1, $b[1]+1, $b[2]+1, $b[3]+1, $b[4]+1, $b[5]+1);
	for ($i=0; $i<64; $i++)
		{
		$out[$i]=0;
		$j=1;
#print "\n";
		for ($k=0; $k<6; $k++)
			{
			$l=$A{$b[$k]};
#print"$l - ";
			if ((1<<$k) & $i)
				{
				$ll=int($l/6)*8+($l%6);
				$out[$i]|=1<<($ll);
				}
			}
		$pp=$out[$i];
		$pp=($pp&0xff0000ff)|   (($pp&0x00ff0000)>>8)|
					(($pp&0x0000ff00)<<8);
		printf("0x%08X,",$pp);
		print "\n" if (($i+1) % 4 == 0);
		}
	}
@
