📄 weakkey.h
字号:
// $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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -