DES.IsSemiWeakKey(Byte[]) Metoda
Definice
Určuje, zda je zadaný klíč slabý.Determines whether the specified key is semi-weak.
public:
static bool IsSemiWeakKey(cli::array <System::Byte> ^ rgbKey);
public static bool IsSemiWeakKey (byte[] rgbKey);
static member IsSemiWeakKey : byte[] -> bool
Public Shared Function IsSemiWeakKey (rgbKey As Byte()) As Boolean
Parametry
- rgbKey
- Byte[]
Tajný klíč pro testování s polovičními slabinami.The secret key to test for semi-weakness.
Návraty
true
v případě, že je klíč částečně slabý; v opačném případě. false
true
if the key is semi-weak; otherwise, false
.
Výjimky
Velikost rgbKey
parametru není platná.The size of the rgbKey
parameter is not valid.
Poznámky
Částečně slabé klíče jsou páry klíčů, jejichž výsledkem jsou šifry, které jsou snadno přerušitelné.Semi-weak keys are pairs of keys that result in ciphers that are easy to break. Pokud je text zašifrovaný pomocí částečně slabého klíče, vyšifruje výslednou šifru s partnerem tohoto středně slabého klíče, který vrátí původní text.If text is encrypted with a semi-weak key, encrypting the resulting cipher with the partner of that semi-weak key returns the original text. Pro algoritmus Standard () šifrování dat (DES) existuje šest známých dvojic klíčů. Tato metoda kontroluje tyto částečně slabé klíče.There are six known semi-weak key pairs for the Data Encryption Standard (DES) algorithm; this method checks for those semi-weak keys.
Pokus o nastavení částečně slabého klíče má za CryptographicExceptionnásledek.Attempting to set a semi-weak key results in a CryptographicException. Když GenerateKey se volá, aby se vytvořil náhodný klíč, nevrátí se na něj částečně slabší klíč.When GenerateKey is called to create a random key, a semi-weak key will never be returned.