weakkey.h

来自「伯克利做的SFTP安全文件传输协议」· C头文件 代码 · 共 32 行

H
32
字号
//  $Archive:: /STP/SafeTP/weakkey.h                                  $//     $Date: 1999/07/14 13:16:47 $// $Revision: 1.5 $// Description: Key strength utilities    // Copyright 1999, Dan Bonachea, Scott McPeak  Terms of use are as specified in license.txt.#ifndef _WEAKKEY_H#define _WEAKKEY_H #include "selgamal.h"    // ElGamal*// weak keys are used as a "better than nothing" approach when a user bypasses// the entropy gathering step during key generation, or skips key generation alltogether// we use a flag to keep track of the "strength" of our keyenum KeyStrength { KS_UNKNOWN = -1, KS_WEAK = 0, KS_STRONG };// sets the current key strengthint SetKeyStrength(KeyStrength ks, char* keydirname = "ElGamal/", bool forceProtected=false);// gets the current key strengthKeyStrength GetKeyStrength(char* keydirname = "ElGamal/", bool forceProtected=false) ;// generate a weak key and mark it as such// the random seed must be loaded before this function is calledint GenerateWeakKey(char const * const * ElGamalParams = ElGamal_1024bit_parameters, char* keydirname = "ElGamal/") ;int SetKeyTimeStamp(char* keydirname = "ElGamal/", bool forceProtected=false);#endif // _WEAKKEY_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?