Skip navigation links

Oracle Security Developer Tools Crypto Java API Reference
11g (11.1.1)

E10668-02


oracle.security.crypto.core
Class DESKey

java.lang.Object
  extended by oracle.security.crypto.core.SymmetricKey
      extended by oracle.security.crypto.core.DESKey

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, Key

public final class DESKey
extends SymmetricKey

Subclass of SymmetricKey that provides the facilities to perform checks against the possible weakness of the SymmetricKey as it might be used in DES operations.

Since:
2.2.3
See Also:
Serialized Form

Method Summary
static boolean checkParity(SymmetricKey key, int parity)
          Check the least significant bit of each key byte for the parity indicated -- 1 for odd parity or 0 for even parity.
static boolean isPossiblyWeak(SymmetricKey key)
          Determines whether or not a given DES key is considered "possibly weak".
static boolean isSemiWeak(SymmetricKey key)
          Determines whether or not a given DES key is considered "semi-weak".
static boolean isWeak(SymmetricKey key)
          Determines whether or not a given DES key is considered "weak".
static void setParity(SymmetricKey key, int parity)
          Set the least significant bit of each key byte so that it has the parity indicated -- 1 for odd parity or 0 for even parity.

 

Methods inherited from class oracle.security.crypto.core.SymmetricKey
assertAllowExport, clone, equals, erase, finalize, getAlgID, getAlgorithm, getAllowExport, getBitLength, getBytes, getEncoded, getFormat, keySize, readExternal, setAlgID, setAllowExport, setBytes, toString, writeExternal

 

Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Method Detail

isWeak

public static boolean isWeak(SymmetricKey key)
Determines whether or not a given DES key is considered "weak".
Since:
3.0

isSemiWeak

public static boolean isSemiWeak(SymmetricKey key)
Determines whether or not a given DES key is considered "semi-weak".
Since:
3.0

isPossiblyWeak

public static boolean isPossiblyWeak(SymmetricKey key)
Determines whether or not a given DES key is considered "possibly weak".
Since:
3.0

checkParity

public static boolean checkParity(SymmetricKey key,
                                  int parity)
Check the least significant bit of each key byte for the parity indicated -- 1 for odd parity or 0 for even parity.
Parameters:
key - The DES key to check.
parity - 1 for odd parity or 0 for even parity.
Returns:
true if each byte has the specified parity, otherwise false.
Since:
3.0

setParity

public static void setParity(SymmetricKey key,
                             int parity)
Set the least significant bit of each key byte so that it has the parity indicated -- 1 for odd parity or 0 for even parity.
Parameters:
key - The DES key whose parity is to be set.
parity - 1 for odd parity or 0 for even parity.
Since:
3.0

Skip navigation links

Oracle Security Developer Tools Crypto Java API Reference
11g (11.1.1)

E10668-02


Copyright © 2005, 2009, Oracle. All rights reserved.