PKKeyGenerate.h

Go to the documentation of this file.
00001 /***********************************************************************
00002 *
00003 * KRYPTOS - Educational software for teaching cryptography
00004 * For more information, see http://www.kryptosproject.org/
00005 * Submissions may be sent to kryptos@gmu.edu (see web site for details)
00006 * 
00007 * 
00008 * Copyright (c) 2002-2004 George Mason University
00009 * 
00010 * Permission is hereby granted, free of charge, to any person obtaining
00011 * a copy of this software and associated documentation files (the
00012 * "Software"), to deal in the Software without restriction, including
00013 * without limitation the rights to use, copy, modify, merge, publish,
00014 * distribute, sublicense, and/or sell copies of the Software, and to
00015 * permit persons to whom the Software is furnished to do so, subject
00016 * to the following conditions:
00017 *
00018 * The above copyright notice and this permission notice shall be
00019 * included in all copies or substantial portions of the Software.
00020 *
00021 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00022 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00023 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00024 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00025 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00026 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00027 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00028 *
00029 ***********************************************************************/
00030 #include "cryptlib.h"
00031 #include "integer.h"
00032 using namespace CryptoPP;
00033 
00034 #if !defined(AFX_PKKEYGENERATE_H__AAC721BB_49AC_4938_9924_9EEC25948448__INCLUDED_)
00035 #define AFX_PKKEYGENERATE_H__AAC721BB_49AC_4938_9924_9EEC25948448__INCLUDED_
00036 
00037 #if _MSC_VER > 1000
00038 #pragma once
00039 #endif // _MSC_VER > 1000
00040 // PKKeyGenerate.h : header file
00041 //
00042 //#include "CryptoPPLink.h"
00043 
00045 // CPKKeyGenerate dialog
00046 
00047 class CPKKeyGenerate : public CPropertyPage
00048 {
00049         DECLARE_DYNCREATE(CPKKeyGenerate)
00050 
00051 // Construction
00052 public:
00053         void LoadPrivateKey(CString &Debug);
00054         CString InttoString1(Integer m, int base);
00055         CPKKeyGenerate();
00056         ~CPKKeyGenerate();
00057         void Load_Parameters();
00058 
00059         void RSAGenerateKey(int nbits, int ebits, int eval);
00060 
00061         int m_pkCipNSize; //size of modulo n in pk 
00062         int m_pkCipEVal;  //value of e in pk
00063         int m_pkCipESize; //size of e in pk
00064 //      InvertibleRSAFunction privateKey;
00065 
00066         CFileDialog* p_FileDialog;
00067         DWORD m_dwFileDialogFlags; 
00068         CString szFilter;
00069         
00070 // Dialog Data
00071         //{{AFX_DATA(CPKKeyGenerate)
00072         enum { IDD = IDD_PROPPAGE_PK_KEY_GENERATE };
00073         CString m_Debug;
00074         CString m_time;
00075         CString m_cycles;
00076         //}}AFX_DATA
00077 
00078 
00079 // Overrides
00080         // ClassWizard generate virtual function overrides
00081         //{{AFX_VIRTUAL(CPKKeyGenerate)
00082         public:
00083         virtual BOOL OnSetActive();
00084         protected:
00085         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00086         //}}AFX_VIRTUAL
00087 
00088 // Implementation
00089 protected:
00090         // Generated message map functions
00091         //{{AFX_MSG(CPKKeyGenerate)
00092         virtual BOOL OnInitDialog();
00093         afx_msg void OnProppagePkKeyGenerateGenerateKey();
00094         afx_msg void OnProppagePkKeyGenerateGeneratedSave();
00095         afx_msg void OnSelchangeCmbNBits();
00096         afx_msg void OnSelchangeCmbE();
00097         //}}AFX_MSG
00098         DECLARE_MESSAGE_MAP()
00099 
00100 };
00101 
00102 //{{AFX_INSERT_LOCATION}}
00103 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00104 
00105 #endif // !defined(AFX_PKKEYGENERATE_H__AAC721BB_49AC_4938_9924_9EEC25948448__INCLUDED_)

Generated on Sun Dec 17 14:54:15 2006 for Kryptos by  doxygen 1.5.1-p1