diff options
| author | beck <> | 2000-04-15 06:18:51 +0000 |
|---|---|---|
| committer | beck <> | 2000-04-15 06:18:51 +0000 |
| commit | b608c7f2b175e121f2c22d53341a317153afdc8e (patch) | |
| tree | e94b160b3fcd8180df79e4251d68d24d665f0195 /src/lib/libcrypto/des/doIP | |
| parent | c8d6701c396cebdcd0d45eac73b762e9498f6b01 (diff) | |
| download | openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.tar.gz openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.tar.bz2 openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.zip | |
OpenSSL 0.9.5a merge
Diffstat (limited to 'src/lib/libcrypto/des/doIP')
| -rw-r--r-- | src/lib/libcrypto/des/doIP | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/lib/libcrypto/des/doIP b/src/lib/libcrypto/des/doIP index 18cf231303..e69de29bb2 100644 --- a/src/lib/libcrypto/des/doIP +++ b/src/lib/libcrypto/des/doIP | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | @l=( | ||
| 4 | 0, 1, 2, 3, 4, 5, 6, 7, | ||
| 5 | 8, 9,10,11,12,13,14,15, | ||
| 6 | 16,17,18,19,20,21,22,23, | ||
| 7 | 24,25,26,27,28,29,30,31 | ||
| 8 | ); | ||
| 9 | @r=( | ||
| 10 | 32,33,34,35,36,37,38,39, | ||
| 11 | 40,41,42,43,44,45,46,47, | ||
| 12 | 48,49,50,51,52,53,54,55, | ||
| 13 | 56,57,58,59,60,61,62,63 | ||
| 14 | ); | ||
| 15 | |||
| 16 | require 'shifts.pl'; | ||
| 17 | |||
| 18 | sub PERM_OP | ||
| 19 | { | ||
| 20 | local(*a,*b,*t,$n,$m)=@_; | ||
| 21 | |||
| 22 | @z=&shift(*a,-$n); | ||
| 23 | @z=&xor(*b,*z); | ||
| 24 | @z=&and(*z,$m); | ||
| 25 | @b=&xor(*b,*z); | ||
| 26 | @z=&shift(*z,$n); | ||
| 27 | @a=&xor(*a,*z); | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | @L=@l; | ||
| 32 | @R=@r; | ||
| 33 | &PERM_OP(*R,*L,*T,4,0x0f0f0f0f); | ||
| 34 | &PERM_OP(*L,*R,*T,16,0x0000ffff); | ||
| 35 | &PERM_OP(*R,*L,*T,2,0x33333333); | ||
| 36 | &PERM_OP(*L,*R,*T,8,0x00ff00ff); | ||
| 37 | &PERM_OP(*R,*L,*T,1,0x55555555); | ||
| 38 | &printit(@L); | ||
| 39 | &printit(@R); | ||
| 40 | &PERM_OP(*R,*L,*T,1,0x55555555); | ||
| 41 | &PERM_OP(*L,*R,*T,8,0x00ff00ff); | ||
| 42 | &PERM_OP(*R,*L,*T,2,0x33333333); | ||
| 43 | &PERM_OP(*L,*R,*T,16,0x0000ffff); | ||
| 44 | &PERM_OP(*R,*L,*T,4,0x0f0f0f0f); | ||
| 45 | &printit(@L); | ||
| 46 | &printit(@R); | ||
