keyring.h

00001 /***************************************************************************
00002 *   Copyright (C) 2005 by                                                 *
00003 *   Alejandro Perez Mendez     alejandro_perez@dif.um.es                  *
00004 *   Pedro J. Fernandez Ruiz    pedroj.fernandez@dif.um.es                 *
00005 *                                                                         *
00006 *   This library is free software; you can redistribute it and/or         *
00007 *   modify it under the terms of the GNU Lesser General Public            *
00008 *   License as published by the Free Software Foundation; either          *
00009 *   version 2.1 of the License, or (at your option) any later version.    *
00010 *                                                                         *
00011 *   This library is distributed in the hope that it will be useful,       *
00012 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00014 *   Lesser General Public License for more details.                       *
00015 *                                                                         *
00016 *   You should have received a copy of the GNU Lesser General Public      *
00017 *   License along with this library; if not, write to the Free Software   *
00018 *   Foundation, Inc., 51 Franklin St, Fifth Floor,                        *
00019 *   Boston, MA  02110-1301  USA                                           *
00020 ***************************************************************************/
00021 #ifndef OPENIKEV2KEYRING_H
00022 #define OPENIKEV2KEYRING_H
00023 
00024 #include "cipher.h"
00025 #include "pseudorandomfunction.h"
00026 #include "bytearray.h"
00027 #include "printable.h"
00028 #include "proposal.h"
00029 
00030 namespace openikev2 {
00031 
00036     class KeyRing: public Printable {
00037 
00038             /****************************** ATTRIBUTES ******************************/
00039         protected:
00040             PseudoRandomFunction* prf;              
00041             uint32_t encr_key_size;                 
00042             uint32_t integ_key_size;                
00043         public:
00044             auto_ptr<ByteArray> sk_ai;              
00045             auto_ptr<ByteArray> sk_ar;              
00046             auto_ptr<ByteArray> sk_ei;              
00047             auto_ptr<ByteArray> sk_er;              
00049             auto_ptr<ByteArray> sk_pi;              
00050             auto_ptr<ByteArray> sk_pr;              
00051             auto_ptr<ByteArray> sk_d;               
00052             auto_ptr<ByteArray> skeyseed;           
00054             /****************************** METHODS ******************************/
00055         public:
00065             virtual void generateIkeSaKeys( ByteArray& nonce_i, ByteArray& nonce_r, uint64_t spi_i, uint64_t spi_r, ByteArray& shared_secret, ByteArray* old_sk_d );
00066 
00074             virtual void generateChildSaKeys( ByteArray& nonce_i, ByteArray& nonce_r, ByteArray& sk_d, ByteArray* shared_secret );
00075 
00076             virtual string toStringTab( uint8_t tabs ) const ;
00077 
00078             virtual ~KeyRing();
00079 
00080     };
00081 
00082 }
00083 
00084 #endif

Generated on Fri Jul 27 11:04:44 2007 for libopenikev2 by  doxygen 1.5.1