⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notes.txt

📁 Password Safe Password Safe is a password database utility. Users can keep their passwords securely
💻 TXT
字号:
$Id: notes.txt,v 1.6 2004/01/28 17:32:58 ronys Exp $Build Environment:==================The current (April 2003, v1.91) build environment is MSVC++ 6.0, alongwith the HTML Help Workshop (downloadable from Microsoft's web site).File format:============Currently (v1.9) the file is layed out as follows:RND|H(RND)|SALT|IP|Name1|Password1|Notes1|...|NameN|PasswordN|NotesNWhere:RND is an 8 byte random value, used along with H(RND) to quicklyverify the password.H(RND) is SHA1_init_state_zero(tempSalt|Cipher(RND));       tempSalt = SHA1(RND|{0x00,0x00}|password);       Cipher(RND) is 1000 encryptions of RND, with tempSalt as the       encryption key. In short, a kind of HMAC dependant on the       password. Written before the HMAC RFC came out, no good reason       to change. (If it ain't broke...)SHA1_init_state_zero() is the same as the normal SHA1 but the initialstate of the hash is all zero's instead of the proscribed initialvalues (0x67452301, 0xEFCDAB89 and so forth). This (as well as the twozero bytes passed to SHA1) is an apparent artifact (bug?) of theoriginal implementation. Changing it now would break all existingdatabases...[Thanks to Nicolas Dade for refining the above description - seehttps://sourceforge.net/forum/message.php?msg_id=2387939]SALT is the salt used for encrypting the data (you know, to protectagainst dictionary attacks)IP is the initial initialization vector valueName, Password & Notes are stored sequentially as 8 byte blocks, withthe first block holding an int with the length (in bytes) of theactual value, which follows immediately.Apparently as a hack to upgrade from previous versions, the Name fieldis actually two fields, "Title" and "Username", separated bySPLTCHR. Furthermore, if the Username is DEFUSERCHR, then it isreplaced by the user's "default user name", as specified inoptions. It works, but is not a pretty sight.Registry:=========HKEY_CURRENT_USER/Software/Counterpane Systems/Password Safe/HKEY_CURRENT_USER/Software/Counterpane Systems/Password Safe/Backup/Security issues:================MainDlg::OnPasswordChange- I [Jim Russell] see that the main-passkey is constantly in memory.This seems like trouble.  Are we directly encrypting using themain-passkey?  We should be just as secure by hashing the main-passkeyon entry, keeping *that* in memory, and tossing the entered passwordinto the Gutmann Void.It seems that the biggest problem is the overuse of the secured 'CMyString' class.  This class is intended to securely delete the memory used upondestruction, but it has automatic conversion constructors for CStrings and'C' strings.  If you've spent any time reading things like 'Efficient C++', you know that C++ spends half its time creating temporary copies of objects,mostly during automatic type conversions.  I [Jim Russell] think thatit is too hard a job to keep track of all these, so I propose a newsecure string class with no automatic conversions whatsoever.  It willbe much less convenient to work with, and that is by design.  Most ofthe strings in this program have no need to be secured, so let's justconcentrate on the ones that do.I [Rony Shapiro], OTOH, think that CMyString is just fine, as long asfunction parameters are declared as const CMyString & instead of plainCMyString - this way, we avoid unnecessary objectcontruction. Declaring a couple of cast operators also goes a long wayto keeping everyone happy. CMyString has been tweaked to make theunderlying CString m_mystring private, paving the way to replacing itwith an STL string, if/when we get to porting to a non-MS platform.Bugs:=====Save as... doesn't ask for new password - should it?$Log: notes.txt,v $Revision 1.6  2004/01/28 17:32:58  ronyscorrected header format description based on ndade's post.Revision 1.5  2003/05/14 14:49:56  ronyspost-1.92 merge into main trunkRevision 1.4  2003/04/30 13:02:59  ronysAdded note re required build environment

⌨️ 快捷键说明

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