'DES加解密算法实现 vb版 v1.0
'
'作者: agamem
'日期: 2003年08月27日
'
'
'
Option Explicit
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
'置换表
Private IP(63) As Byte 'IP置换码
Private IP_1(63) As Byte 'IP-1置换码
Private E(47) As Byte 'E膨胀码
Private P(31) As Byte 'P变换码
Private S1(3, 15) As Byte 'S盒1
Private S2(3, 15) As Byte 'S盒2
Private S3(3, 15) As Byte 'S盒3
Private S4(3, 15) As Byte 'S盒4
Private S5(3, 15) As Byte 'S盒5
Private S6(3, 15) As Byte 'S盒6
Private S7(3, 15) As Byte 'S盒7
Private S8(3, 15) As Byte 'S盒8
Private PC_1(55) As Byte
Private PC_2(47) As Byte
Private Lsi(16) As Byte '循环左移位
Private Sub Class_Initialize()
Dim i As Integer
IP(0) = 57 ' 58
IP(1) = 49 ' 50
IP(2) = 41 ' 42
IP(3) = 33 ' 34
IP(4) = 25 ' 26
IP(5) = 17 ' 18
IP(6) = 9 ' 10
IP(7) = 1 ' 2
IP(8) = 59 ' 60
IP(9) = 51 ' 52
IP(10) = 43 ' 44
IP(11) = 35 ' 36
IP(12) = 27 ' 28
IP(13) = 19 ' 20
IP(14) = 11 ' 12
IP(15) = 3 ' 4
IP(16) = 61 ' 62
IP(17) = 53 ' 54
IP(18) = 45 ' 46
IP(19) = 37 ' 38
IP(20) = 29 ' 30
IP(21) = 21 ' 22
IP(22) = 13 ' 14
IP(23) = 5 ' 6
IP(24) = 63 ' 64
IP(25) = 55 ' 56
IP(26) = 47 ' 48
IP(27) = 39 ' 40
IP(28) = 31 ' 32
IP(29) = 23 ' 24
IP(30) = 15 ' 16
IP(31) = 7 ' 8
IP(32) = 56 ' 57
IP(33) = 48 ' 49
IP(34) = 40 ' 41
IP(35) = 32 ' 33
IP(36) = 24 ' 25
IP(37) = 16 ' 17
IP(38) = 8 ' 9
IP(39) = 0 ' 1
IP(40) = 58 ' 59
IP(41) = 50 ' 51
IP(42) = 42 ' 43
IP(43) = 34 ' 35
IP(44) = 26 ' 27
IP(45) = 18 ' 19
IP(46) = 10 ' 11
IP(47) = 2 ' 3
IP(48) = 60 ' 61
IP(49) = 52 ' 53
IP(50) = 44 ' 45
IP(51) = 36 ' 37
IP(52) = 28 ' 29
IP(53) = 20 ' 21
IP(54) = 12 ' 13
IP(55) = 4 ' 5
IP(56) = 62 ' 63
IP(57) = 54 ' 55
IP(58) = 46 ' 47
IP(59) = 38 ' 39
IP(60) = 30 ' 31
IP(61) = 22 ' 23
IP(62) = 14 ' 15
IP(63) = 6 ' 7
IP_1(0) = 39 ' 40
IP_1(1) = 7 ' 8
IP_1(2) = 47 ' 48
IP_1(3) = 15 ' 16
IP_1(4) = 55 ' 56
IP_1(5) = 23 ' 24
IP_1(6) = 63 ' 64
IP_1(7) = 31 ' 32
IP_1(8) = 38 ' 39
IP_1(9) = 6 ' 7
IP_1(10) = 46 ' 47
IP_1(11) = 14 ' 15
IP_1(12) = 54 ' 55
IP_1(13) = 22 ' 23
IP_1(14) = 62 ' 63
IP_1(15) = 30 ' 31
IP_1(16) = 37 ' 38
IP_1(17) = 5 ' 6
IP_1(18) = 45 ' 46
IP_1(19) = 13 ' 14
IP_1(20) = 53 ' 54
IP_1(21) = 21 ' 22
IP_1(22) = 61 ' 62
IP_1(23) = 29 ' 30
IP_1(24) = 36 ' 37
IP_1(25) = 4 ' 5
IP_1(26) = 44 ' 45
IP_1(27) = 12 ' 13
IP_1(28) = 52 ' 53
IP_1(29) = 20 ' 21
IP_1(30) = 60 ' 61
IP_1(31) = 28 ' 29
IP_1(32) = 35 ' 36
IP_1(33) = 3 ' 4
IP_1(34) = 43 ' 44
IP_1(35) = 11 ' 12
IP_1(36) = 51 ' 52
IP_1(37) = 19 ' 20
IP_1(38) = 59 ' 60
IP_1(39) = 27 ' 28
IP_1(40) = 34 ' 35
IP_1(41) = 2 ' 3
IP_1(42) = 42 ' 43
IP_1(43) = 10 ' 11
IP_1(44) = 50 ' 51
IP_1(45) = 18 ' 19
IP_1(46) = 58 ' 59
IP_1(47) = 26 ' 27
IP_1(48) = 33 ' 34
IP_1(49) = 1 ' 2
IP_1(50) = 41 ' 42
IP_1(51) = 9 ' 10
IP_1(52) = 49 ' 50
IP_1(53) = 17 ' 18
IP_1(54) = 57 ' 58
IP_1(55) = 25 ' 26
IP_1(56) = 32 ' 33
IP_1(57) = 0 ' 1
IP_1(58) = 40 ' 41
IP_1(59) = 8 ' 9
IP_1(60) = 48 ' 49
IP_1(61) = 16 ' 17
IP_1(62) = 56 ' 57
IP_1(63) = 24 ' 25
E(0) = 31
For i = 1 To 5
E(i) = i - 1
Next
For i = 6 To 11
E(i) = i - 3
Next
For i = 12 To 17
E(i) = i - 5
Next
For i = 18 To 23
E(i) = i - 7
Next
For i = 24 To 29
E(i) = i - 9
Next
For i = 30 To 35
E(i) = i - 11
Next
For i = 36 To 41
E(i) = i - 13
Next
For i = 42 To 46
E(i) = i - 15
Next
E(47) = 30
P(0) = 15 ' 16
P(1) = 6 ' 7
P(2) = 19 ' 20
P(3) = 20 ' 21
P(4) = 28 ' 29
P(5) = 11 ' 12
P(6) = 27 ' 28
P(7) = 16 ' 17
P(8) = 0 ' 1
P(9) = 14 ' 15
P(10) = 22 ' 23
P(11) = 25 ' 26
P(12) = 4 ' 5
P(13) = 17 ' 18
P(14) = 30 ' 31
P(15) = 9 ' 10
P(16) = 1 ' 2
P(17) = 7 ' 8
P(18) = 23 ' 24
P(19) = 13 ' 14
P(20) = 31 ' 32
P(21) = 26 ' 27
P(22) = 2 ' 3
P(23) = 8 ' 9
P(24) = 18 ' 19
P(25) = 12 ' 13
P(26) = 29 ' 30
P(27) = 5 ' 6
P(28) = 21 ' 22
P(29) = 10 ' 11
P(30) = 3 ' 4
P(31) = 24 ' 25
S1(0, 0) = 14
S1(0, 1) = 4
S1(0, 2) = 13
S1(0, 3) = 1
S1(0, 4) = 2
S1(0, 5) = 15
S1(0, 6) = 11
S1(0, 7) = 8
S1(0, 8) = 3
S1(0, 9) = 10
S1(0, 10) = 6
S1(0, 11) = 12
S1(0, 12) = 5
S1(0, 13) = 9
S1(0, 14) = 0
S1(0, 15) = 7
S1(1, 0) = 0
S1(1, 1) = 15
S1(1, 2) = 7
S1(1, 3) = 4
S1(1, 4) = 14
S1(1, 5) = 2
S1(1, 6) = 13
S1(1, 7) = 1
S1(1, 8) = 10
S1(1, 9) = 6
S1(1, 10) = 12
S1(1, 11) = 11
S1(1, 12) = 9
S1(1, 13) = 5
S1(1, 14) = 3
S1(1, 15) = 8
S1(2, 0) = 4
S1(2, 1) = 1
S1(2, 2) = 14
S1(2, 3) = 8
S1(2, 4) = 13
S1(2, 5) = 6
S1(2, 6) = 2
S1(2, 7) = 11
S1(2, 8) = 15
S1(2, 9) = 12
S1(2, 10) = 9
S1(2, 11) = 7
S1(2, 12) = 3
S1(2, 13) = 10
S1(2, 14) = 5
S1(2, 15) = 0
S1(3, 0) = 15
S1(3, 1) = 12
S1(3, 2) = 8
S1(3, 3) = 2
S1(3, 4) = 4
S1(3, 5) = 9
S1(3, 6) = 1
S1(3, 7) = 7
S1(3, 8) = 5
S1(3, 9) = 11
S1(3, 10) = 3
S1(3, 11) = 14
S1(3, 12) = 10
S1(3, 13) = 0
S1(3, 14) = 6
S1(3, 15) = 13
S2(0, 0) = 15
S2(0, 1) = 1
S2(0, 2) = 8
S2(0, 3) = 14
S2(0, 4) = 6
S2(0, 5) = 11
S2(0, 6) = 3
S2(0, 7) = 4
S2(0, 8) = 9
S2(0, 9) = 7
S2(0, 10) = 2
S2(0, 11) = 13
S2(0, 12) = 12
S2(0, 13) = 0
S2(0, 14) = 5
S2(0, 15) = 10
S2(1, 0) = 3
S2(1, 1) = 13
S2(1, 2) = 4
S2(1, 3) = 7
S2(1, 4) = 15
S2(1, 5) = 2
S2(1, 6) = 8
S2(1, 7) = 14
S2(1, 8) = 12
S2(1, 9) = 0
S2(1, 10) = 1
S2(1, 11) = 10
S2(1, 12) = 6
S2(1, 13) = 9
S2(1, 14) = 11
S2(1, 15) = 5
S2(2, 0) = 0
S2(2, 1) = 14
S2(2, 2) = 7
S2(2, 3) = 11
S2(2, 4) = 10
S2(2, 5) = 4
S2(2, 6) = 13
S2(2, 7) = 1
S2(2, 8) = 5
S2(2, 9) = 8
S2(2, 10) = 12
S2(2, 11) = 6
S2(2, 12) = 9
S2(2, 13) = 3
S2(2, 14) = 2
S2(2, 15) = 15
S2(3, 0) = 13
S2(3, 1) = 8
S2(3, 2) = 10
S2(3, 3) = 1
S2(3, 4) = 3
S2(3, 5) = 15
S2(3, 6) = 4
S2(3, 7) = 2
S2(3, 8) = 11
S2(3, 9) = 6
S2(3, 10) = 7
S2(3, 11) = 12
S2(3, 12) = 0
S2(3, 13) = 5
S2(3, 14) = 14
S2(3, 15) = 9
S3(0, 0) = 10
S3(0, 1) = 0
S3(0, 2) = 9
S3(0, 3) = 14
S3(0, 4) = 6
S3(0, 5) = 3
S3(0, 6) = 15
S3(0, 7) = 5
S3(0, 8) = 1
S3(0, 9) = 13
S3(0, 10) = 12
S3(0, 11) = 7
S3(0, 12) = 11
S3(0, 13) = 4
S3(0, 14) = 2
S3(0, 15) = 8
S3(1, 0) = 13
S3(1, 1) = 7
S3(1, 2) = 0
S3(1, 3) = 9
S3(1, 4) = 3
S3(1, 5) = 4
S3(1, 6) = 6
S3(1, 7) = 10
S3(1, 8) = 2
S3(1, 9) = 8
S3(1, 10) = 5
S3(1, 11) = 14
S3(1, 12) = 12
S3(1, 13) = 11
S3(1, 14) = 15
S3(1, 15) = 1
S3(2, 0) = 13
S3(2, 1) = 6
S3(2, 2) = 4
S3(2, 3) = 9
S3(2, 4) = 8
S3(2, 5) = 15
S3(2, 6) = 3
S3(2, 7) = 0
S3(2, 8) = 11
S3(2, 9) = 1
S3(2, 10) = 2
S3(2, 11) = 12
S3(2, 12) = 5
S3(2, 13) = 10
S3(2, 14) = 14
S3(2, 15) = 7
S3(3, 0) = 1
S3(3, 1) = 10
S3(3, 2) = 13
S3(3, 3) = 0
S3(3, 4) = 6
S3(3, 5) = 9
S3(3, 6) = 8
S3(3, 7) = 7
S3(3, 8) = 4
S3(3, 9) = 15
S3(3, 10) = 14
S3(3, 11) = 3
S3(3, 12) = 11
S3(3, 13) = 5
S3(3, 14) = 2
S3(3, 15) = 12
S4(0, 0) = 7
S4(0, 1) = 13
S4(0, 2) = 14
S4(0, 3) = 3
S4(0, 4) = 0
S4(0, 5) = 6
S4(0, 6) = 9
S4(0, 7) = 10
S4(0, 8) = 1
S4(0, 9) = 2
S4(0, 10) = 8
S4(0, 11) = 5
S4(0, 12) = 11
S4(0, 13) = 12
S4(0, 14) = 4
S4(0, 15) = 15
S4(1, 0) = 13
S4(1, 1) = 8
S4(1, 2) = 11
S4(1, 3) = 5
S4(1, 4) = 6
S4(1, 5) = 15
S4(1, 6) = 0
S4(1, 7) = 3
S4(1, 8) = 4
S4(1, 9) = 7
S4(1, 10) = 2
S4(1, 11) = 12
S4(1, 12) = 1
S4(1, 13) = 10
S4(1, 14) = 14
S4(1, 15) = 9
S4(2, 0) = 10
S4(2, 1) = 6
S4(2, 2) = 9
S4(2, 3) = 0
S4(2, 4) = 12
S4(2, 5) = 11
S4(2, 6) = 7
S4(2, 7) = 13
S4(2, 8) = 15
S4(2, 9) = 1
S4(2, 10) = 3
S4(2, 11) = 14
S4(2, 12) = 5
S4(2, 13) = 2
S4(2, 14) = 8
S4(2, 15) = 4
S4(3, 0) = 3
S4(3, 1) = 15
S4(3, 2) = 0
S4(3, 3) = 6
S4(3, 4) = 10
S4(3, 5) = 1
S4(3, 6) = 13
S4(3, 7) = 8
S4(3, 8) = 9
S4(3, 9) = 4
S4(3, 10) = 5
S4(3, 11) = 11
S4(3, 12) = 12
S4(3, 13) = 7
S4(3, 14) = 2
S4(3, 15) = 14
S5(0, 0) = 2
S5(0, 1) = 12
S5(0, 2) = 4
S5(0, 3) = 1
S5(0, 4) = 7
S5(0, 5) = 10
S5(0, 6) = 11
S5(0, 7) = 6
S5(0, 8) = 8
S5(0, 9) = 5
S5(0, 10) = 3
S5(0, 11) = 15
S5(0, 12) = 13
S5(0, 13) = 0
S5(0, 14) = 14
S5(0, 15) = 9
S5(1, 0) = 14
S5(1, 1) = 11
S5(1, 2) = 2
S5(1, 3) = 12
S5(1, 4) = 4
S5(1, 5) = 7
S5(1, 6) = 13
S5(1, 7) = 1
S5(1, 8) = 5
S5(1, 9) = 0
S5(1, 10) = 15
S5(1, 11) = 10
S5(1, 12) = 3
S5(1, 13) = 9
S5(1, 14) = 8
S5(1, 15) = 6
S5(2, 0) = 4
S5(2, 1) = 2
S5(2, 2) = 1
S5(2, 3) = 11
S5(2, 4) = 10
S5(2, 5) = 13
S5(2, 6) = 7
S5(2, 7) = 8
S5(2, 8) = 15
S5(2, 9) = 9
S5(2, 10) = 12
S5(2, 11) = 5
S5(2, 12) = 6
S5(2, 13) = 3
S5(2, 14) = 0
S5(2, 15) = 14
S5(3, 0) = 11
S5(3, 1) = 8
S5(3, 2) = 12
S5(3, 3) = 7
S5(3, 4) = 1
S5(3, 5) = 14
S5(3, 6) = 2
S5(3, 7) = 13
S5(3, 8) = 6
S5(3, 9) = 15
S5(3, 10) = 0
S5(3, 11) = 9
S5(3, 12) = 10
S5(3, 13) = 4
S5(3, 14) = 5
S5(3, 15) = 3
S6(0, 0) = 12
S6(0, 1) = 1
S6(0, 2) = 10
S6(0, 3) = 15
S6(0, 4) = 9
S6(0, 5) = 2
S6(0, 6) = 6
S6(0, 7) = 8
S6(0, 8) = 0
S6(0, 9) = 13
S6(0, 10) = 3
S6(0, 11) = 4
S6(0, 12) = 14
S6(0, 13) = 7
S6(0, 14) = 5
S6(0, 15) = 11
S6(1, 0) = 10
S6(1, 1) = 15
S6(1, 2) = 4
S6(1, 3) = 2
S6(1, 4) = 7
S6(1, 5) = 12
S6(1, 6) = 9
S6(1, 7) = 5
S6(1, 8) = 6
S6(1, 9) = 1
S6(1, 10) = 13
S6(1, 11) = 14
S6(1, 12) = 0
S6(1, 13) = 11
S6(1, 14) = 3
S6(1, 15) = 8
S6(2, 0) = 9
S6(2, 1) = 14
S6(2, 2) = 15
S6(2, 3) = 5
S6(2, 4) = 2
S6(2, 5) = 8
S6(2, 6) = 12
S6(2, 7) = 3
S6(2, 8) = 7
S6(2, 9) = 0
S6(2, 10) = 4
S6(2, 11) = 10
S6(2, 12) = 1
S6(2, 13) = 13
S6(2, 14) = 11
S6(2, 15) = 6
S6(3, 0) = 4
S6(3, 1) = 3
S6(3, 2) = 2
S6(3, 3) = 12
S6(3, 4) = 9
S6(3, 5) = 5
S6(3, 6) = 15
S6(3, 7) = 10
S6(3, 8) = 11
S6(3, 9) = 14
S6(3, 10) = 1
S6(3, 11) = 7
S6(3, 12) = 6
S6(3, 13) = 0
S6(3, 14) = 8
S6(3, 15) = 13
S7(0, 0) = 4
S7(0, 1) = 11
S7(0, 2) = 2
S7(0, 3) = 14
S7(0, 4) = 15
S7(0, 5) = 0
S7(0, 6) = 8
S7(0, 7) = 13
S7(0, 8) = 3
S7(0, 9) = 12
S7(0, 10) = 9
S7(0, 11) = 7
S7(0, 12) = 5
S7(0, 13) = 10
S7(0, 14) = 6
S7(0, 15) = 1
S7(1, 0) = 13
S7(1, 1) = 0
S7(1, 2) = 11
S7(1, 3) = 7
S7(1, 4) = 4
S7(1, 5) = 9
S7(1, 6) = 1
S7(1, 7) = 10
S7(1, 8) = 14
S7(1, 9) = 3
S7(1, 10) = 5
S7(1, 11) = 12
S7(1, 12) = 2
S7(1, 13) = 15
S7(1, 14) = 8
S7(1, 15) = 6
S7(2, 0) = 1
S7(2, 1) = 4
S7(2, 2) = 11
S7(2, 3) = 13
S7(2, 4) = 12
S7(2, 5) = 3
S7(2, 6) = 7
S7(2, 7) = 14
S7(2, 8) = 10
S7(2, 9) = 15
S7(2, 10) = 6
S7(2, 11) = 8
S7(2, 12) = 0
S7(2, 13) = 5
S7(2, 14) = 9
S7(2, 15) = 2
S7(3, 0) = 6
S7(3, 1) = 11
S7(3, 2) = 13
S7(3, 3) = 8
S7(3, 4) = 1
S7(3, 5) = 4
S7(3, 6) = 10
S7(3, 7) = 7
S7(3, 8) = 9
S7(3, 9) = 5
S7(3, 10) = 0
S7(3, 11) = 15
S7(3, 12) = 14
S7(3, 13) = 2
S7(3, 14) = 3
S7(3, 15) = 12
S8(0, 0) = 13
S8(0, 1) = 2
S8(0, 2) = 8
S8(0, 3) = 4
S8(0, 4) = 6
S8(0, 5) = 15
S8(0, 6) = 11
S8(0, 7) = 1
S8(0, 8) = 10
S8(0, 9) = 9
S8(0, 10) = 3
S8(0, 11) = 14
S8(0, 12) = 5
S8(0, 13) = 0
S8(0, 14) = 12
S8(0, 15) = 7
S8(1, 0) = 1
S8(1, 1) = 15
S8(1, 2) = 13
S8(1, 3) = 8
S8(1, 4) = 10
S8(1, 5) = 3
S8(1, 6) = 7
S8(1, 7) = 4
S8(1, 8) = 12
S8(1, 9) = 5
S8(1, 10) = 6
S8(1, 11) = 11
S8(1, 12) = 0
S8(1, 13) = 14
S8(1, 14) = 9
S8(1, 15) = 2
S8(2, 0) = 7
S8(2, 1) = 11
S8(2, 2) = 4
S8(2, 3) = 1
S8(2, 4) = 9
S8(2, 5) = 12
S8(2, 6) = 14
S8(2, 7) = 2
S8(2, 8) = 0
S8(2, 9) = 6
S8(2, 10) = 10
S8(2, 11) = 13
S8(2, 12) = 15
S8(2, 13) = 3
S8(2, 14) = 5
S8(2, 15) = 8
S8(3, 0) = 2
S8(3, 1) = 1
S8(3, 2) = 14
S8(3, 3) = 7
S8(3, 4) = 4
S8(3, 5) = 10
S8(3, 6) = 8
S8(3, 7) = 13
S8(3, 8) = 15
S8(3, 9) = 12
S8(3, 10) = 9
S8(3, 11) = 0
S8(3, 12) = 3
S8(3, 13) = 5
S8(3, 14) = 6
S8(3, 15) = 11
PC_1(0) = 56 ' 57
PC_1(1) = 48 ' 49
PC_1(2) = 40 ' 41
PC_1(3) = 32 ' 33
PC_1(4) = 24 ' 25
PC_1(5) = 16 ' 17
PC_1(6) = 8 ' 9
PC_1(7) = 0 ' 1
PC_1(8) = 57 ' 58
PC_1(9) = 49 ' 50
PC_1(10) = 41 ' 42
PC_1(11) = 33 ' 34
PC_1(12) = 25 ' 26
PC_1(13) = 17 ' 18
PC_1(14) = 9 ' 10
PC_1(15) = 1 ' 2
PC_1(16) = 58 ' 59
PC_1(17) = 50 ' 51
PC_1(18) = 42 ' 43
PC_1(19) = 34 ' 35
PC_1(20) = 26 ' 27
PC_1(21) = 18 ' 19
PC_1(22) = 10 ' 11
PC_1(23) = 2 ' 3
PC_1(24) = 59 ' 60
PC_1(25) = 51 ' 52
PC_1(26) = 43 ' 44
PC_1(27) = 35 ' 36
PC_1(28) = 62 ' 63
PC_1(29) = 54 ' 55
PC_1(30) = 46 ' 47
PC_1(31) = 38 ' 39
PC_1(32) = 30 ' 31
PC_1(33) = 22 ' 23
PC_1(34) = 14 ' 15
PC_1(35) = 6 ' 7
PC_1(36) = 61 ' 62
PC_1(37) = 53 ' 54
PC_1(38) = 45 ' 46
PC_1(39) = 37 ' 38
PC_1(40) = 29 ' 30
PC_1(41) = 21 ' 22
PC_1(42) = 13 ' 14
PC_1(43) = 5 ' 6
PC_1(44) = 60 ' 61
PC_1(45) = 52 ' 53
PC_1(46) = 44 ' 45
PC_1(47) = 36 ' 37
PC_1(48) = 28 ' 29
PC_1(49) = 20 ' 21
PC_1(50) = 12 ' 13
PC_1(51) = 4 ' 5
PC_1(52) = 27 ' 28
PC_1(53) = 19 ' 20
PC_1(54) = 11 ' 12
PC_1(55) = 3 ' 4
PC_2(0) = 13 ' 14
PC_2(1) = 16 ' 17
PC_2(2) = 10 ' 11
PC_2(3) = 23 ' 24
PC_2(4) = 0 ' 1
PC_2(5) = 4 ' 5
PC_2(6) = 2 ' 3
PC_2(7) = 27 ' 28
PC_2(8) = 14 ' 15
PC_2(9) = 5 ' 6
PC_2(10) = 20 ' 21
PC_2(11) = 9 ' 10
PC_2(12) = 22 ' 23
PC_2(13) = 18 ' 19
PC_2(14) = 11 ' 12
PC_2(15) = 3 ' 4
PC_2(16) = 25 ' 26
PC_2(17) = 7 ' 8
PC_2(18) = 15 ' 16
PC_2(19) = 6 ' 7
PC_2(20) = 26 ' 27
PC_2(21) = 19 ' 20
PC_2(22) = 12 ' 13
PC_2(23) = 1 ' 2
PC_2(24) = 40 ' 41
PC_2(25) = 51 ' 52
PC_2(26) = 30 ' 31
PC_2(27) = 36 ' 37
PC_2(28) = 46 ' 47
PC_2(29) = 54 ' 55
PC_2(30) = 29 ' 30
PC_2(31) = 39 ' 40
PC_2(32) = 50 ' 51
PC_2(33) = 44 ' 45
PC_2(34) = 32 ' 33
PC_2(35) = 47 ' 48
PC_2(36) = 43 ' 44
PC_2(37) = 48 ' 49
PC_2(38) = 38 ' 39
PC_2(39) = 55 ' 56
PC_2(40) = 33 ' 34
PC_2(41) = 52 ' 53
PC_2(42) = 45 ' 46
PC_2(43) = 41 ' 42
PC_2(44) = 49 ' 50
PC_2(45) = 35 ' 36
PC_2(46) = 28 ' 29
PC_2(47) = 31 ' 32
Lsi(1) = 1
Lsi(2) = 1
Lsi(3) = 2
Lsi(4) = 2
Lsi(5) = 2
Lsi(6) = 2
Lsi(7) = 2
Lsi(8) = 2
Lsi(9) = 1
Lsi(10) = 2
Lsi(11) = 2
Lsi(12) = 2
Lsi(13) = 2
Lsi(14) = 2
Lsi(15) = 2
Lsi(16) = 1
End Sub