|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lava.security.des.spec.DesPermutation
DES permutation tables.
Details: This class provides convenient access to all of the permutation functions described in the official DES specification. This class defines one variable for each permutation.
Field Summary | |
static DesPermutation |
fkcp
Final key compression permutation. |
static DesPermutation |
ftp
Final text permutation. |
static DesPermutation |
ikcp
Initial key compression permutation. |
static DesPermutation |
itp
Initial text permutation. |
static DesPermutation |
pbp
P box permutation. |
static DesPermutation |
tep
Text expansion permutation. |
Method Summary | |
int |
getFipsValue(int fipsindex)
Returns value from permutation table. |
int |
getReorderedValue(int bitindex)
Returns value from reordered permutation table. |
int |
getTableSize()
Returns table size. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final DesPermutation ikcp
Details: This instance describes the initial key compression permutation, identified in FIPS PUB 46-2 as "permuted choice 1" (PC-1).
public static final DesPermutation fkcp
Details: This instance describes the final key compression permutation, identified in FIPS PUB 46-2 as "permuted choice 2" (PC-2).
public static final DesPermutation itp
Details: This instance describes the initial text permutation, which is identified in FIPS PUB 46-2 as the "initial permutation" (IP).
public static final DesPermutation ftp
Details: This instance describes the final text permutation, identified in FIPS PUB 46-2 as the "inverse of the initial permutation" (IP-1).
public static final DesPermutation tep
Details: This instance describes the text expansion permutation, identified in FIPS PUB 46-2 as the function "E" ("E bit-selection table").
public static final DesPermutation pbp
Details: This instance describes the P box permutation, identified in FIPS PUB 46-2 as the "primitive function P".
Method Detail |
public final int getTableSize()
Details: This method returns the number of entries in the permutation table.
public final int getFipsValue(int fipsindex)
Details: This method returns an entry from the table. Both the index into the table and the returned value correspond to the FIPS bit numbering scheme. (The leftmost bit is bit number 1.) fipsindex is the index of the output bit, and the return value is the index of the input bit.
For example, if getFipsValue(7)
returns 3, then bit 7 of the permutation function's output is the same as bit 3 of the permutation function's input.
fipsindex
- the index of the output bitpublic final int getReorderedValue(int bitindex)
Details: This method returns an entry from the "reordered" table. By "reordered", we mean that bits are numbered as naturally as possible for software, with the right most bit indexed as "0" and the indeces increasing to the right. bitindex is the index of the output bit, and the return value is the index of the input bit.
For example, if getFipsValue(7)
returns 3, then bit 7 of the permutation function's output is the same as bit 3 of the permutation function's input.
bitindex
- the index of the output bit
|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |