Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Exile 1.8 - The Password Manager

, 6 Mar 2005
Yet another password manager.
exile_18_setup.zip
exile_1.8_setup.exe
exile_exe.zip
exile.exe
Exile.exe.manifest
icons.dll
md5.dll
mdx.dll
PwsInfo.dll
rc5.dll
exile_exe_staticmfc.zip
exile.exe
icons.dll
md5.dll
mdx.dll
rc5.dll
exile_src.zip
exile
Exile
Exile.exe.manifest
exile.dep
exile.dsp
exile.dsw
res
aboveimportant.ico
advanced.bmp
belowcritical.ico
belowinsignificant.ico
belownormal.ico
changeicon.bmp
cold.ico
collapsed.ico
critical.ico
editcategory.bmp
editelement.bmp
enterpassword.bmp
error.ico
exile.ico
expanded.ico
exporttoxml.bmp
find.ico
found.ico
important.ico
insertcategory.bmp
insertelement.bmp
insignificant.ico
md5hashgenerator.bmp
new.bmp
normal.ico
options.bmp
passwordgenerator.bmp
rsasecurity.bmp
rsasecurity.ico
search.cur
storageproperties.bmp
switch.bmp
unimportant.ico
veryimportant.ico
vssver.scc
Icons
res
icon1.ico
icon10.ico
icon11.ico
icon12.ico
icon13.ico
icon14.ico
icon15.ico
icon16.ico
icon17.ico
icon18.ico
icon19.ico
icon2.ico
icon20.ico
icon21.ico
icon22.ico
icon23.ico
icon24.ico
icon25.ico
icon26.ico
icon27.ico
icon28.ico
icon3.ico
icon4.ico
icon5.ico
icon6.ico
icon7.ico
icon8.ico
icon9.ico
md5
md5.dep
md5.dsp
mdx
pwsinfo
passwordstorageshellext.rgs
pwsinfo.def
pwsinfo.dep
pwsinfo.dsp
pwsinfo.dsw
PwsInfo.tlb
pwsinfops.def
pwsinfops.mk
rc5
rc5.dep
rc5.dsp
xml
exile_src_vs2003.zip
Exile.exe.manifest
Exile.dep
Exile.dsp
Exile.dsw
Exile.suo
msxml3.tlh
msxml3.tli
res
AboveImportant.ico
Advanced.bmp
BelowCritical.ico
BelowInsignificant.ico
BelowNormal.ico
ChangeIcon.bmp
Cold.ico
Critical.ico
EditCategory.bmp
EditElement.bmp
EnterPassword.bmp
Error.ico
Exile.ico
ExportToXML.bmp
Find.ico
Found.ico
Icon1.ico
Icon10.ico
Icon11.ico
Icon12.ico
Icon13.ico
Icon14.ico
icon15.ico
Icon16.ico
Icon17.ico
Icon18.ico
Icon19.ico
Icon2.ico
Icon20.ico
Icon21.ico
Icon22.ico
Icon23.ico
Icon24.ico
Icon25.ico
Icon26.ico
Icon27.ico
Icon28.ico
Icon3.ico
Icon4.ico
Icon5.ico
Icon6.ico
Icon7.ico
Icon8.ico
Icon9.ico
Important.ico
InsertCategory.bmp
InsertElement.bmp
Insignificant.ico
MD5HashGenerator.bmp
New.bmp
Normal.ico
Options.bmp
PasswordGenerator.bmp
RSASecurity.bmp
rsasecurity.ico
Search.cur
StorageProperties.bmp
Switch.bmp
Unimportant.ico
VeryImportant.ico
vssver.scc
MD5
MD5.dep
MD5.dsp
PwsInfo
PasswordStorageShellExt.rgs
PwsInfo.def
PwsInfo.dep
PwsInfo.dsp
PwsInfo.dsw
PwsInfo.tlb
PwsInfops.def
PwsInfops.mk
RC5
RC5.dep
RC5.dsp
/********************************************************************
	Created:	21/3/2004, 11:15
	File name: 	D:\Projects\Exile\RC5\RC5.h
	File path:	D:\Projects\Exile\RC5
	File base:	RC5
	File ext:	h
	Author:		Gogolev Anton
*********************************************************************/

#ifndef __RC5_H__
#define __RC5_H__

// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the RC5_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// RC5_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.

#ifdef RC5_EXPORTS
#define RC5_API extern "C" __declspec(dllexport)
#else
#define RC5_API extern "C" __declspec(dllimport)
#endif

BOOL WINAPI DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved);

//////////////////////////////////////////////////////////////////////////
// RC5 Types

// RC5 Word
typedef unsigned long int RC5_WORD;

// RC5 Crypt Context Handle
typedef unsigned long int HRC5CONTEXT;

// RC5 CBC Crypt Context
typedef struct tagRC5CBCCONTEXT {
	BYTE cCbcMode;
	BYTE *pbInitVector; // CBC Initialization Vector
	BYTE *pbChainBlock; // Chaining block
	BYTE *pbBuffer;
	UINT nBuffer; // Buffer index
} RC5CBCCONTEXT, *LPRC5CBCCONTEXT;

// RC5 Crypt Context
typedef struct tagRC5CONTEXT {
	long lVersion; // Big-Endian
	BYTE cWordSize; // Bits
	BYTE cRounds;
	BYTE cKeyBytes; // Bytes in private key
	BYTE cKeyWords; // = ceil(8 * cKeyBytes / cWordSize)
	UINT nExpandedSize; // = 2 * (cRounds + 1)
	RC5_WORD *pwExpanded;
	LPRC5CBCCONTEXT *pRc5Cbc; // Optional (null for Block Cipher)
} RC5CONTEXT, *LPRC5CONTEXT;

// CBC Modes
static const BYTE RC5_CBC = 0x01; // Usual Chain Block Cipher
static const BYTE RC5_CBC_PAD = 0x02; // Padded CBC

//////////////////////////////////////////////////////////////////////////
// RC5 Block Cipher API Functions

// Acquire RC5 Crypt context with cKeyBytes bytes in private key and
// cRounds rounds of encryption.
RC5_API BOOL Rc5AcquireContext(HRC5CONTEXT &hRc5, BYTE cKeyBytes, BYTE cRounds);

// Release context previously acquired with Rc5AcquireContext().
RC5_API BOOL Rc5ReleaseContext(HRC5CONTEXT &hRc5);

// Resets RC5 context so a new private key can be supplied.
// In order to change crypt settings, previous context must be
// released and a new context acquired.
RC5_API BOOL Rc5ResetContext(HRC5CONTEXT hRc5);

// Determines whether hRc5 is a valid context
RC5_API BOOL Rc5ValidContext(HRC5CONTEXT hRc5);

// Assigns a text private key. It can be deleted later since it becomes
// mixed into RC5CONTEXT internal structures.
RC5_API BOOL Rc5SetPrivateKey(HRC5CONTEXT hRc5, TCHAR *pszKey);

// Assigns a binary private key. It must be cKeyBytes long.
RC5_API BOOL Rc5SetBinaryPrivateKey(HRC5CONTEXT hRc5, BYTE *pKey);

// Encrypts two 32-bit words from pwPlain to pwCipher
RC5_API BOOL Rc5Encrypt(HRC5CONTEXT hRc5, RC5_WORD *pwPlain, RC5_WORD *pwCipher);

// Decrypts two 32-bit words from pwCipher to pwPlain
RC5_API BOOL Rc5Decrypt(HRC5CONTEXT hRc5, RC5_WORD *pwCipher, RC5_WORD *pwPlain);

// Encrypts a block of nBlock * 2 RC5_WORDs (i.e nBlock 64-bit blocks)
RC5_API BOOL Rc5EncryptBlock(HRC5CONTEXT hRc5, RC5_WORD *pwPlain, RC5_WORD *pwCipher, UINT nBlocks);

// Decrypts a block of nBlock * 2 RC5_WORDs (i.e nBlock 64-bit blocks)
RC5_API BOOL Rc5DecryptBlock(HRC5CONTEXT hRc5, RC5_WORD *pwCipher, RC5_WORD *pwPlain, UINT nBlocks);

// Recrypts block by decrypting it in the source context and encrypting in a new one
RC5_API BOOL Rc5Recrypt(HRC5CONTEXT hRc5Src, HRC5CONTEXT hRc5Dest, RC5_WORD *pwCipherSrc, RC5_WORD *pwCipherDest);

// Recrypts block of nBlock * 2 RC5_WORDs (i.e nBlock 64-bit blocks) by decrypting it in the source 
// context and encrypting in a new one.
RC5_API BOOL Rc5RecryptBlock(HRC5CONTEXT hRc5Src, HRC5CONTEXT hRc5Dest, RC5_WORD *pwCipherSrc, 
							 RC5_WORD *pwCipherDest, UINT nBlocks);

//////////////////////////////////////////////////////////////////////////
// RC5 CBC API Functions

// Acquires RC5 CBC crypting context.
RC5_API BOOL Rc5CbcAcquireContext(HRC5CONTEXT &hRc5, BYTE cKeyBytes, BYTE cRounds, BYTE cCbcMode);

// Releases
RC5_API BOOL Rc5CbcReleaseContext(HRC5CONTEXT &hRc5);

// Resets context
RC5_API BOOL Rc5CbcResetContext(HRC5CONTEXT &hRc5);

// Assigns a binary private key
RC5_API BOOL Rc5CbcSetBinaryPrivateKey(HRC5CONTEXT hRc5, BYTE *pbKey);

#endif // __RC5H_H__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

AntonGogolev
Web Developer
Russian Federation Russian Federation
I'll think about it later on...

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 7 Mar 2005
Article Copyright 2004 by AntonGogolev
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid