MD5 OPX v0.01 Aug. 14, 2000, Copyright(c) by KONDO Reishi v0.02 Apr. 30, 2002, Copyright(c) by KONDO Reishi , KAWABE, Keita v0.03 Oct. 9, 2003, Copyright(c) by KONDO Reishi v0.03a Jul. 11, 2004, Copyright(c) by KONDO Reishi Contents: Chapter 1: About MD5 OPX Chapter 2: How to install Chapter 3: Copyright notice Chapter 4: Distribution notice Chapter 5: Usage from OPL program Chapter 6: Changelog ======================================================================== Chapter 1: About MD5 OPX MD5 OPX is an OPX that calclates MD5 Message Digest on the EPOC32 machines. You can calculate MD5 Message Digest easily on your OPL program with MD5 OPX. MD5 Message Digest is used in various protocols and programs related to computer security. MD5 algorithm is defined in the RFC1321. This MD5 OPX also serves Keyed-MD5 algolithm which is described in RFC2104. ======================================================================== Chapter 2: How to install You can install this OPX by specifying md5opx-v0.03.sis from PsiWin or MacConnect. You can also start installing it by copying md5opx-v0.03.sis onto the EPOC32 machine and double tapping it. These files are installed. \System\OPX\MD5OPX.OPX OPX itself \System\OPL\MD5.OXH header file ======================================================================== Chapter 3: Copyright notice 3.1. Copyright by RSA Data Security The most part of this source code is what I (Kondo) changed the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" sample source code which is distributed within RFC1321 to work in the C++ code. The sample source code is allowed to copy and use provided that it is identified as above. For mor information, you should refer to the comment in the md5c.cpp file. Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. The implementation of CRAM-MD5 is a straight port of the "sample implementation" presented in RFC2104, which is based on RFC1321. 3.2. Copyright by Symbian Ltd. I used EXAMPLE CODE in the \EPOC32EX\OPX directory in the EPOC Release5 C++ SDK, which is copyrighted by Symbian Ltd. These modified example code are permitted to redistribute for the SDK licensers, but are not permitted for the end users. This product includes software licensed from Symbian Ltd (c) Symbian Ltd 1998-9 The related source codes are here: md5opx.cpp md5opx.h md5opx.mmp md5opx.pkg 3.4. Copyright by KAWABE, Keita The code which is related to Keyed-MD5/CRAM-MD5 algorithm is made by KAWABE, Keita. It is Copyrighted(c) by KAWABE, Keita. 3.3. Copyright by KONDO Reishi The rest part of this software is made by KONDO Reishi. It is Copyrighted(c) by KONDO Reishi. 3.4. Disclaimer THIS SOFTWARE IS PROVIDED BY THE AUTHOR (KONDO REISHI) AND ITS CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ======================================================================== Chapter 4: Distribution notice 4.1. Files that are not related to Symbian These files are the free software: (a) binary files: md5.opx, md5.oxh (b) document files: README-JA.TXT, README-EN.TXT (c) install file md5opx-v0.03.sis (d) sample OPL source file: md5test.opl (e) source file: global.h, md5.h, md5c.cpp You can use it, redistribute it (either free or not free), include it in other product. 4.2. Files that are related to Symbian These files are the source code of the free software on which Symbian Ltd. also have copyright: (f) md5opx.cpp, md5opx.h, md5opx.mmp, md5opx.pkg You can use it. But you can not redistribute it. You may redistribute it if you have Symbian ER5 C++ SDK under your License Agreement. ======================================================================== Chapter 5: Usage from OPL program You should refer to the sample OPL source code "md5test.opl". MD5 OPX have these procedures: - md5str$:( TextIn$ ) Returns MD5 Message Digest string for the input string (TextIn$). - md5ptr$:( TextPtrIn&, LenIn& ) Returns MD5 Message Digest string for the input, which is a pair of the pointer (TextPtrIn&) and the length (LenIn&). - md5Init&:() Initializes the internal CONTEXT, and returns the pointer to the CONTEXT (the area which is pointed by this CONTEXT pointer is not accessible from OPL code.) See MD5Init function in the md5c.c. - md5UpdateStr&:( TextIn$ ) Updates the internal CONTEXT with the input string (TextIn$), and returns the pointer to the CONTEXT (the area which is pointed by this CONTEXT pointer is not accessible from OPL code.) See MD5Update function in the md5c.c. - md5UpdatePtr&:( TextPtrIn&, LenIn& ) Updates the internal CONTEXT with the input, which is a pair of the pointer (TextPtrIn&) and the length (LenIn&), and returns the pointer to the CONTEXT (the area which is pointed by this CONTEXT pointer is not accessible from OPL code.) See MD5Update function in the md5c.c. - md5Final&:() Finalizes the internal CONTEXT, and returns the pointer to the internal DIGEST (the area which is pointed by this DIGEST pointer is not accessible from OPL code.) See MD5Final function in the md5c.c. - md5makeDigestString$:() Makes 32byte-long hexadecimal string from the internal DIGEST. - md5KeyedMd5String$:(TextIn$, SharedKeyIn$) - md5CramMd5String$:(TextIn$, SharedKeyIn$) These are identical (In POP/SMTP AUTH (RFC2095/2554), the AUTHENTICATION TYPE of keyed-MD5 is called CRAM-MD5). The input string (TextIn$) is processed using Keyed-MD5 (RFC2104) and a shared secret key (SharedKeyIn$). - md5getDigest$:() Makes 16byte-long string which is the copy of internal DIGEST. ======================================================================== Chapter 6: Changelog May 4, 2000 (v0.00, Kondo) - First published. Aug. 14, 2000 (v0.01, Kondo) - UID is corrected in md5.oxh - This file is renamed from "README-EN.TXT" to "md5opx-en.txt" Apr. 30, 2002 (v0.02, Kawabe,Kondo) - Added md5KeyedMd5String$:() and md5CramMd5String$:() by Kawabe. - Add CRAM-MD5 test vectors into test OPL application by Kondo. - The documents are reviced by Kawabe and Kondo. Aug. 10, 2003 (v0.03, Kondo) - Added md5getDigest$:(). - The return values (CONTEXT) of following PROCs are noted to be non-accessible from OPL code. md5Init&: / md5UpdateStr&: / md5UpdatePtr&: - The return value (DIGEST) of md5Final&: is noted to be non-accessible from OPL code. Jul. 11, 2004 (v0.03a, Kondo) - md5opx-v0.03.sis (in md5opx-v0.03.zip) seems to be broken. I recompiled and named it as v0.03a.