activelock-development Mailing List for ActiveLock (Page 16)
Brought to you by:
ialkan
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(52) |
Aug
(170) |
Sep
(34) |
Oct
(62) |
Nov
(46) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
(17) |
May
(14) |
Jun
(31) |
Jul
(59) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
|
Dec
(5) |
2005 |
Jan
|
Feb
(10) |
Mar
(3) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thanh H. T. <th...@us...> - 2003-08-15 19:08:46
|
Update of /cvsroot/activelock/activelock/docs In directory sc8-pr-cvs1:/tmp/cvs-serv13265/docs Log Message: Directory /cvsroot/activelock/activelock/docs added to the repository |
From: Thanh H. T. <th...@us...> - 2003-08-15 19:00:44
|
Update of /cvsroot/activelock/activelock/examples In directory sc8-pr-cvs1:/tmp/cvs-serv13618/examples Log Message: Directory /cvsroot/activelock/activelock/examples added to the repository |
From: Thanh H. T. <th...@us...> - 2003-08-14 05:42:51
|
Update of /cvsroot/activelock/alcrypto/test In directory sc8-pr-cvs1:/tmp/cvs-serv25689 Added Files: .cvsignore Form1.frm Module1.bas Project1.vbp Log Message: Re-added after CVS shuffling. This test app is only for internal use (for unit testing alcrypto.dll). It is is NOT distributable. --- NEW FILE: .cvsignore --- *.vbw --- NEW FILE: Form1.frm --- VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 4305 ClientLeft = 60 ClientTop = 345 ClientWidth = 7185 LinkTopic = "Form1" ScaleHeight = 4305 ScaleWidth = 7185 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtSig Height = 855 Left = 1080 MultiLine = -1 'True TabIndex = 18 Top = 3120 Width = 4215 End Begin VB.CommandButton cmdVerify Caption = "&Verify" Height = 375 Left = 5640 TabIndex = 17 Top = 3360 Width = 1455 End Begin VB.CommandButton cmdSign Caption = "&Sign" Height = 375 Left = 5640 TabIndex = 15 Top = 3000 Width = 1455 End Begin VB.CommandButton cmdPubDec Caption = "Public Dencryp&t" Height = 375 Left = 5640 TabIndex = 14 Top = 2040 Width = 1455 End Begin VB.CommandButton cmdPrivEnc Caption = "&Private Encrypt" Height = 375 Left = 5640 TabIndex = 13 Top = 1680 Width = 1455 End Begin VB.CommandButton cmdDecrypt Caption = "Private &Decrypt" Height = 375 Left = 5640 TabIndex = 12 Top = 1320 Width = 1455 End Begin VB.CommandButton cmdEncrypt Caption = "Public &Encrypt" Height = 375 Left = 5640 TabIndex = 11 Top = 960 Width = 1455 End Begin VB.TextBox txtDecrypted Height = 615 Left = 1080 TabIndex = 10 Top = 2400 Width = 4215 End Begin VB.TextBox txtEncrypted Height = 615 Left = 1080 TabIndex = 8 Top = 1680 Width = 4215 End Begin VB.TextBox txtData Height = 615 Left = 1080 TabIndex = 6 Text = "Text1" Top = 960 Width = 4215 End Begin VB.CommandButton cmdGen Caption = "&Generate" Height = 375 Left = 5640 TabIndex = 4 Top = 120 Width = 1455 End Begin VB.TextBox txtPub Height = 375 Left = 1080 TabIndex = 3 Top = 480 Width = 4215 End Begin VB.TextBox txtPriv Height = 375 Left = 1080 TabIndex = 1 Top = 120 Width = 4215 End Begin VB.Label Label6 Caption = "Signature:" Height = 375 Left = 0 TabIndex = 16 Top = 3000 Width = 1095 End Begin VB.Label Label5 Caption = "Decrypted:" Height = 375 Left = 0 TabIndex = 9 Top = 2520 Width = 1095 End Begin VB.Label Label4 Caption = "Encrypted:" Height = 375 Left = 0 TabIndex = 7 Top = 1800 Width = 1095 End Begin VB.Label Label3 Caption = "Text:" Height = 375 Left = 0 TabIndex = 5 Top = 1080 Width = 1095 End Begin VB.Label Label2 Caption = "Public Key:" Height = 375 Left = 0 TabIndex = 2 Top = 480 Width = 1215 End Begin VB.Label Label1 Caption = "Private Key:" Height = 375 Left = 0 TabIndex = 0 Top = 120 Width = 1215 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim mstrEncrypted As String * 128 Private Sub cmdDecrypt_Click() Decrypt 1 End Sub Private Sub Decrypt(CryptType As Long) Screen.MousePointer = vbHourglass Dim key As RSAKey rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key Dim strData As String * 128 strData = mstrEncrypted Dim nLen& nLen = Len(strData) rsa_decrypt CryptType, strData, nLen, key txtDecrypted = strData Screen.MousePointer = vbDefault End Sub Private Sub cmdEncrypt_Click() Encrypt 0 End Sub Private Sub Encrypt(CryptType As Long) Screen.MousePointer = vbHourglass Dim key As RSAKey rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key mstrEncrypted = txtData Dim nLen& nLen = Len(txtData) rsa_encrypt CryptType, mstrEncrypted, nLen, key txtEncrypted = mstrEncrypted Screen.MousePointer = vbDefault End Sub Private Sub cmdPrivEnc_Click() Encrypt 1 End Sub Private Sub cmdPubDec_Click() Decrypt 0 End Sub Private Sub cmdGen_Click() Screen.MousePointer = vbHourglass Dim key As RSAKey Dim prog As ProgressType rsa_generate key, 1024, AddressOf ProgressUpdate, VarPtr(prog) Dim strBlob As String Dim blobLen As Long rsa_public_key_blob key, vbNullString, blobLen If blobLen > 0 Then strBlob = String(blobLen, 0) rsa_public_key_blob key, strBlob, blobLen Debug.Print "Public blob: " & strBlob txtPub = strBlob End If rsa_private_key_blob key, vbNullString, blobLen If blobLen > 0 Then strBlob = String(blobLen, 0) rsa_private_key_blob key, strBlob, blobLen Debug.Print "Private blob: " & strBlob txtPriv = strBlob End If Screen.MousePointer = vbDefault End Sub Private Sub cmdSign_Click() Screen.MousePointer = vbHourglass Dim key As RSAKey rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key Dim nLen&, sLen& nLen = Len(txtData) rsa_sign key, txtData, nLen, vbNullString, sLen Dim strSig As String strSig = String(sLen, 0) rsa_sign key, txtData, nLen, strSig, sLen txtSig = modBase64.Base64_Encode(strSig) Screen.MousePointer = vbDefault End Sub Private Sub cmdVerify_Click() Screen.MousePointer = vbHourglass Dim key As RSAKey Dim strSig As String strSig = modBase64.Base64_Decode(txtSig) rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key If rsa_verifysig(key, strSig, Len(strSig), txtData, Len(txtData)) = 0 Then MsgBox "Signature verification passed!" Else MsgBox "Signature verification failed!" End If Screen.MousePointer = vbDefault End Sub --- NEW FILE: Module1.bas --- Attribute VB_Name = "Module1" Option Explicit Option Base 0 Type RSAKey ' 36-byte structure bits As Long ' bytes As Long ' modulus As Integer ' exponent As Integer ' private_exponent As Integer ' p As Integer ' q As Integer ' iqmp As Integer ' comment As String data(32) As Byte End Type Public Declare Function rsa_generate Lib "ALCrypto" (ptrKey As RSAKey, ByVal bits As Long, ByVal pfn As Long, ByVal pfnparam As Long) As Long Public Declare Function rsa_public_key_blob Lib "ALCrypto" (ptrKey As RSAKey, ByVal blob As String, blobLen As Long) As Long Public Declare Function rsa_private_key_blob Lib "ALCrypto" (ptrKey As RSAKey, ByVal blob As String, blobLen As Long) As Long Public Declare Function rsa_createkey Lib "ALCrypto" (ByVal pub_blob As String, ByVal pub_len As Long, ByVal priv_blob As String, ByVal priv_len As Long, ptrKey As RSAKey) As Long Public Declare Function rsa_encrypt Lib "ALCrypto" (ByVal CryptType As Long, ByVal data As String, dLen As Long, ptrKey As RSAKey) As Long Public Declare Function rsa_decrypt Lib "ALCrypto" (ByVal CryptType As Long, ByVal data As String, dLen As Long, ptrKey As RSAKey) As Long Public Declare Function rsa_sign Lib "ALCrypto" (ByRef ptrKey As RSAKey, ByVal data As String, ByVal dLen As Long, ByVal sig As String, ByRef sLen As Long) As Long Public Declare Function rsa_verifysig Lib "ALCrypto" (ByRef ptrKey As RSAKey, ByVal sig As String, ByVal sLen As Long, ByVal data As String, ByVal dLen As Long) As Long Public Declare Function fnRSA Lib "ALCrypto" (ptrKey As RSAKey, ByVal bits As Long, ByVal pfn As Long, ByVal pfnparam As Long) As Long 'Public Declare Function fnRSA Lib "rsa" (ByVal bits As Long, ptrKey As RSAKey, ByVal pfn As Long, ByVal pfnparam As Long) Private Const MAXPHASE& = 5 Type PhaseType exponential As Byte startpoint As Byte total As Byte param As Byte current As Byte n As Byte ' if exponential */ mult As Byte ' if linear */ End Type Type ProgressType nphases As Long phases(0 To MAXPHASE - 1) As PhaseType total As Byte divisor As Byte range As Byte hwndProgbar As Long End Type Public Sub ProgressUpdate(ByVal param As Long, ByVal action As Long, ByVal phase As Long, ByVal iprogress As Long) Debug.Print "Progress Update received " & param & ", action: " & action & ", iprogress: " & iprogress End Sub Sub Main() Debug.Print "here!" End Sub Private Function FnPtrLong(ptr As Long) As Long FnPtrLong = ptr End Function '' ' Converts a string into a hex string. ' Private Function Str2Hex(str As String) As String Dim strHex$ Dim arrBytes() As Byte arrBytes = StrConv(str, vbFromUnicode) Dim I& Dim charHex As String For I = LBound(arrBytes) To UBound(arrBytes) charHex = Hex(arrBytes(I)) If Len(charHex) = 1 Then ' pad leading zero charHex = "0" & charHex End If strHex = strHex & charHex Next Str2Hex = strHex End Function --- NEW FILE: Project1.vbp --- Type=Exe Form=Form1.frm Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation Module=Module1; Module1.bas Module=modBase64; ..\..\activelock2\src\modBase64.bas IconForm="Form1" Startup="Form1" HelpFile="" ExeName32="Project1.exe" Command32="" Name="Project1" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="Karora Technologies Inc." CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 [MS Transaction Server] AutoRefresh=1 |
From: Thanh H. T. <th...@us...> - 2003-08-14 05:38:20
|
Update of /cvsroot/activelock/alcrypto/test In directory sc8-pr-cvs1:/tmp/cvs-serv25323/test Log Message: Directory /cvsroot/activelock/alcrypto/test added to the repository |
From: Thanh H. T. <th...@sy...> - 2003-08-14 04:51:10
|
> Could you by any chance take care of CVS restructure?=20 Thought you'd never ask. I'll take it then. Will let you know when I'm = done. - Thanh ----- Original Message -----=20 From: Michael E. Crute=20 To: act...@li...=20 Sent: Wednesday, August 13, 2003 10:36 PM Subject: Re: [ActiveLock-Development] Status meeting this week Glad you asked :D... Could you by any chance take care of CVS = restructure? That would be a HUGE help... I have been really busy = lately... As for the website (I know you get tired of hearing this... = BUT) I will have it ready by the time we re-convene on Sunday (I = promise... I really do). Thanks for your help. Please give me an update = when you have finished the CVS thing. Thanks. -Mike Thanh Hai Tran wrote: Mike, What's the status of the CVS repository?=20 And how's the web site coming? Do you need any help? - Thanh ----- Original Message -----=20 From: Michael E. Crute=20 To: act...@li...=20 Sent: Sunday, August 10, 2003 1:10 PM Subject: Re: [ActiveLock-Development] Status meeting this week Sounds like a plan to me. See you all next week. -Mike Thanh Hai Tran wrote: Gentlemen, Since we're taking a much-needed break this week following the alpha release, and since we're waiting for CVS restructuring to stabilize = before we can do any further development, I'd like to propose that there be NO MEETING tonight....unless anyone has issues they would like discussed. Let me know if you have any objection. - Thanh ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ Activelock-Development mailing list Act...@li... https://lists.sourceforge.net/lists/listinfo/activelock-development =20 --=20 **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation mc...@so...-------------------------------------------------= ------ This SF.Net email sponsored by: Free pre-built ASP.NET sites = including Data Reports, E-commerce, Portals, and Forums are available = now. Download today and enter to win an XBOX or Visual Studio .NET. = http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ = Activelock-Development mailing list = Act...@li... = https://lists.sourceforge.net/lists/listinfo/activelock-development --=20 **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation mc...@so...-------------------------------------------------= ------ This SF.Net email sponsored by: Free pre-built ASP.NET sites = including Data Reports, E-commerce, Portals, and Forums are available = now. Download today and enter to win an XBOX or Visual Studio .NET. = http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ = Activelock-Development mailing list = Act...@li... = https://lists.sourceforge.net/lists/listinfo/activelock-development |
From: Michael E. C. <mc...@so...> - 2003-08-14 02:37:24
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title></title> </head> <body text="#3333ff" bgcolor="#ffffff"> <font size="-1"><span style="font-family: verdana;">Glad you asked :D... Could you by any chance take care of CVS restructure? That would be a HUGE help... I have been really busy lately... As for the website (I know you get tired of hearing this... BUT) I will have it ready by the time we re-convene on Sunday (I promise... I really do). Thanks for your help. Please give me an update when you have finished the CVS thing. Thanks.<br> <br> -Mike<br> </span></font><br> Thanh Hai Tran wrote:<br> <blockquote type="cite" cite="mid000901c361ea$1ce1afa0$750...@ka..."> <title></title> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <meta name="GENERATOR" content="MSHTML 6.00.2800.1170"> <style></style> <div><font size="2" color="#000000">Mike,</font></div> <div><font size="2" color="#000000">What's the status of the CVS repository? </font></div> <div><font size="2" color="#000000">And how's the web site coming? Do you need any help?</font></div> <div><font size="2" color="#000000">- Thanh</font></div> <blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div> <div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b> <a href="mailto:mc...@so..." title="mc...@so...">Michael E. Crute</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a href="mailto:act...@li..." title="act...@li...">act...@li...</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Sunday, August 10, 2003 1:10 PM</div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [ActiveLock-Development] Status meeting this week</div> <div><br> </div> <font size="-1"><span style="font-family: verdana;">Sounds like a plan to me. See you all next week.<br> <br> -Mike<br> </span></font><br> Thanh Hai Tran wrote:<br> <blockquote type="cite" cite="mid01bd01c35f54$c7fa3120$750...@ka..."> <pre wrap="">Gentlemen, Since we're taking a much-needed break this week following the alpha release, and since we're waiting for CVS restructuring to stabilize before we can do any further development, I'd like to propose that there be NO MEETING tonight....unless anyone has issues they would like discussed. Let me know if you have any objection. - Thanh ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. <a href="http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01" class="moz-txt-link-freetext">http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01</a> _______________________________________________ Activelock-Development mailing list <a href="mailto:Act...@li..." class="moz-txt-link-abbreviated">Act...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/activelock-development" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/activelock-development</a> </pre> </blockquote> <br> <pre cols="72" class="moz-signature">-- **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation <a href="mailto:mc...@so..." class="moz-txt-link-abbreviated">mc...@so...</a></pre> ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. <a class="moz-txt-link-freetext" href="http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01">http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01</a> _______________________________________________ Activelock-Development mailing list <a class="moz-txt-link-abbreviated" href="mailto:Act...@li...">Act...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/activelock-development">https://lists.sourceforge.net/lists/listinfo/activelock-development</a></blockquote> </blockquote> <br> <pre cols="72" class="moz-signature">-- **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation <a class="moz-txt-link-abbreviated" href="mailto:mc...@so...">mc...@so...</a></pre> </body> </html> |
From: Thanh H. T. <th...@sy...> - 2003-08-13 22:38:07
|
Mike, What's the status of the CVS repository?=20 And how's the web site coming? Do you need any help? - Thanh ----- Original Message -----=20 From: Michael E. Crute=20 To: act...@li...=20 Sent: Sunday, August 10, 2003 1:10 PM Subject: Re: [ActiveLock-Development] Status meeting this week Sounds like a plan to me. See you all next week. -Mike Thanh Hai Tran wrote: Gentlemen, Since we're taking a much-needed break this week following the alpha release, and since we're waiting for CVS restructuring to stabilize = before we can do any further development, I'd like to propose that there be NO MEETING tonight....unless anyone has issues they would like discussed. Let me know if you have any objection. - Thanh ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ Activelock-Development mailing list Act...@li... https://lists.sourceforge.net/lists/listinfo/activelock-development =20 --=20 **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation mc...@so...-------------------------------------------------= ------ This SF.Net email sponsored by: Free pre-built ASP.NET sites = including Data Reports, E-commerce, Portals, and Forums are available = now. Download today and enter to win an XBOX or Visual Studio .NET. = http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ = Activelock-Development mailing list = Act...@li... = https://lists.sourceforge.net/lists/listinfo/activelock-development |
From: Michael E. C. <mc...@so...> - 2003-08-10 17:09:23
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title></title> </head> <body text="#3333ff" bgcolor="#ffffff"> <font size="-1"><span style="font-family: verdana;">Sounds like a plan to me. See you all next week.<br> <br> -Mike<br> </span></font><br> Thanh Hai Tran wrote:<br> <blockquote type="cite" cite="mid01bd01c35f54$c7fa3120$750...@ka..."> <pre wrap="">Gentlemen, Since we're taking a much-needed break this week following the alpha release, and since we're waiting for CVS restructuring to stabilize before we can do any further development, I'd like to propose that there be NO MEETING tonight....unless anyone has issues they would like discussed. Let me know if you have any objection. - Thanh ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. <a class="moz-txt-link-freetext" href="http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01">http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01</a> _______________________________________________ Activelock-Development mailing list <a class="moz-txt-link-abbreviated" href="mailto:Act...@li...">Act...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/activelock-development">https://lists.sourceforge.net/lists/listinfo/activelock-development</a> </pre> </blockquote> <br> <pre cols="72" class="moz-signature">-- **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation <a class="moz-txt-link-abbreviated" href="mailto:mc...@so...">mc...@so...</a></pre> </body> </html> |
From: Thanh H. T. <th...@sy...> - 2003-08-10 15:33:47
|
Gentlemen, Since we're taking a much-needed break this week following the alpha release, and since we're waiting for CVS restructuring to stabilize before we can do any further development, I'd like to propose that there be NO MEETING tonight....unless anyone has issues they would like discussed. Let me know if you have any objection. - Thanh |
From: SourceForge.net <no...@so...> - 2003-08-10 05:08:47
|
Feature Requests item #785187, was opened at 2003-08-07 22:22 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 Category: Security Improvements Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Setting the system date back Initial Comment: Hello, I just downloaded you great activeX and tried the example application. I noticed that ActiveLock doesn't keep track of system date changes. The final user will be able to set the system date back and continue using the time-limited version. Is it correct? If so, it would be enought to store the initial date in several (file system, registry, ...) locations, maybe encrypted. I got the source code, if I come up with an implementation I'll let you know. Congrats. Antonio. banton @ tiscali.it ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-08-09 22:08 Message: Logged In: NO Hi Thanh Tran Thanks for your prompt response. I downloaded the version 2.0 alpha 1 and I believe that you resolved the issue I reported only for "time locked" licences. Infact, if you generate a "periodic" licence liberation key and you play around with the system date, the sample application works with no problem. Here is the test case: 1. Open ActiveLock2 Test App and go to Registration tab 2. Generate a request code and copy it into the Admin tab 3. Select Licence Type: periodic 30 days 4. Apply the key to the registration tab (click on register) 5. Exit the application 6. Move the date forward 31 days 7. Open the application and you get "Licence expired" message 8. Close the application and set the system date back 9. The application continue working without any problems Probably, althought the software recognizes the user attempt to set the system date back, it intentionally let the user open the application only if the actual expiration date has not come yet. It's true AJ, a private key is not private if you distribute it within the application. Well, ActiveLock wants to keep at least the "casual" hackers away from their intentions :-) Good work guys. Antonio. ---------------------------------------------------------------------- Comment By: Thanh Hai Tran (th2tran) Date: 2003-08-09 09:52 Message: Logged In: YES user_id=797792 Hi Antonio, Thank you for your inquiry. I believe the version you've downloaded is 1.x. You might be interested to know that we have recently released an alpha version of ActiveLock 2.0, which has resolved the issue you reported. Please go to the following link to download if you're interested. Please read the release notes before downloading. http://sourceforge.net/projects/activelock/ There are a few places from which you can get support for the new release. ActiveLock2 Discussion Forum: http://activelock.sourceforge.net/boards/index.php ActiveLock 2Users Mailing List: http://lists.sourceforge.net/lists/listinfo/activelock-users Enjoy! Thanh Tran ActiveLock Development Team Member ---------------------------------------------------------------------- Comment By: Andy Schmitz (ajcompany) Date: 2003-08-08 19:35 Message: Logged In: YES user_id=522263 Well, yes, but the encryption would be the difficult part. If we check to see if the value is there (and set it if it isn't), then you could just delete it. You also must remember that "nothing is sacred" when it comes to the software (indeed, it would be easier to set the date back than to crack the program, but...), keys that you thought were private can be discovered in 30 seconds by someone who knows what they're doing. Encrypting so you can decrypt but someone else can't only works with a private key, and we can't have one of those (well, we can but we can't expect it to be private). You have to remember that the entire source code for the control is open in human readable format and the source code for any application is only a few debugger clicks away (but maybe not too readable). Just a thought, -AJ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 |
From: SourceForge.net <no...@so...> - 2003-08-09 16:52:25
|
Feature Requests item #785187, was opened at 2003-08-08 05:22 Message generated for change (Comment added) made by th2tran You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 Category: Security Improvements Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Setting the system date back Initial Comment: Hello, I just downloaded you great activeX and tried the example application. I noticed that ActiveLock doesn't keep track of system date changes. The final user will be able to set the system date back and continue using the time-limited version. Is it correct? If so, it would be enought to store the initial date in several (file system, registry, ...) locations, maybe encrypted. I got the source code, if I come up with an implementation I'll let you know. Congrats. Antonio. banton @ tiscali.it ---------------------------------------------------------------------- >Comment By: Thanh Hai Tran (th2tran) Date: 2003-08-09 16:52 Message: Logged In: YES user_id=797792 Hi Antonio, Thank you for your inquiry. I believe the version you've downloaded is 1.x. You might be interested to know that we have recently released an alpha version of ActiveLock 2.0, which has resolved the issue you reported. Please go to the following link to download if you're interested. Please read the release notes before downloading. http://sourceforge.net/projects/activelock/ There are a few places from which you can get support for the new release. ActiveLock2 Discussion Forum: http://activelock.sourceforge.net/boards/index.php ActiveLock 2Users Mailing List: http://lists.sourceforge.net/lists/listinfo/activelock-users Enjoy! Thanh Tran ActiveLock Development Team Member ---------------------------------------------------------------------- Comment By: Andy Schmitz (ajcompany) Date: 2003-08-09 02:35 Message: Logged In: YES user_id=522263 Well, yes, but the encryption would be the difficult part. If we check to see if the value is there (and set it if it isn't), then you could just delete it. You also must remember that "nothing is sacred" when it comes to the software (indeed, it would be easier to set the date back than to crack the program, but...), keys that you thought were private can be discovered in 30 seconds by someone who knows what they're doing. Encrypting so you can decrypt but someone else can't only works with a private key, and we can't have one of those (well, we can but we can't expect it to be private). You have to remember that the entire source code for the control is open in human readable format and the source code for any application is only a few debugger clicks away (but maybe not too readable). Just a thought, -AJ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 |
From: SourceForge.net <no...@so...> - 2003-08-09 02:35:04
|
Feature Requests item #785187, was opened at 2003-08-08 05:22 Message generated for change (Comment added) made by ajcompany You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 Category: Security Improvements Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Setting the system date back Initial Comment: Hello, I just downloaded you great activeX and tried the example application. I noticed that ActiveLock doesn't keep track of system date changes. The final user will be able to set the system date back and continue using the time-limited version. Is it correct? If so, it would be enought to store the initial date in several (file system, registry, ...) locations, maybe encrypted. I got the source code, if I come up with an implementation I'll let you know. Congrats. Antonio. banton @ tiscali.it ---------------------------------------------------------------------- Comment By: Andy Schmitz (ajcompany) Date: 2003-08-09 02:35 Message: Logged In: YES user_id=522263 Well, yes, but the encryption would be the difficult part. If we check to see if the value is there (and set it if it isn't), then you could just delete it. You also must remember that "nothing is sacred" when it comes to the software (indeed, it would be easier to set the date back than to crack the program, but...), keys that you thought were private can be discovered in 30 seconds by someone who knows what they're doing. Encrypting so you can decrypt but someone else can't only works with a private key, and we can't have one of those (well, we can but we can't expect it to be private). You have to remember that the entire source code for the control is open in human readable format and the source code for any application is only a few debugger clicks away (but maybe not too readable). Just a thought, -AJ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 |
From: Thanh H. T. <th...@sy...> - 2003-08-09 00:14:13
|
Got some kudos from Pete (vbclassicforever) that I thought I'd share with the team. Should lift our spirit up a little, having worked our butts off to make the release. Good job to all! Have a beer/coke on me. :-) Mike, I will take care of entering some of Pete's suggestions to the tasklist for alpha2. - Thanh. ----- Original Message ----- From: "Peter Young" <yo...@co...> To: <th...@sy...> Sent: Friday, August 08, 2003 2:04 AM Subject: Re[2]: Got some time? > Hi Thanh, > > I've been extremely busy the last couple of days and probably will be for a > few more. However, I did manage to spend a little bit of time with AL 2.0 - > at least long enough to get a general understanding of what you're doing. > > First and foremost, well done! I'm impressed by the effort. It's more than > I expected in this amount of time. > > Here are my initial thoughts: > > 1) I can beat the checksum because it's stored as a single value. Instead, > encourage the user to calculate the value at runtime. This will prevent > someone from doing a search and replace on that value in the user's EXE. > Once that's done, a dummy DLL can be used, and the protection is broken. > > 2) The private key is plainly visible in the compiled binary - it took me > all of about a minute to disassemble the EXE and find the private key. > > 3) I love the way you're using error handling to indicate registration > failure. Too cool. > > 4) The checksum is essential because it prevents a single cracked DLL from > working against all EXEs. Any crack will be EXE-specific. Very nice. > > 5) You might want to add some debugger detection. SmartCheck is mighty > revealing. > > All in all, this is a big improvement over the previous incarnations. I > hope you're all proud. > > A minor annoyance - Either get rid of the viewport usercontrol in the > sample or make it smart enough to not run at design time. > > I will try to put some serious effort into finding weaknesses next week > when I free up a bit. > > Best, > Pete > > |
From: SourceForge.net <no...@so...> - 2003-08-08 23:35:29
|
Task #83282 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0 General Summary: ActiveLock Universal Generator (ALUGEN) Complete: 0% Status: Open Authority : th2tran Assigned to: nobody Description: Universal Key Generator allows the developer to generate/maintain product code and license keys for all of their products (not just one). More detailed specs to follow. Follow-Ups: ------------------------------------------------------- Date: 2003-08-08 23:35 By: th2tran Comment: Functional spec added in: http://www.activelock.org/boards/index.php?showtopic=45 For implementation discussion (developers only), go to: http://www.activelock.org/boards/index.php?act=ST&f=13&t=46 ------------------------------------------------------- Date: 2003-08-06 23:16 By: th2tran Comment: Make that ALUGEN...sounds cooler. :-) ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=83282&group_id=70007&group_project_id=29689 |
From: SourceForge.net <no...@so...> - 2003-08-08 05:22:19
|
Feature Requests item #785187, was opened at 2003-08-07 22:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 Category: Security Improvements Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Setting the system date back Initial Comment: Hello, I just downloaded you great activeX and tried the example application. I noticed that ActiveLock doesn't keep track of system date changes. The final user will be able to set the system date back and continue using the time-limited version. Is it correct? If so, it would be enought to store the initial date in several (file system, registry, ...) locations, maybe encrypted. I got the source code, if I come up with an implementation I'll let you know. Congrats. Antonio. banton @ tiscali.it ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=785187&group_id=70007 |
From: Michael E. C. <mc...@so...> - 2003-08-07 18:16:26
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title></title> </head> <body text="#000000" bgcolor="#ffffff"> I have to go someplace now but I will talk to you later and we can sort this out.<br> <br> -Mike<br> <br> Thanh Hai Tran wrote:<br> <blockquote type="cite" cite="mid002001c35d0d$f4597fd0$750...@ka..."> <title></title> <meta content="text/html; " http-equiv="Content-Type"> <meta name="GENERATOR" content="MSHTML 6.00.2800.1170"> <style></style> <div><font size="2">Resend....</font></div> <blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;" dir="ltr"> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div> <div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b> <a href="mailto:th...@sy..." title="th...@sy...">Thanh Hai Tran</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a href="mailto:act...@li..." title="act...@li...">act...@li...</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, August 07, 2003 1:58 PM</div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: CVS Restructure</div> <div><br> </div> <div><font size="2">Mike,</font></div> <div><font size="2">No surprise? I</font><font size="2"> thought we agreed to hold on the restructuring until later. This structure is not what I had in mind...I thought I made that clear to you the other day!</font></div> <div><font size="2">For example, I wouldn't put "examples" all the way at the root, because it raises the question of whether these are examples for activelock 1.x or activelock 2.0. It should be under activelock2. Same goes for docs. Plus, I didn't want the the alcrypto test stuff to be an "example". It's just there for developers, for testing.</font></div> <div> </div> <div><font size="2">Your restructuring made it harder to grab stuff. Before, if I wanted to get activelock2 stuff, I'd just checkout activelock2. Now I have to grab things from all over the place!</font></div> <div> </div> <blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div> <div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b> <a href="mailto:mc...@so..." title="mc...@so...">Michael E. Crute</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a href="mailto:th...@sy..." title="th...@sy...">th...@sy...</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, August 07, 2003 1:39 PM</div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> CVS Restructure</div> <div><br> </div> <small><span style="font-family: arial;">I just finished the restructure we talked about several days ago. The new structure is below. I did not add a docs modules yet because we are still undecided and what the hell... if the release notes aren't in the repository for a while.... no big deal. If you have problems with the new structure let me know. I re-structured it the way we talked about so there should be no surprises. Talk to you later... </span><br style="font-family: arial;"> <br style="font-family: arial;"> <span style="font-family: arial;">-Mike</span></small></blockquote> </blockquote> </blockquote> <br> </body> </html> |
From: Thanh H. T. <th...@sy...> - 2003-08-07 18:03:57
|
Resend.... ----- Original Message -----=20 From: Thanh Hai Tran=20 To: act...@li...=20 Sent: Thursday, August 07, 2003 1:58 PM Subject: Re: CVS Restructure Mike, No surprise? I thought we agreed to hold on the restructuring until = later. This structure is not what I had in mind...I thought I made that = clear to you the other day! For example, I wouldn't put "examples" all the way at the root, = because it raises the question of whether these are examples for = activelock 1.x or activelock 2.0. It should be under activelock2. Same = goes for docs. Plus, I didn't want the the alcrypto test stuff to be an = "example". It's just there for developers, for testing. Your restructuring made it harder to grab stuff. Before, if I wanted = to get activelock2 stuff, I'd just checkout activelock2. Now I have to = grab things from all over the place! ----- Original Message -----=20 From: Michael E. Crute=20 To: th...@sy...=20 Sent: Thursday, August 07, 2003 1:39 PM Subject: CVS Restructure I just finished the restructure we talked about several days ago. = The new structure is below. I did not add a docs modules yet because we = are still undecided and what the hell... if the release notes aren't in = the repository for a while.... no big deal. If you have problems with = the new structure let me know. I re-structured it the way we talked = about so there should be no surprises. Talk to you later...=20 -Mike |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:56:53
|
Update of /cvsroot/activelock/alcrypto In directory sc8-pr-cvs1:/tmp/cvs-serv27990 Added Files: .cvsignore ALCrypto.def ALCrypto.dsp ALCrypto.dsw BIGNUM.C CRYPT.H INT64.H MD5.C MISC.C MISC.H NOISE.C PRIME.C RAND.C RSA.C RSA.h RSAG.C SHA.C SSH.C StdAfx.cpp StdAfx.h Version.rc resource.h Log Message: Inital Checin After Restructure --- NEW FILE: .cvsignore --- Debug *.plg *.ncb *.opt --- NEW FILE: ALCrypto.def --- ; Sample Export definition file to create Microsoft Visual C++ (Win32) ; compatible LIB file for ALCRYPTO.DLL. ; LIBRARY "ALCrypto" DESCRIPTION "ActiveLock Cryptographic Library" EXPORTS fnRSA @1 rsa_generate @2 rsa_decrypt @3 rsa_encrypt @4 rsa_public_key_blob @5 rsa_private_key_blob @6 rsa_createkey @7 rsa_sign @8 rsa_verifysig @9 rsa_freekey @10 md5_hash @11 --- NEW FILE: ALCrypto.dsp --- # Microsoft Developer Studio Project File - Name="ALCrypto" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=ALCrypto - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "ALCrypto.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "ALCrypto.mak" CFG="ALCrypto - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "ALCrypto - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "ALCrypto - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "ALCrypto" # PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "ALCrypto - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ALCRYPTO_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ALCRYPTO_EXPORTS" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x1009 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=copy release\alcrypto.dll test\ # End Special Build Tool !ELSEIF "$(CFG)" == "ALCrypto - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ALCrypto___Win32_Debug" # PROP BASE Intermediate_Dir "ALCrypto___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ALCRYPTO_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ALCRYPTO_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=copy debug\alcrypto.dll test\ # End Special Build Tool !ENDIF # Begin Target # Name "ALCrypto - Win32 Release" # Name "ALCrypto - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\ALCRYPTO.DEF # End Source File # Begin Source File SOURCE=.\BIGNUM.C # End Source File # Begin Source File SOURCE=.\MD5.C # End Source File # Begin Source File SOURCE=.\MISC.C # End Source File # Begin Source File SOURCE=.\NOISE.C # End Source File # Begin Source File SOURCE=.\PRIME.C # End Source File # Begin Source File SOURCE=.\RAND.C # End Source File # Begin Source File SOURCE=.\RSA.C # End Source File # Begin Source File SOURCE=.\RSAG.C # End Source File # Begin Source File SOURCE=.\SHA.C # End Source File # Begin Source File SOURCE=.\StdAfx.cpp # ADD CPP /Yc"stdafx.h" # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\CRYPT.H # End Source File # Begin Source File SOURCE=.\INT64.H # End Source File # Begin Source File SOURCE=.\MISC.H # End Source File # Begin Source File SOURCE=.\RSA.h # End Source File # Begin Source File SOURCE=.\StdAfx.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=.\Version.rc # End Source File # End Group # Begin Source File SOURCE=.\ReadMe.txt # End Source File # End Target # End Project --- NEW FILE: ALCrypto.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "ALCrypto"=".\ALCrypto.dsp" - Package Owner=<4> Package=<5> {{{ begin source code control ALCrypto . end source code control }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### --- NEW FILE: BIGNUM.C --- /** * ActiveLock Cryptographic Library * Copyright 2003 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * [...1048 lines suppressed...] workspace[i] = (BignumInt) (carry / 10); if (workspace[i]) iszero = 0; carry %= 10; } ret[--ndigit] = (char) (carry + '0'); } while (!iszero); /* * There's a chance we've fallen short of the start of the * string. Correct if so. */ if (ndigit > 0) memmove(ret, ret + ndigit, ndigits - ndigit); /* * Done. */ return ret; } --- NEW FILE: CRYPT.H --- /** * ActiveLock Cryptographic Library * Copyright 2003 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 COPYRIGHT * OWNER OR 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. * * PuTTY License * ============= * * PuTTY is copyright 1997-2001 Simon Tatham. * * Portions copyright Robert de Bath, Joris van Rantwijk, Delian * Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, * Justin Bradford, and CORE SDI S.A. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ALCRYPTO_CRYPT_H #define ALCRYPTO_CRYPT_H #endif #include <string.h> #include <stdio.h> /* for FILENAME_MAX */ #include "stdafx.h" #include "misc.h" #include "int64.h" #include "rsa.h" /* * Useful thing. */ #ifndef lenof #define lenof(x) ( (sizeof((x))) / (sizeof(*(x)))) #endif #define SSH_CIPHER_IDEA 1 #define SSH_CIPHER_DES 2 #define SSH_CIPHER_3DES 3 #define SSH_CIPHER_BLOWFISH 6 #ifdef MSCRYPTOAPI #define APIEXTRA 8 #else #define APIEXTRA 0 #endif struct dss_key { Bignum p, q, g, y, x; }; int makekey(unsigned char *data, struct RSAKey *result, unsigned char **keystr, int order); int makeprivate(unsigned char *data, struct RSAKey *result); void rsasign(unsigned char *data, int length, struct RSAKey *key); void rsasanitise(struct RSAKey *key); int rsastr_len(struct RSAKey *key); void rsastr_fmt(char *str, struct RSAKey *key); void rsa_fingerprint(char *str, int len, struct RSAKey *key); int rsa_verify(struct RSAKey *key); /* externally accessible prototypes */ unsigned char *rsa_public_blob(struct RSAKey *key, int *len); void rsaencrypt(int type, unsigned char *data, int *length, struct RSAKey *key); Bignum rsadecrypt(int type, Bignum input, struct RSAKey *key); int ssh1_read_bignum(const unsigned char *data, Bignum * result); int ssh1_write_bignum(void *data, Bignum bn); Bignum bignum_from_bytes(const unsigned char *data, int nbytes); void bignum_to_bytes(Bignum bn, unsigned char *data); int rsa2_public_blob_len(void *key); void rsa2_public_blob(void *key, unsigned char *blob); int rsa2_private_blob_len(void *key); void rsa2_private_blob(void *key, unsigned char *blob); void rsa2_createkey(unsigned char *pub_blob, int pub_len, unsigned char *priv_blob, int priv_len, struct RSAKey *key); int rsa_public_blob_len(void *data); void freersakey(struct RSAKey *key); typedef unsigned int word32; typedef unsigned int uint32; unsigned long crc32(const void *s, size_t len); unsigned long crc32_update(unsigned long crc_input, const void *s, size_t len); /* SSH CRC compensation attack detector */ int detect_attack(unsigned char *buf, uint32 len, unsigned char *IV); typedef struct { uint32 h[4]; } MD5_Core_State; struct MD5Context { #ifdef MSCRYPTOAPI unsigned long hHash; #else MD5_Core_State core; unsigned char block[64]; int blkused; uint32 lenhi, lenlo; #endif }; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); void MD5Final(unsigned char digest[16], struct MD5Context *context); typedef struct { uint32 h[5]; unsigned char block[64]; int blkused; uint32 lenhi, lenlo; } SHA_State; void SHA_Init(SHA_State * s); void SHA_Bytes(SHA_State * s, void *p, int len); void SHA_Final(SHA_State * s, unsigned char *output); void SHA_Simple(void *p, int len, unsigned char *output); void hmac_sha1_simple(void *key, int keylen, void *data, int datalen, unsigned char *output); typedef struct { uint64 h[8]; unsigned char block[128]; int blkused; uint32 len[4]; } SHA512_State; void SHA512_Init(SHA512_State * s); void SHA512_Bytes(SHA512_State * s, const void *p, int len); void SHA512_Final(SHA512_State * s, unsigned char *output); void SHA512_Simple(const void *p, int len, unsigned char *output); struct ssh_cipher { void (*sesskey) (unsigned char *key); /* for ssh 1 */ void (*encrypt) (unsigned char *blk, int len); void (*decrypt) (unsigned char *blk, int len); int blksize; }; struct ssh2_cipher { void (*setcsiv) (unsigned char *key); /* for ssh 2 */ void (*setcskey) (unsigned char *key); /* for ssh 2 */ void (*setsciv) (unsigned char *key); /* for ssh 2 */ void (*setsckey) (unsigned char *key); /* for ssh 2 */ void (*encrypt) (unsigned char *blk, int len); void (*decrypt) (unsigned char *blk, int len); char *name; int blksize; int keylen; }; struct ssh2_ciphers { int nciphers; const struct ssh2_cipher *const *list; }; struct ssh_mac { void (*setcskey) (unsigned char *key); void (*setsckey) (unsigned char *key); void (*generate) (unsigned char *blk, int len, unsigned long seq); int (*verify) (unsigned char *blk, int len, unsigned long seq); char *name; int len; }; struct ssh_kex { /* * Plugging in another KEX algorithm requires structural chaos, * so it's hard to abstract them into nice little structures * like this. Hence, for the moment, this is just a * placeholder. I claim justification in the fact that OpenSSH * does this too :-) */ char *name; }; struct ssh_signkey { void *(*newkey) (char *data, int len); void (*freekey) (void *key); char *(*fmtkey) (void *key); unsigned char *(*public_blob) (void *key, int *len); unsigned char *(*private_blob) (void *key, int *len); void *(*createkey) (unsigned char *pub_blob, int pub_len, unsigned char *priv_blob, int priv_len); void *(*openssh_createkey) (unsigned char **blob, int *len); int (*openssh_fmtkey) (void *key, unsigned char *blob, int len); char *(*fingerprint) (void *key); int (*verifysig) (void *key, char *sig, int siglen, char *data, int datalen); unsigned char *(*sign) (void *key, char *data, int datalen, int *siglen); char *name; char *keytype; /* for host key cache */ }; struct ssh_compress { char *name; void (*compress_init) (void); int (*compress) (unsigned char *block, int len, unsigned char **outblock, int *outlen); void (*decompress_init) (void); int (*decompress) (unsigned char *block, int len, unsigned char **outblock, int *outlen); int (*disable_compression) (void); }; struct ssh2_userkey { const struct ssh_signkey *alg; /* the key algorithm */ void *data; /* the key data */ char *comment; /* the key comment */ }; extern const struct ssh_cipher ssh_3des; extern const struct ssh_cipher ssh_des; extern const struct ssh_cipher ssh_blowfish_ssh1; extern const struct ssh2_ciphers ssh2_3des; extern const struct ssh2_ciphers ssh2_des; extern const struct ssh2_ciphers ssh2_aes; extern const struct ssh2_ciphers ssh2_blowfish; extern const struct ssh_kex ssh_diffiehellman; extern const struct ssh_kex ssh_diffiehellman_gex; extern const struct ssh_signkey ssh_dss; extern const struct ssh_signkey ssh_rsa; extern const struct ssh_mac ssh_md5; extern const struct ssh_mac ssh_sha1; extern const struct ssh_mac ssh_sha1_buggy; #ifndef MSCRYPTOAPI void SHATransform(word32 * digest, word32 * data); #endif int random_byte(void); void random_add_noise(void *noise, int length); void random_add_heavynoise(void *noise, int length); void logevent(char *); #ifdef _DEBUG void diagbn(char *prefix, Bignum md); #endif Bignum copybn(Bignum b); Bignum bn_power_2(int n); void bn_restore_invariant(Bignum b); Bignum bignum_from_long(unsigned long n); void freebn(Bignum b); Bignum modpow(Bignum base, Bignum exp, Bignum mod); Bignum modmul(Bignum a, Bignum b, Bignum mod); void decbn(Bignum n); extern Bignum Zero, One; int bignum_bitcount(Bignum bn); int ssh1_bignum_length(Bignum bn); int ssh2_bignum_length(Bignum bn); int bignum_byte(Bignum bn, int i); int bignum_bit(Bignum bn, int i); void bignum_set_bit(Bignum bn, int i, int value); Bignum biggcd(Bignum a, Bignum b); unsigned short bignum_mod_short(Bignum number, unsigned short modulus); Bignum bignum_add_long(Bignum number, unsigned long addend); Bignum bigmul(Bignum a, Bignum b); Bignum bigmuladd(Bignum a, Bignum b, Bignum addend); Bignum bigdiv(Bignum a, Bignum b); Bignum bigmod(Bignum a, Bignum b); Bignum modinv(Bignum number, Bignum modulus); Bignum bignum_bitmask(Bignum number); Bignum bignum_rshift(Bignum number, int shift); int bignum_cmp(Bignum a, Bignum b); char *bignum_decimal(Bignum x); void des3_decrypt_pubkey(unsigned char *key, unsigned char *blk, int len); void des3_encrypt_pubkey(unsigned char *key, unsigned char *blk, int len); void des3_decrypt_pubkey_ossh(unsigned char *key, unsigned char *iv, unsigned char *blk, int len); void des3_encrypt_pubkey_ossh(unsigned char *key, unsigned char *iv, unsigned char *blk, int len); void aes256_encrypt_pubkey(unsigned char *key, unsigned char *blk, int len); void aes256_decrypt_pubkey(unsigned char *key, unsigned char *blk, int len); /* * For progress updates in the key generation utility. */ #define PROGFN_INITIALISE 1 #define PROGFN_LIN_PHASE 2 #define PROGFN_EXP_PHASE 3 #define PROGFN_PHASE_EXTENT 4 #define PROGFN_READY 5 #define PROGFN_PROGRESS 6 typedef void (__stdcall *progfn_t) (void *param, int action, int phase, int progress); ALCRYPTO_API LRESULT WINAPI rsa_generate(struct RSAKey *key, int bits, progfn_t pfn, void *pfnparam); int dsa_generate(struct dss_key *key, int bits, progfn_t pfn, void *pfnparam); Bignum primegen(int bits, int modulus, int residue, Bignum factor, int phase, progfn_t pfn, void *pfnparam); /* * zlib compression. */ void zlib_compress_init(void); void zlib_decompress_init(void); int zlib_compress_block(unsigned char *block, int len, unsigned char **outblock, int *outlen); int zlib_decompress_block(unsigned char *block, int len, unsigned char **outblock, int *outlen); /* * Need this to warn about support for the original SSH2 keyfile * format. */ void old_keyfile_warning(void); #define REG_HOME "Software\\ActiveLock Software Group\\ActiveLock" #define GLOBAL extern /* Three attribute types: * The ATTRs (normal attributes) are stored with the characters in the main * display arrays * * The TATTRs (temporary attributes) are generated on the fly, they can overlap * with characters but not with normal attributes. * * The LATTRs (line attributes) conflict with no others and only have one * value per line. But on area clears the LATTR cells are set to the erase_char * (or DEFAULT_ATTR + 'E') * * ATTR_INVALID is an illegal colour combination. */ #define TATTR_ACTCURS 0x4UL /* active cursor (block) */ #define TATTR_PASCURS 0x2UL /* passive cursor (box) */ #define TATTR_RIGHTCURS 0x1UL /* cursor-on-RHS */ #define LATTR_NORM 0x00000000UL #define LATTR_WIDE 0x01000000UL #define LATTR_TOP 0x02000000UL #define LATTR_BOT 0x03000000UL #define LATTR_MODE 0x03000000UL #define LATTR_WRAPPED 0x10000000UL #define ATTR_INVALID 0x00FF0000UL /* Like Linux use the F000 page for direct to font. */ #define ATTR_OEMCP 0x0000F000UL /* OEM Codepage DTF */ #define ATTR_ACP 0x0000F100UL /* Ansi Codepage DTF */ /* These are internal use overlapping with the UTF-16 surrogates */ #define ATTR_ASCII 0x0000D800UL /* normal ASCII charset ESC ( B */ #define ATTR_LINEDRW 0x0000D900UL /* line drawing charset ESC ( 0 */ #define ATTR_SCOACS 0x0000DA00UL /* SCO Alternate charset */ #define ATTR_GBCHR 0x0000DB00UL /* UK variant charset ESC ( A */ #define CSET_MASK 0x0000FF00UL /* Character set mask; MUST be 0xFF00 */ #define DIRECT_CHAR(c) ((c&0xFC00)==0xD800) #define DIRECT_FONT(c) ((c&0xFE00)==0xF000) #define UCSERR (ATTR_LINEDRW|'a') /* UCS Format error character. */ #define UCSWIDE 0x303F #define ATTR_NARROW 0x20000000UL #define ATTR_WIDE 0x10000000UL #define ATTR_BOLD 0x01000000UL #define ATTR_UNDER 0x02000000UL #define ATTR_REVERSE 0x04000000UL #define ATTR_BLINK 0x08000000UL #define ATTR_FGMASK 0x000F0000UL #define ATTR_BGMASK 0x00F00000UL #define ATTR_COLOURS 0x00FF0000UL #define ATTR_FGSHIFT 16 #define ATTR_BGSHIFT 20 #define ATTR_DEFAULT 0x00980000UL #define ATTR_DEFFG 0x00080000UL #define ATTR_DEFBG 0x00900000UL #define ERASE_CHAR (ATTR_DEFAULT | ATTR_ASCII | ' ') #define ATTR_MASK 0xFFFFFF00UL #define CHAR_MASK 0x000000FFUL #define ATTR_CUR_AND (~(ATTR_BOLD|ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS)) #define ATTR_CUR_XOR 0x00BA0000UL typedef HDC Context; #define SEL_NL { 13, 10 } #define in_utf (utf || line_codepage==CP_UTF8) #define LGXF_OVR 1 /* existing logfile overwrite */ #define LGXF_APN 0 /* existing logfile append */ #define LGXF_ASK -1 /* existing logfile ask */ #define LGTYP_NONE 0 /* logmode: no logging */ #define LGTYP_ASCII 1 /* logmode: pure ascii */ #define LGTYP_DEBUG 2 /* logmode: all chars of traffic */ #define LGTYP_PACKETS 3 /* logmode: SSH data packets */ /* * I've just looked in the windows standard headr files for WM_USER, there * are hundreds of flags defined using the form WM_USER+123 so I've * renumbered this NETEVENT value and the two in window.c */ #define WM_XUSER (WM_USER + 0x2000) #define WM_NETEVENT (WM_XUSER + 5) typedef enum { TS_AYT, TS_BRK, TS_SYNCH, TS_EC, TS_EL, TS_GA, TS_NOP, TS_ABORT, TS_AO, TS_IP, TS_SUSP, TS_EOR, TS_EOF, TS_LECHO, TS_RECHO, TS_PING, TS_EOL } Telnet_Special; typedef enum { MBT_NOTHING, MBT_LEFT, MBT_MIDDLE, MBT_RIGHT, /* `raw' button designations */ MBT_SELECT, MBT_EXTEND, MBT_PASTE, /* `cooked' button designations */ MBT_WHEEL_UP, MBT_WHEEL_DOWN /* mouse wheel */ } Mouse_Button; typedef enum { MA_NOTHING, MA_CLICK, MA_2CLK, MA_3CLK, MA_DRAG, MA_RELEASE } Mouse_Action; typedef enum { VT_XWINDOWS, VT_OEMANSI, VT_OEMONLY, VT_POORMAN, VT_UNICODE } VT_Mode; enum { /* * SSH ciphers (both SSH1 and SSH2) */ CIPHER_WARN, /* pseudo 'cipher' */ CIPHER_3DES, CIPHER_BLOWFISH, CIPHER_AES, /* (SSH 2 only) */ CIPHER_DES, CIPHER_MAX /* no. ciphers (inc warn) */ }; enum { /* * Line discipline option states: off, on, up to the backend. */ LD_YES, LD_NO, LD_BACKEND }; enum { /* * Line discipline options which the backend might try to control. */ LD_EDIT, /* local line editing */ LD_ECHO /* local echo */ }; enum { /* * Close On Exit behaviours. (cfg.close_on_exit) */ COE_NEVER, /* Never close the window */ COE_NORMAL, /* Close window on "normal" (non-error) exits only */ COE_ALWAYS /* Always close the window */ }; /* * You can compile with -DSSH_DEFAULT to have ssh by default. */ #ifndef SSH_DEFAULT #define DEFAULT_PROTOCOL PROT_TELNET #define DEFAULT_PORT 23 #else #define DEFAULT_PROTOCOL PROT_SSH #define DEFAULT_PORT 22 #endif /* * Some global flags denoting the type of application. * * FLAG_VERBOSE is set when the user requests verbose details. * * FLAG_STDERR is set in command-line applications (which have a * functioning stderr that it makes sense to write to) and not in * GUI applications (which don't). * * FLAG_INTERACTIVE is set when a full interactive shell session is * being run, _either_ because no remote command has been provided * _or_ because the application is GUI and can't run non- * interactively. */ #define FLAG_VERBOSE 0x0001 #define FLAG_STDERR 0x0002 #define FLAG_INTERACTIVE 0x0004 GLOBAL int flags; struct RSAKey; /* be a little careful of scope */ void cleanup_exit(int); /* * Exports from noise.c. */ void noise_get_heavy(void (*func) (void *, int)); void noise_get_light(void (*func) (void *, int)); void noise_regular(void); void noise_ultralight(DWORD data); void random_save_seed(void); void random_destroy_seed(void); /* * Exports from rand.c. */ void random_add_noise(void *noise, int length); void random_init(void); int random_byte(void); void random_get_savedata(void **data, int *len); extern int random_active; /* * Exports from misc.c. */ #include "misc.h" /* * Exports from sizetip.c. */ void UpdateSizeTip(HWND src, int cx, int cy); void EnableSizeTip(int bEnable); /* * Exports from mscrypto.c */ #ifdef MSCRYPTOAPI int crypto_startup(); void crypto_wrapup(); #endif --- NEW FILE: INT64.H --- /** * ActiveLock Cryptographic Library * Copyright 2003 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 COPYRIGHT * OWNER OR 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. * * PuTTY License * ============= * * PuTTY is copyright 1997-2001 Simon Tatham. * * Portions copyright Robert de Bath, Joris van Rantwijk, Delian * Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, * Justin Bradford, and CORE SDI S.A. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ /* * Header for int64.c. */ #ifndef PUTTY_INT64_H #define PUTTY_INT64_H typedef struct { unsigned long hi, lo; } uint64, int64; uint64 uint64_div10(uint64 x, int *remainder); void uint64_decimal(uint64 x, char *buffer); uint64 uint64_make(unsigned long hi, unsigned long lo); uint64 uint64_add(uint64 x, uint64 y); uint64 uint64_add32(uint64 x, unsigned long y); int uint64_compare(uint64 x, uint64 y); #endif --- NEW FILE: MD5.C --- /** * ActiveLock Cryptographic Library * Copyright 2003 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 COPYRIGHT * OWNER OR 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. * * PuTTY License * ============= * * PuTTY is copyright 1997-2001 Simon Tatham. * * Portions copyright Robert de Bath, Joris van Rantwijk, Delian * Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, * Justin Bradford, and CORE SDI S.A. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #include "crypt.h" /* * MD5 implementation for PuTTY. Written directly from the spec by * Simon Tatham. */ /* ---------------------------------------------------------------------- * Core MD5 algorithm: processes 16-word blocks into a message digest. */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 07/27/03 th2tran Adapted from PuTTY project for used by ActiveLock project. * 07/31/03 th2tran Added md5_hash() function. * ***********************************************************************************************/ #define F(x,y,z) ( ((x) & (y)) | ((~(x)) & (z)) ) #define G(x,y,z) ( ((x) & (z)) | ((~(z)) & (y)) ) #define H(x,y,z) ( (x) ^ (y) ^ (z) ) #define I(x,y,z) ( (y) ^ ( (x) | ~(z) ) ) #define rol(x,y) ( ((x) << (y)) | (((uint32)x) >> (32-y)) ) #define subround(f,w,x,y,z,k,s,ti) \ w = x + rol(w + f(x,y,z) + block[k] + ti, s) void MD5_Core_Init(MD5_Core_State * s) { s->h[0] = 0x67452301; s->h[1] = 0xefcdab89; s->h[2] = 0x98badcfe; s->h[3] = 0x10325476; } void MD5_Block(MD5_Core_State * s, uint32 * block) { uint32 a, b, c, d; a = s->h[0]; b = s->h[1]; c = s->h[2]; d = s->h[3]; subround(F, a, b, c, d, 0, 7, 0xd76aa478); subround(F, d, a, b, c, 1, 12, 0xe8c7b756); subround(F, c, d, a, b, 2, 17, 0x242070db); subround(F, b, c, d, a, 3, 22, 0xc1bdceee); subround(F, a, b, c, d, 4, 7, 0xf57c0faf); subround(F, d, a, b, c, 5, 12, 0x4787c62a); subround(F, c, d, a, b, 6, 17, 0xa8304613); subround(F, b, c, d, a, 7, 22, 0xfd469501); subround(F, a, b, c, d, 8, 7, 0x698098d8); subround(F, d, a, b, c, 9, 12, 0x8b44f7af); subround(F, c, d, a, b, 10, 17, 0xffff5bb1); subround(F, b, c, d, a, 11, 22, 0x895cd7be); subround(F, a, b, c, d, 12, 7, 0x6b901122); subround(F, d, a, b, c, 13, 12, 0xfd987193); subround(F, c, d, a, b, 14, 17, 0xa679438e); subround(F, b, c, d, a, 15, 22, 0x49b40821); subround(G, a, b, c, d, 1, 5, 0xf61e2562); subround(G, d, a, b, c, 6, 9, 0xc040b340); subround(G, c, d, a, b, 11, 14, 0x265e5a51); subround(G, b, c, d, a, 0, 20, 0xe9b6c7aa); subround(G, a, b, c, d, 5, 5, 0xd62f105d); subround(G, d, a, b, c, 10, 9, 0x02441453); subround(G, c, d, a, b, 15, 14, 0xd8a1e681); subround(G, b, c, d, a, 4, 20, 0xe7d3fbc8); subround(G, a, b, c, d, 9, 5, 0x21e1cde6); subround(G, d, a, b, c, 14, 9, 0xc33707d6); subround(G, c, d, a, b, 3, 14, 0xf4d50d87); subround(G, b, c, d, a, 8, 20, 0x455a14ed); subround(G, a, b, c, d, 13, 5, 0xa9e3e905); subround(G, d, a, b, c, 2, 9, 0xfcefa3f8); subround(G, c, d, a, b, 7, 14, 0x676f02d9); subround(G, b, c, d, a, 12, 20, 0x8d2a4c8a); subround(H, a, b, c, d, 5, 4, 0xfffa3942); subround(H, d, a, b, c, 8, 11, 0x8771f681); subround(H, c, d, a, b, 11, 16, 0x6d9d6122); subround(H, b, c, d, a, 14, 23, 0xfde5380c); subround(H, a, b, c, d, 1, 4, 0xa4beea44); subround(H, d, a, b, c, 4, 11, 0x4bdecfa9); subround(H, c, d, a, b, 7, 16, 0xf6bb4b60); subround(H, b, c, d, a, 10, 23, 0xbebfbc70); subround(H, a, b, c, d, 13, 4, 0x289b7ec6); subround(H, d, a, b, c, 0, 11, 0xeaa127fa); subround(H, c, d, a, b, 3, 16, 0xd4ef3085); subround(H, b, c, d, a, 6, 23, 0x04881d05); subround(H, a, b, c, d, 9, 4, 0xd9d4d039); subround(H, d, a, b, c, 12, 11, 0xe6db99e5); subround(H, c, d, a, b, 15, 16, 0x1fa27cf8); subround(H, b, c, d, a, 2, 23, 0xc4ac5665); subround(I, a, b, c, d, 0, 6, 0xf4292244); subround(I, d, a, b, c, 7, 10, 0x432aff97); subround(I, c, d, a, b, 14, 15, 0xab9423a7); subround(I, b, c, d, a, 5, 21, 0xfc93a039); subround(I, a, b, c, d, 12, 6, 0x655b59c3); subround(I, d, a, b, c, 3, 10, 0x8f0ccc92); subround(I, c, d, a, b, 10, 15, 0xffeff47d); subround(I, b, c, d, a, 1, 21, 0x85845dd1); subround(I, a, b, c, d, 8, 6, 0x6fa87e4f); subround(I, d, a, b, c, 15, 10, 0xfe2ce6e0); subround(I, c, d, a, b, 6, 15, 0xa3014314); subround(I, b, c, d, a, 13, 21, 0x4e0811a1); subround(I, a, b, c, d, 4, 6, 0xf7537e82); subround(I, d, a, b, c, 11, 10, 0xbd3af235); subround(I, c, d, a, b, 2, 15, 0x2ad7d2bb); subround(I, b, c, d, a, 9, 21, 0xeb86d391); s->h[0] += a; s->h[1] += b; s->h[2] += c; s->h[3] += d; } /* ---------------------------------------------------------------------- * Outer MD5 algorithm: take an arbitrary length byte string, * convert it into 16-word blocks with the prescribed padding at * the end, and pass those blocks to the core MD5 algorithm. */ #define BLKSIZE 64 void MD5Init(struct MD5Context *s) { MD5_Core_Init(&s->core); s->blkused = 0; s->lenhi = s->lenlo = 0; } void MD5Update(struct MD5Context *s, unsigned char const *p, unsigned len) { unsigned char *q = (unsigned char *) p; uint32 wordblock[16]; uint32 lenw = len; int i; /* * Update the length field. */ s->lenlo += lenw; s->lenhi += (s->lenlo < lenw); if (s->blkused + len < BLKSIZE) { /* * Trivial case: just add to the block. */ memcpy(s->block + s->blkused, q, len); s->blkused += len; } else { /* * We must complete and process at least one block. */ while (s->blkused + len >= BLKSIZE) { memcpy(s->block + s->blkused, q, BLKSIZE - s->blkused); q += BLKSIZE - s->blkused; len -= BLKSIZE - s->blkused; /* Now process the block. Gather bytes little-endian into words */ for (i = 0; i < 16; i++) { wordblock[i] = (((uint32) s->block[i * 4 + 3]) << 24) | (((uint32) s->block[i * 4 + 2]) << 16) | (((uint32) s->block[i * 4 + 1]) << 8) | (((uint32) s->block[i * 4 + 0]) << 0); } MD5_Block(&s->core, wordblock); s->blkused = 0; } memcpy(s->block, q, len); s->blkused = len; } } void MD5Final(unsigned char output[16], struct MD5Context *s) { int i; unsigned pad; unsigned char c[64]; uint32 lenhi, lenlo; if (s->blkused >= 56) pad = 56 + 64 - s->blkused; else pad = 56 - s->blkused; lenhi = (s->lenhi << 3) | (s->lenlo >> (32 - 3)); lenlo = (s->lenlo << 3); memset(c, 0, pad); c[0] = 0x80; MD5Update(s, c, pad); c[7] = (lenhi >> 24) & 0xFF; c[6] = (lenhi >> 16) & 0xFF; c[5] = (lenhi >> 8) & 0xFF; c[4] = (lenhi >> 0) & 0xFF; c[3] = (lenlo >> 24) & 0xFF; c[2] = (lenlo >> 16) & 0xFF; c[1] = (lenlo >> 8) & 0xFF; c[0] = (lenlo >> 0) & 0xFF; MD5Update(s, c, 8); for (i = 0; i < 4; i++) { output[4 * i + 3] = (s->core.h[i] >> 24) & 0xFF; output[4 * i + 2] = (s->core.h[i] >> 16) & 0xFF; output[4 * i + 1] = (s->core.h[i] >> 8) & 0xFF; output[4 * i + 0] = (s->core.h[i] >> 0) & 0xFF; } } /* ---------------------------------------------------------------------- * The above is the MD5 algorithm itself. Now we implement the * HMAC wrapper on it. */ static struct MD5Context md5_cs_mac_s1, md5_cs_mac_s2; static struct MD5Context md5_sc_mac_s1, md5_sc_mac_s2; static void md5_key(struct MD5Context *s1, struct MD5Context *s2, unsigned char *key, int len) { unsigned char foo[64]; int i; memset(foo, 0x36, 64); for (i = 0; i < len && i < 64; i++) foo[i] ^= key[i]; MD5Init(s1); MD5Update(s1, foo, 64); memset(foo, 0x5C, 64); for (i = 0; i < len && i < 64; i++) foo[i] ^= key[i]; MD5Init(s2); MD5Update(s2, foo, 64); memset(foo, 0, 64); /* burn the evidence */ } static void md5_cskey(unsigned char *key) { md5_key(&md5_cs_mac_s1, &md5_cs_mac_s2, key, 16); } static void md5_sckey(unsigned char *key) { md5_key(&md5_sc_mac_s1, &md5_sc_mac_s2, key, 16); } static void md5_do_hmac(struct MD5Context *s1, struct MD5Context *s2, unsigned char *blk, int len, unsigned long seq, unsigned char *hmac) { struct MD5Context s; unsigned char intermediate[16]; intermediate[0] = (unsigned char) ((seq >> 24) & 0xFF); intermediate[1] = (unsigned char) ((seq >> 16) & 0xFF); intermediate[2] = (unsigned char) ((seq >> 8) & 0xFF); intermediate[3] = (unsigned char) ((seq) & 0xFF); s = *s1; /* structure copy */ MD5Update(&s, intermediate, 4); MD5Update(&s, blk, len); MD5Final(intermediate, &s); s = *s2; /* structure copy */ MD5Update(&s, intermediate, 16); MD5Final(hmac, &s); } static void md5_generate(unsigned char *blk, int len, unsigned long seq) { md5_do_hmac(&md5_cs_mac_s1, &md5_cs_mac_s2, blk, len, seq, blk + len); } static int md5_verify(unsigned char *blk, int len, unsigned long seq) { unsigned char correct[16]; md5_do_hmac(&md5_sc_mac_s1, &md5_sc_mac_s2, blk, len, seq, correct); return !memcmp(correct, blk + len, 16); } const struct ssh_mac ssh_md5 = { md5_cskey, md5_sckey, md5_generate, md5_verify, "hmac-md5", 16 }; /** * API function to compute MD5 hash. */ ALCRYPTO_API LRESULT WINAPI md5_hash(unsigned char *in, int len, unsigned char *out) { static const char hex[] = "0123456789ABCDEF"; struct MD5Context md5c; unsigned char outBytes[16]; int i = 0; MD5Init(&md5c); MD5Update(&md5c, in, len); MD5Final(outBytes, &md5c); out[0] ='\0'; /* reset out buffer */ for (i = 0; i < 16;i++) { sprintf(out + strlen(out), "%02x", outBytes[i]); } return 0; } --- NEW FILE: MISC.C --- /** * ActiveLock Cryptographic Library * Copyright 2003 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 COPYRIGHT * OWNER OR 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. * * PuTTY License * ============= * * PuTTY is copyright 1997-2001 Simon Tatham. * * Portions copyright Robert de Bath, Joris van Rantwijk, Delian * Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, * Justin Bradford, and CORE SDI S.A. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ /** * Miscellaneous utility functions. */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 07/27/03 th2tran adapted from PuTTY project for used by ActiveLock project. * ***********************************************************************************************/ #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include "crypt.h" static char seedpath[2 * MAX_PATH + 10] = "\0"; static char hex[16] = "0123456789ABCDEF"; void cleanup_exit(int code) { exit(code); } /* ---------------------------------------------------------------------- * String handling routines. */ char *dupstr(char *s) { int len = strlen(s); char *p = smalloc(len + 1); strcpy(p, s); return p; } /* Allocate the concatenation of N strings. Terminate arg list with NULL. */ char *dupcat(char *s1, ...) { int len; char *p, *q, *sn; va_list ap; len = strlen(s1); va_start(ap, s1); while (1) { sn = va_arg(ap, char *); if (!sn) break; len += strlen(sn); } va_end(ap); p = smalloc(len + 1); strcpy(p, s1); q = p + strlen(p); va_start(ap, s1); while (1) { sn = va_arg(ap, char *); if (!sn) break; strcpy(q, sn); q += strlen(q); } va_end(ap); return p; } /* ---------------------------------------------------------------------- * Base64 encoding routine. This is required in public-key writing * but also in HTTP proxy handling, so it's centralised here. */ void base64_encode_atom(unsigned char *data, int n, char *out) { static const char base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; unsigned word; word = data[0] << 16; if (n > 1) word |= data[1] << 8; if (n > 2) word |= data[2]; out[0] = base64_chars[(word >> 18) & 0x3F]; out[1] = base64_chars[(word >> 12) & 0x3F]; if (n > 1) out[2] = base64_chars[(word >> 6) & 0x3F]; else out[2] = '='; if (n > 2) out[3] = base64_chars[word & 0x3F]; else out[3] = '='; } int base64_decode_atom(char *atom, unsigned char *out) { int vals[4]; int i, v, len; unsigned word; char c; for (i = 0; i < 4; i++) { c = atom[i]; if (c >= 'A' && c <= 'Z') v = c - 'A'; else if (c >= 'a' && c <= 'z') v = c - 'a' + 26; else if (c >= '0' && c <= '9') v = c - '0' + 52; else if (c == '+') v = 62; else if (c == '/') v = 63; else if (c == '=') v = -1; else return 0; /* invalid atom */ vals[i] = v; } if (vals[0] == -1 || vals[1] == -1) return 0; if (vals[2] == -1 && vals[3] != -1) return 0; if (vals[3] != -1) len = 3; else if (vals[2] != -1) len = 2; else len = 1; word = ((vals[0] << 18) | (vals[1] << 12) | ((vals[2] & 0x3F) << 6) | (vals[3] & 0x3F)); out[0] = (word >> 16) & 0xFF; if (len > 1) out[1] = (word >> 8) & 0xFF; if (len > 2) out[2] = word & 0xFF; return len; } /* ---------------------------------------------------------------------- * Generic routines to deal with send buffers: a linked list of * smallish blocks, with the operations * * - add an arbitrary amount of data to the end of the list * - remove the first N bytes from the list * - return a (pointer,length) pair giving some initial data in * the list, suitable for passing to a send or write system * call * - retrieve a larger amount of initial data from the list * - return the current size of the buffer chain in bytes */ #define BUFFER_GRANULE 512 struct bufchain_granule { struct bufchain_granule *next; int buflen, bufpos; char buf[BUFFER_GRANULE]; }; void bufchain_init(bufchain *ch) { ch->head = ch->tail = NULL; ch->buffersize = 0; } void bufchain_clear(bufchain *ch) { struct bufchain_granule *b; while (ch->head) { b = ch->head; ch->head = ch->head->next; sfree(b); } ch->tail = NULL; ch->buffersize = 0; } int bufchain_size(bufchain *ch) { return ch->buffersize; } void bufchain_add(bufchain *ch, void *data, int len) { char *buf = (char *)data; ch->buffersize += len; if (ch->tail && ch->tail->buflen < BUFFER_GRANULE) { int copylen = min(len, BUFFER_GRANULE - ch->tail->buflen); memcpy(ch->tail->buf + ch->tail->buflen, buf, copylen); buf += copylen; len -= copylen; ch->tail->buflen += copylen; } while (len > 0) { int grainlen = min(len, BUFFER_GRANULE); struct bufchain_granule *newbuf; newbuf = smalloc(sizeof(struct bufchain_granule)); newbuf->bufpos = 0; newbuf->buflen = grainlen; memcpy(newbuf->buf, buf, grainlen); buf += grainlen; len -= grainlen; if (ch->tail) ch->tail->next = newbuf; else ch->head = ch->tail = newbuf; newbuf->next = NULL; ch->tail = newbuf; } } void bufchain_consume(bufchain *ch, int len) { struct bufchain_granule *tmp; assert(ch->buffersize >= len); while (len > 0) { int remlen = len; assert(ch->head != NULL); if (remlen >= ch->head->buflen - ch->head->bufpos) { remlen = ch->head->buflen - ch->head->bufpos; tmp = ch->head; ch->head = tmp->next; sfree(tmp); if (!ch->head) ch->tail = NULL; } else ch->head->bufpos += remlen; ch->buffersize -= remlen; len -= remlen; } } void bufchain_prefix(bufchain *ch, void **data, int *len) { *len = ch->head->buflen - ch->head->bufpos; *data = ch->head->buf + ch->head->bufpos; } void bufchain_fetch(bufchain *ch, void *data, int len) { struct bufchain_granule *tmp; char *data_c = (char *)data; tmp = ch->head; assert(ch->buffersize >= len); while (len > 0) { int remlen = len; assert(tmp != NULL); if (remlen >= tmp->buflen - tmp->bufpos) remlen = tmp->buflen - tmp->bufpos; memcpy(data_c, tmp->buf + tmp->bufpos, remlen); tmp = tmp->next; len -= remlen; data_c += remlen; } } /* ---------------------------------------------------------------------- * My own versions of malloc, realloc and free. Because I want * malloc and realloc to bomb out and exit the program if they run * out of memory, realloc to reliably call malloc if passed a NULL * pointer, and free to reliably do nothing if passed a NULL * pointer. We can also put trace printouts in, if we need to; and * we can also replace the allocator with an ElectricFence-like * one. */ #ifdef MINEFIELD /* * Minefield - a Windows equivalent for Electric Fence */ #define PAGESIZE 4096 /* * Design: * * We start by reserving as much virtual address space as Windows * will sensibly (or not sensibly) let us have. We flag it all as * invalid memory. * * Any allocation attempt is satisfied by committing one or more * pages, with an uncommitted page on either side. The returned * memory region is jammed up against the _end_ of the pages. * * Freeing anything causes instantaneous decommitment of the pages * involved, so stale pointers are caught as soon as possible. */ static int minefield_initialised = 0; static void *minefield_region = NULL; static long minefield_size = 0; static long minefield_npages = 0; static long minefield_curpos = 0; static unsigned short *minefield_admin = NULL; static void *minefield_pages = NULL; static void minefield_admin_hide(int hide) { int access = hide ? PAGE_NOACCESS : PAGE_READWRITE; VirtualProtect(minefield_admin, minefield_npages * 2, access, NULL); } static void minefield_init(void) { int size; int admin_size; int i; for (size = 0x40000000; size > 0; size = ((size >> 3) * 7) & ~0xFFF) { minefield_region = VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS); if (minefield_region) break; } minefield_size = size; /* * Firstly, allocate a section of that to be the admin block. * We'll need a two-byte field for each page. */ minefield_admin = minefield_region; minefield_npages = minefield_size / PAGESIZE; admin_size = (minefield_npages * 2 + PAGESIZE - 1) & ~(PAGESIZE - 1); minefield_npages = (minefield_size - admin_size) / PAGESIZE; minefield_pages = (char *) minefield_region + admin_size; /* * Commit the admin region. */ VirtualAlloc(minefield_admin, minefield_npages * 2, MEM_COMMIT, PAGE_READWRITE); /* * Mark all pages as unused (0xFFFF). */ for (i = 0; i < minefield_npages; i++) minefield_admin[i] = 0xFFFF; /* * Hide the admin region. */ minefield_admin_hide(1); minefield_initialised = 1; } static void minefield_bomb(void) { div(1, *(int *) minefield_pages); } static void *minefield_alloc(int size) { int npages; int pos, lim, region_end, region_start; int start; int i; npages = (size + PAGESIZE - 1) / PAGESIZE; minefield_admin_hide(0); /* * Search from current position until we find a contiguous * bunch of npages+2 unused pages. */ pos = minefield_curpos; lim = minefield_npages; while (1) { /* Skip over used pages. */ while (pos < lim && minefield_admin[pos] != 0xFFFF) pos++; /* Count unused pages. */ start = pos; while (pos < lim && pos - start < npages + 2 && minefield_admin[pos] == 0xFFFF) pos++; if (pos - start == npages + 2) break; /* If we've reached the limit, reset the limit or stop. */ if (pos >= lim) { if (lim == minefield_npages) { /* go round and start again at zero */ lim = minefield_curpos; pos = 0; } else { minefield_admin_hide(1); return NULL; } } } minefield_curpos = pos - 1; /* * We have npages+2 unused pages starting at start. We leave * the first and last of these alone and use the rest. */ region_end = (start + npages + 1) * PAGESIZE; region_start = region_end - size; /* FIXME: could align here if we wanted */ /* * Update the admin region. */ for (i = start + 2; i < start + npages + 1; i++) minefield_admin[i] = 0xFFFE; /* used but no region starts here */ minefield_admin[start + 1] = region_start % PAGESIZE; minefield_admin_hide(1); VirtualAlloc((char *) minefield_pages + region_start, size, MEM_COMMIT, PAGE_READWRITE); return (char *) minefield_pages + region_start; } static void minefield_free(void *ptr) { int region_start, i, j; minefield_admin_hide(0); region_start = (char *) ptr - (char *) minefield_pages; i = region_start / PAGESIZE; if (i < 0 || i >= minefield_npages || minefield_admin[i] != region_start % PAGESIZE) minefield_bomb(); for (j = i; j < minefield_npages && minefield_admin[j] != 0xFFFF; j++) { minefield_admin[j] = 0xFFFF; } VirtualFree(ptr, j * PAGESIZE - region_start, MEM_DECOMMIT); minefield_admin_hide(1); } static int minefield_get_size(void *ptr) { int region_start, i, j; minefield_admin_hide(0); region_start = (char *) ptr - (char *) minefield_pages; i = region_start / PAGESIZE; if (i < 0 || i >= minefield_npages || minefield_admin[i] != region_start % PAGESIZE) minefield_bomb(); for (j = i; j < minefield_npages && minefield_admin[j] != 0xFFFF; j++); minefield_admin_hide(1); return j * PAGESIZE - region_start; } static void *minefield_c_malloc(size_t size) { if (!minefield_initialised) minefield_init(); return minefield_alloc(size); } static void minefield_c_free(void *p) { if (!minefield_initialised) minefield_init(); minefield_free(p); } /* * realloc _always_ moves the chunk, for rapid detection of code * that assumes it won't. */ static void *minefield_c_realloc(void *p, size_t size) { size_t oldsize; void *q; if (!minefield_initialised) minefield_init(); q = minefield_alloc(size); oldsize = minefield_get_size(p); memcpy(q, p, (oldsize < size ? oldsize : size)); minefield_free(p); return q; } #endif /* MINEFIELD */ #ifdef MALLOC_LOG static FILE *fp = NULL; static char *mlog_file = NULL; static int mlog_line = 0; void mlog(char *file, int line) { mlog_file = file; mlog_line = line; if (!fp) { fp = fopen("alcrypto_mem.log", "w"); setvbuf(fp, NULL, _IONBF, BUFSIZ); } if (fp) fprintf(fp, "%s:%d: ", file, line); } #endif void *safemalloc(size_t size) { void *p; #ifdef MINEFIELD p = minefield_c_malloc(size); #else p = malloc(size); #endif if (!p) { char str[200]; #ifdef MALLOC_LOG sprintf(str, "Out of memory! (%s:%d, size=%d)", mlog_file, mlog_line, size); fprintf(fp, "*** %s\n", str); fclose(fp); #else strcpy(str, "Out of memory!"); #endif MessageBox(NULL, str, "ALCrypto Fatal Error", MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); cleanup_exit(1); } #ifdef MALLOC_LOG if (fp) fprintf(fp, "malloc(%d) returns %p\n", size, p); #endif return p; } void *saferealloc(void *ptr, size_t size) { void *p; if (!ptr) { #ifdef MINEFIELD p = minefield_c_malloc(size); #else p = malloc(size); #endif } else { #ifdef MINEFIELD p = minefield_c_realloc(ptr, size); #else p = realloc(ptr, size); #endif } if (!p) { char str[200]; #ifdef MALLOC_LOG sprintf(str, "Out of memory! (%s:%d, size=%d)", mlog_file, mlog_line, size); fprintf(fp, "*** %s\n", str); fclose(fp); #else strcpy(str, "Out of memory!"); #endif MessageBox(NULL, str, "ALCrypto Fatal Error", MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); cleanup_exit(1); } #ifdef MALLOC_LOG if (fp) fprintf(fp, "realloc(%p,%d) returns %p\n", ptr, size, p); #endif return p; } void safefree(void *ptr) { if (ptr) { #ifdef MALLOC_LOG if (fp) fprintf(fp, "free(%p)\n", ptr); #endif #ifdef MINEFIELD minefield_c_free(ptr); #else free(ptr); #endif } #ifdef MALLOC_LOG else if (fp) fprintf(fp, "freeing null pointer - no action taken\n"); #endif } /* ---------------------------------------------------------------------- * Debugging routines. */ #ifdef _DEBUG static FILE *debug_fp = NULL; static int debug_got_console = 0; static void dputs(char *buf) { DWORD dw; if (!debug_got_console) { AllocConsole(); debug_got_console = 1; } if (!debug_fp) { debug_fp = fopen("debug.log", "w"); } WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), buf, strlen(buf), &dw, NULL); fputs(buf, debug_fp); fflush(debug_fp); } void dprintf(char *fmt, ...) { char buf[2048]; va_list ap; va_start(ap, fmt); vsprintf(buf, fmt, ap); dputs(buf); va_end(ap); } void debug_memdump(void *buf, int len, int L) { int i; unsigned char *p = buf; char foo[17]; if (L) { int delta; dprintf("\t%d (0x%x) bytes:\n", len, len); delta = 15 & (int) p; p -= delta; len += delta; } for (; 0 < len; p += 16, len -= 16) { dputs(" ... [truncated message content] |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:50:55
|
Update of /cvsroot/activelock/examples/alcrypto In directory sc8-pr-cvs1:/tmp/cvs-serv28234/alcrypto Added Files: .cvsignore Form1.frm Module1.bas Project1.vbp Log Message: Inital Checkin After Restructure --- NEW FILE: .cvsignore --- *.vbw --- NEW FILE: Form1.frm --- VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 4305 ClientLeft = 60 ClientTop = 345 ClientWidth = 7185 LinkTopic = "Form1" ScaleHeight = 4305 ScaleWidth = 7185 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtSig Height = 855 Left = 1080 MultiLine = -1 'True TabIndex = 18 Top = 3120 Width = 4215 End Begin VB.CommandButton cmdVerify Caption = "&Verify" Height = 375 Left = 5640 TabIndex = 17 Top = 3360 Width = 1455 End Begin VB.CommandButton cmdSign Caption = "&Sign" Height = 375 Left = 5640 TabIndex = 15 Top = 3000 Width = 1455 End Begin VB.CommandButton cmdPubDec Caption = "Public Dencryp&t" Height = 375 Left = 5640 TabIndex = 14 Top = 2040 Width = 1455 End Begin VB.CommandButton cmdPrivEnc Caption = "&Private Encrypt" Height = 375 Left = 5640 TabIndex = 13 Top = 1680 Width = 1455 End Begin VB.CommandButton cmdDecrypt Caption = "Private &Decrypt" Height = 375 Left = 5640 TabIndex = 12 Top = 1320 Width = 1455 End Begin VB.CommandButton cmdEncrypt Caption = "Public &Encrypt" Height = 375 Left = 5640 TabIndex = 11 Top = 960 Width = 1455 End Begin VB.TextBox txtDecrypted Height = 615 Left = 1080 TabIndex = 10 Top = 2400 Width = 4215 End Begin VB.TextBox txtEncrypted Height = 615 Left = 1080 TabIndex = 8 Top = 1680 Width = 4215 End Begin VB.TextBox txtData Height = 615 Left = 1080 TabIndex = 6 Text = "Text1" Top = 960 Width = 4215 End Begin VB.CommandButton cmdGen Caption = "&Generate" Height = 375 Left = 5640 TabIndex = 4 Top = 120 Width = 1455 End Begin VB.TextBox txtPub Height = 375 Left = 1080 TabIndex = 3 Top = 480 Width = 4215 End Begin VB.TextBox txtPriv Height = 375 Left = 1080 TabIndex = 1 Top = 120 Width = 4215 End Begin VB.Label Label6 Caption = "Signature:" Height = 375 Left = 0 TabIndex = 16 Top = 3000 Width = 1095 End Begin VB.Label Label5 Caption = "Decrypted:" Height = 375 Left = 0 TabIndex = 9 Top = 2520 Width = 1095 End Begin VB.Label Label4 Caption = "Encrypted:" Height = 375 Left = 0 TabIndex = 7 Top = 1800 Width = 1095 End Begin VB.Label Label3 Caption = "Text:" Height = 375 Left = 0 TabIndex = 5 Top = 1080 Width = 1095 End Begin VB.Label Label2 Caption = "Public Key:" Height = 375 Left = 0 TabIndex = 2 Top = 480 Width = 1215 End Begin VB.Label Label1 Caption = "Private Key:" Height = 375 Left = 0 TabIndex = 0 Top = 120 Width = 1215 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim mstrEncrypted As String * 128 Private Sub cmdDecrypt_Click() Decrypt 1 End Sub Private Sub Decrypt(CryptType As Long) Screen.MousePointer = vbHourglass Dim key As RSAKey rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key Dim strData As String * 128 strData = mstrEncrypted Dim nLen& nLen = Len(strData) rsa_decrypt CryptType, strData, nLen, key txtDecrypted = strData Screen.MousePointer = vbDefault End Sub Private Sub cmdEncrypt_Click() Encrypt 0 End Sub Private Sub Encrypt(CryptType As Long) Screen.MousePointer = vbHourglass Dim key As RSAKey rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key mstrEncrypted = txtData Dim nLen& nLen = Len(txtData) rsa_encrypt CryptType, mstrEncrypted, nLen, key txtEncrypted = mstrEncrypted Screen.MousePointer = vbDefault End Sub Private Sub cmdPrivEnc_Click() Encrypt 1 End Sub Private Sub cmdPubDec_Click() Decrypt 0 End Sub Private Sub cmdGen_Click() Screen.MousePointer = vbHourglass Dim key As RSAKey Dim prog As ProgressType rsa_generate key, 1024, AddressOf ProgressUpdate, VarPtr(prog) Dim strBlob As String Dim blobLen As Long rsa_public_key_blob key, vbNullString, blobLen If blobLen > 0 Then strBlob = String(blobLen, 0) rsa_public_key_blob key, strBlob, blobLen Debug.Print "Public blob: " & strBlob txtPub = strBlob End If rsa_private_key_blob key, vbNullString, blobLen If blobLen > 0 Then strBlob = String(blobLen, 0) rsa_private_key_blob key, strBlob, blobLen Debug.Print "Private blob: " & strBlob txtPriv = strBlob End If Screen.MousePointer = vbDefault End Sub Private Sub cmdSign_Click() Screen.MousePointer = vbHourglass Dim key As RSAKey rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key Dim nLen&, sLen& nLen = Len(txtData) rsa_sign key, txtData, nLen, vbNullString, sLen Dim strSig As String strSig = String(sLen, 0) rsa_sign key, txtData, nLen, strSig, sLen txtSig = modBase64.Base64_Encode(strSig) Screen.MousePointer = vbDefault End Sub Private Sub cmdVerify_Click() Screen.MousePointer = vbHourglass Dim key As RSAKey Dim strSig As String strSig = modBase64.Base64_Decode(txtSig) rsa_createkey txtPub, Len(txtPub), txtPriv, Len(txtPriv), key If rsa_verifysig(key, strSig, Len(strSig), txtData, Len(txtData)) = 0 Then MsgBox "Signature verification passed!" Else MsgBox "Signature verification failed!" End If Screen.MousePointer = vbDefault End Sub --- NEW FILE: Module1.bas --- Attribute VB_Name = "Module1" Option Explicit Option Base 0 Type RSAKey ' 36-byte structure bits As Long ' bytes As Long ' modulus As Integer ' exponent As Integer ' private_exponent As Integer ' p As Integer ' q As Integer ' iqmp As Integer ' comment As String data(32) As Byte End Type Public Declare Function rsa_generate Lib "ALCrypto" (ptrKey As RSAKey, ByVal bits As Long, ByVal pfn As Long, ByVal pfnparam As Long) As Long Public Declare Function rsa_public_key_blob Lib "ALCrypto" (ptrKey As RSAKey, ByVal blob As String, blobLen As Long) As Long Public Declare Function rsa_private_key_blob Lib "ALCrypto" (ptrKey As RSAKey, ByVal blob As String, blobLen As Long) As Long Public Declare Function rsa_createkey Lib "ALCrypto" (ByVal pub_blob As String, ByVal pub_len As Long, ByVal priv_blob As String, ByVal priv_len As Long, ptrKey As RSAKey) As Long Public Declare Function rsa_encrypt Lib "ALCrypto" (ByVal CryptType As Long, ByVal data As String, dLen As Long, ptrKey As RSAKey) As Long Public Declare Function rsa_decrypt Lib "ALCrypto" (ByVal CryptType As Long, ByVal data As String, dLen As Long, ptrKey As RSAKey) As Long Public Declare Function rsa_sign Lib "ALCrypto" (ByRef ptrKey As RSAKey, ByVal data As String, ByVal dLen As Long, ByVal sig As String, ByRef sLen As Long) As Long Public Declare Function rsa_verifysig Lib "ALCrypto" (ByRef ptrKey As RSAKey, ByVal sig As String, ByVal sLen As Long, ByVal data As String, ByVal dLen As Long) As Long Public Declare Function fnRSA Lib "ALCrypto" (ptrKey As RSAKey, ByVal bits As Long, ByVal pfn As Long, ByVal pfnparam As Long) As Long 'Public Declare Function fnRSA Lib "rsa" (ByVal bits As Long, ptrKey As RSAKey, ByVal pfn As Long, ByVal pfnparam As Long) Private Const MAXPHASE& = 5 Type PhaseType exponential As Byte startpoint As Byte total As Byte param As Byte current As Byte n As Byte ' if exponential */ mult As Byte ' if linear */ End Type Type ProgressType nphases As Long phases(0 To MAXPHASE - 1) As PhaseType total As Byte divisor As Byte range As Byte hwndProgbar As Long End Type Public Sub ProgressUpdate(ByVal param As Long, ByVal action As Long, ByVal phase As Long, ByVal iprogress As Long) Debug.Print "Progress Update received " & param & ", action: " & action & ", iprogress: " & iprogress End Sub Sub Main() Debug.Print "here!" End Sub Private Function FnPtrLong(ptr As Long) As Long FnPtrLong = ptr End Function '' ' Converts a string into a hex string. ' Private Function Str2Hex(str As String) As String Dim strHex$ Dim arrBytes() As Byte arrBytes = StrConv(str, vbFromUnicode) Dim I& Dim charHex As String For I = LBound(arrBytes) To UBound(arrBytes) charHex = Hex(arrBytes(I)) If Len(charHex) = 1 Then ' pad leading zero charHex = "0" & charHex End If strHex = strHex & charHex Next Str2Hex = strHex End Function --- NEW FILE: Project1.vbp --- Type=Exe Form=Form1.frm Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation Module=Module1; Module1.bas Module=modBase64; ..\..\activelock2\src\modBase64.bas IconForm="Form1" Startup="Form1" HelpFile="" ExeName32="Project1.exe" Command32="" Name="Project1" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="Karora Technologies Inc." CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 [MS Transaction Server] AutoRefresh=1 |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:50:53
|
Update of /cvsroot/activelock/examples/vbunit In directory sc8-pr-cvs1:/tmp/cvs-serv27519/vbunit Log Message: Directory /cvsroot/activelock/examples/vbunit added to the repository |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:50:50
|
Update of /cvsroot/activelock/examples/activelock2 In directory sc8-pr-cvs1:/tmp/cvs-serv27519/activelock2 Log Message: Directory /cvsroot/activelock/examples/activelock2 added to the repository |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:50:50
|
Update of /cvsroot/activelock/examples/alcrypto In directory sc8-pr-cvs1:/tmp/cvs-serv27519/alcrypto Log Message: Directory /cvsroot/activelock/examples/alcrypto added to the repository |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:50:48
|
Update of /cvsroot/activelock/examples/activelock2 In directory sc8-pr-cvs1:/tmp/cvs-serv28234/activelock2 Added Files: .cvsignore ALCrypto.dll ALTestApp.vbp TestGroup.vbg al.lic atDisplay.RES atViewPort.ctl atViewPort.ctx frmMain.frm frmMain.frx modMain.bas Log Message: Inital Checkin After Restructure --- NEW FILE: .cvsignore --- *.vbw --- NEW FILE: ALCrypto.dll --- MZ $ ò!Yò!Yò!Y¯¯*Yó!Yq/Yç!Y¯¯+Y¢!Y2Yõ!Yò Y®!Y¯+Yû!Y¯*Yó!Y5'Yó!Y %Yó!YRichò!Y IfùfwäÃVt$3ÀfL ùu%L$(IL$(y|$ÇD$( D$;ÁÇD$( Ifùfwä í~Í3ÀûÑéó«Éfó«SèZ$ D$(t$ëD$(3ÉfLhþfthþL$L$,I;ét3öfthT$3ÉfhÁâÊ3ÒÁ÷÷3ÒØÁ÷÷D$¯ÃÊÁáÎ;ÁvKáÿÿ f;ÁvG+ÈD$f îêHD$uÐ;|$tMT$43ÀJÿ É|?T$0t$(JÍNt$4t$3ÿ3öf:f1øêé7t$fAÁèNt$uÙKD$8 Àt L$,t$4|$<+Í+ÎÁáÏQSPè Hf= Hf= ;T$,~T$,L$0BÆ;Ñ~´fT$,_^]f[ÄÃ_f(^][ÄÃD$L$j Hf= D$f0ë3À+È+Êf Òf÷Ðtf;ÈÒBëf;ÁÒ÷Úf Ét\$3ÉCfÆ;Ù~D$ fT$PfèðèÿÿÄÇ_^][ÄÃD$ _^][ÄÃD$Ç ÁãÓX×\$,Ú÷Óï#Ù#êÝl$,Ýêó¯|Ư|õÁãÁîÞpÚt$ó#ë÷Ö#÷õl$õñ*ÆGÆ*Æ úÖþï#×÷Õ#éêP êT$HÝØiÃØÁêÁãÓ×ê÷Õß#î#ÚëX$ë\$Dͯ÷ Ïx0Î|$8L$0#l$0÷Ñ#ËÍÏÑH4L$(º"Â"kÁçÁêúT$0úêÏ#ï÷Ñ#ÎÍl$(ÍÙqýÃq ÞñÚ#óît$$îýê·b%öÇb%ÁîÁç÷|$Pó#û#îýl$<ýù@³@ÀÇ@³@ ø\$Áþ÷ÐÇ3ÆÃ\$Ч# ÁêúÑþ÷Ò×3ÖÓ\$$Â}ôïÿ}ô ÁèÇù÷ׯø3þû\$(úC£ÇC ÇùÆ÷×ø3þý×l$Dº»Ò D$T$¹ FNPQëVFRPUèÌÿÿvÄÎN ÉØtVSèØÿÿÄGÖN ÒuìSè×ÿÿÀL$ âUÂÁøè*ËÿÿSè$ËÿÿÄ_^][ÃD$ ÀD$HQuPD$RPèËÿÿÄÃPD$RPèËÿÿÄÃSVt$WFPèP×ÿÿNøQèE×ÿÿ\SèËòÿÿVøRèàÖÿÿÁøFPèÒÖÿÿÁøGNQèÃÖÿÿÁøGVRè´ÖÿÿGFOPQèØÿÿVÀÇRPèõ×ÿÿD$@Ä,Ç_^[ÃVt$F Àt Pè.ÊÿÿÄF Àt PèÊÿÿÄF Àt PèÊÿÿÄv öt VèòÿÿÄ^ÃìSUl$VWEPèÖÿÿÀMâQÂØÁûèÖÿÿÀ|$(âwÂÆ è^ÀÿÿSèXÀÿÿÄ$3À_^[ ÿÿÿÄÃD$jPh`GhÀGèêþÿÿÄÃD$L$RT$RQPh HhHè D$T$¹ è¸ Pèê j èg 3ÀÇIuøãu D$[^_ÃD$ø øtøuVTøUøNTuIVXÇFX ÿtÀ û@tÈÿë{VuVçþè. ÿ AúÐ|Ñ^Ãè»ýÿÿ=I u} ëj © SPè % øuè +MðñMøÁþNþ?~j?^;÷ LüëMøuðÑN L2üuô Éy>u;°OuMü; ¨Ou%°O } SQ»6MKCkY[ ÐÿÿYF0 ÀtPèüÏÿÿYF8 ÀtPèîÏÿÿYF@ ÀtPèàÏÿÿYFD ÀtPèÒÏÿÿYFP=¸7tPèÁÏÿÿYVèºÏÿÿYj ¡ NÆ$ À$Á ÃH÷ØÀÀõPÿpÀ NëNCû|ÿ5 Oÿ¸À ú t?ú t:} @8uû@8uö+Ç@èUèQÈÿÿðY;óu3öëUWVèõÿÿÄWÿÄÀ uÿEðÆ jèÖÿÿYëVÿ×E_^[]ÃUìE Àu]Ã=ôJ ÿlÀ B8ÙtÑÉtQ÷ ¿ÿþþ~Á÷3Ëðùñÿðÿ3Ï3ÆÂá Àuõ^[_3ÀÃF8ðuë~ÿaät(Æ8àuÄAÀtfÿÁ8àtßë±3À^[_ÂéÓþÿÿGÿ^[_ÃÇ^[_ÃUìWVSMã&Ù}÷3Àò®÷ÙËþuó¦Fÿ3É:GÿwtII÷ÑÁ[^_ÉÃÌÌÌÌÌÌÌÌT$L$ ÒtG3ÀD$Wùúr-÷Ùát+ÑGIuúÈÁàÁÈÁàÁÊâÁétó« ÒtGJuúD$_ÃD$ÃUììSVWjèqÍÿÿÿuè ¶À;Áw+ȼìþÿÿA¸ ÙÁéó«ËáóªBBBÿÀuÐ_[j jèÅÇÿÿYëVÿ×D$_^[ÃUìQ=ôJ jj #EÉÃUìjÿh Àt&:au% ätÁè:Au Àt:auÁ äuÒÿ3ÀÃÀÑà@Ãÿ÷ Àtà÷ ÀtÊ:auÉ ätÁÁëÌÌÌÌÌÌÌÌÌÌÌÌUìV3ÀPPPPPPPPUI ÀtB«$ëóuÉÿA ÀtF£$sòÁÄ ^ÉÃÌÌUìV3ÀPPPPPPPPUI ÀtB«$ëóu Àt F£$sóFÿÄ ^ÉÃVt$;5 Os8ÎÆÁùà NÀöDtWVètøÿÿVè( ÿlÀ Àt.F'G8Ätò,A<Éá ÁAà,A<Éá ÁA8àtÒÀÿ¾ÀëxðÿTL=PL Àt'FG8ØtòPSè8 jè$ÀÿÿÄÃ[^_ÉÃUìWVSMÉé ät! ÀtFG8ür8Üwæ8ør8ØwÆ8Äu Iu×3É8Ä ¡X8X#Æ ÀuÃëeX8ÃÁø¶ÈöDJte ! 1 9 = I W a c g o u { © « µ ½ Á Ï Ù å ç í ñ ó #)-?GQW]eo{·¹ÃËÏÝáéõû%/1A[_amsw³µ¹»Çãåëñ÷û ! + - = ? O U i y £ « · ½ Ç É Í Ó Õ Û å ç ó ý ÿ !'/5;KWY]kqu}±·¹ÃÑÕÛíïù %)1CGMOSY[gk¡£§³µ»ÑÓÙéïûý!%+9=?Qisy{ £¥¯±»ÁÉçñóý'-9EGY_cio¡¥§«ÃÅÑ×çïõû #)+17AGS_qsy}¯³µ¹¿ÁÍÑßý '-7CEIOW]gim{¯»ÃÕÙßëíóùÿ!/3;EMYkoqu¡±·½ËÕãç%)+7=ACI_egk}µ»ÁÅÍ×÷ %39=EOUimou©¯µ½ÃÏÓÙÛáåëí÷ù #'3A]cw{¥³¹¿ÉËÕáéóõÿ57;CIMUgqw} §³¹ÁÇÑ×Ùßåëõý13EIQ[y£©«±µÇÏÛíý!#-/5?MQik{}§«±¹ÉÏÕ×ãóûÿ#%/17;AGOUYeks§¿ÅÑ×Ùï÷ '+-3=EKOUs£¥µ·Éáóù !#59?AKS]ciqu{}¥§³·Å×Ûáõù%+/=IMOmq¡»ÁÅÇËÝãï÷ý 9IKQgu{ ¥¯µ»Óáçëóÿ ' ) - 3 G M Q _ c e i w } ¡ « ± ¹ à Šã ç í ï û ÿ !!5!A!I!O!Y))!)#)?)G)])e)i)o)u)))))¡)§)«)¿)Ã)Õ)×)ã)é)í)ó)***%*/*O*U*_*e*k*m*s******¹*»*Å*Í*Ý*ã*ë*ñ*û*+'+1+3+=+?+K+O+U+i+m+o+{++++£+¥+©+½+Í+ç+ë+ó+ù+ý+ ,,,#,/,5,9,A,W,Y,i,w,,,,,,³,·,Ë,Ï,Û,á,ã,é,ï,ÿ,---;-C-I-M-a-e-q---¡-©-³-µ-Å-Ç-Ó-ß-... ...%.-.3.7.9.?.W.[.o.y.. ....£.¥.±.·.Á.Ã.Í.Ó.ç.ë./ ///'/)/A/E/K/M/Q/W/o/u/}///¥/«/³/Ã/Ï/Ñ/Û/Ý/ç/í/õ/ù/0 0#0)070;0U0Y0[0g0q0y0}0 000£0©0¹0¿0Ç0Ë0Ñ0×0ß0å0ï0û0ý01 11!1'1-191C1E1K1]1a1g1m1s11111©1±1Ã1Ç1Õ1Û1í1÷1ÿ1 2222)252Y2]2c2k2o2u2w2{2222§22³2·2É2Ë2Ï2Ñ2é2í2ó2ù23%3+3/353A3G3[3_3g3k3s3y333¡3£33¹3Á3Ë3Ó3ë3ñ3ý34444474E4U4W4c4i4m444444¥4¯4»4É4Ó4á4ñ4ÿ4 555-535;5A5Q5e5o5q5w5{5}555555¡5·5½5¿5Ã5Õ5Ý5ç5ï5666#6165676;6M6O6S6Y6a6k6m6666¯6¹6»6Í6Ñ6ã6é6÷67777?7E7I7O7]7a7u777£7©7«7É7Õ7ß7ñ7ó7÷788!83858A8G8K8S8W8_8e8o8q8}888§8·8Å8É8Ï8Õ8×8Ý8á8ã8ÿ899#9%9)9/9=9A9M9[9k9y9}999999¡9§9¯9³9»9¿9Í9Ý9å9ë9ï9û9::::':+:1:K:Q:[:c:g:m:y::¥:©:·:Í:Õ:á:å:ë:ó:ý:;;;!;#;-;9;E;S;Y;_;q;{;;;;;¥;§;;·;¹;Ã;Ë;Ñ;×;á;ã;õ;ÿ;< <<<<)<5<C<O<S<[<e<k<q< <<<§<µ<¿<Ç<Ñ<Ý<ß<ñ<÷<= ====!=-=3=7=?=C=o=s=u=y={= ====«=¯=µ=»=Á=É=Ï=ó=> >>>>#>)>/>3>A>W>c>e>w>>>¡>¹>½>¿>Ã>Å>É>×>Û>á>ç>ï>ÿ>? ?7?;?=?A?Y?_?e?g?y?}????¿?Í?Ó?Ý?é?ë?ñ?ý?@!@%@+@1@?@C@E@]@a@g@m@@@£@©@±@·@½@Û@ß@ë@÷@ù@ AAAA!A3A5A;A?AYAeAkAwA{AA«A·A½A¿AËAçAïAóAùABBBB#B)B/BCBSBUB[BaBsB}BB BBBBBµBÅBËBÓBÝBãBñBCCC%C'C3C7C9COCWCiCCCC¥C©C¯CµC½CÇCÏCáCçCëCíCñCùC DDD#D)D;D?DEDKDQDSDYDeDoDDD¡D¥D«DD½D¿DÉD×DÛDùDûDEEE+E1EAEIESEUEaEwE}EEE£EE¯E»EÇEÙEãEïEõE÷EFF FF%F'F3F9F=FCFEF]FyF{FFFFFF©F±FÇFÉFÏFÓFÕFßFåFùFGGG#G)G/G5G9GKGMGQG]GoGqG}GGGGG¥G±G¿GÃGËGÝGáGíGûGHHHHHH1H=HGHUHYH[HkHmHyHHH¡H¹HÍHåHïH÷HI III+I7I=IEIUIcIiImIsII«IµIÓIßIáIåIçIJJJ#J9JAJEJWJ]JkJ}JJJJJ±JÃJÅJÕJÛJíJïJKK KKK%K1K;KCKIKYKeKmKwK KK³KµK»K¿KËKÙKÝKßKãKåKéKñK÷KLL LLLL!L-L3LKLULWLaLgLsLyLLLLLÍLáLçLñLóLýLMMM'M)M/M3MAMQMYMeMkMMMMMM±M³MÉMÏM×MáMíMùMûMNNNNN+N5N7N=NONSN_NgNyN NNNNN¡N¯N³NµNÁNÍNÑN×NéNûNO OO%O-O?OIOcOgOmOuO{OO OOO¥O©O¯O·O»OÏOÙOÛOýOÿOPPP)P5P?PEPGPSPqPwPPPP¡P·PÉPÕPãPíPïPûPQQ QQQ#Q%Q5QGQIQqQyQQQQ¡Q£Q§Q¹QÁQËQÓQßQãQõQ÷Q RRRRRR'RCRERKRaRmRsRRRRR¥R«R±R»RÃRÇRÉRÛRåRëRÿRSS#SASESGSKS]ScSSSSSSSS«S¹SÛSéSïSóSõSûSÿS TTTT5T7T;TATITSTUT_TaTkTmTqTTTT©T³TÅTÑTßTéTëT÷TýTU UU'U+U9U=UOUQU[UcUgUoUyU UU©U±U·UÉUÙUçUíUóUýUVVVV#V/V3V9V?VKVMV]V_VkVqVuVVVVVVV±VÕVçVóVÿVWWWWWW#WGWMW_WaWmWwW}WW¡W©W¯WµWÅWÑWÓWåWïWX XXX'X+X-XUX[X]XmXoXsX{XXX£X©X«XµX½XÁXÇXÓXÕXßXñXùXÿXYYY!YEYKYMYWY]YuY{YYYY±Y³Y½YÑYÛYãYéYíYóYõYÿYZ ZZZZZ)Z/Z;ZMZ[ZgZwZZ ZZZ¡Z£Z©Z»ZÓZåZïZûZýZ[[[[%[+[=[I[K[g[y[[[£[±[É[Õ[ë[ñ[ó[ý[\ \\\\)\/\3\9\G\K\M\Q\o\u\w\}\\\§\½\¿\Ã\É\Ñ\×\Ý\í\ù\]]]]]1]=]A]G]O]U][]e]g]m]y]]£]©]]¹]Á]Ç]Ó]×]Ý]ë]ñ]ý]^ ^^^!^'^+^-^1^9^E^I^W^i^s^u^ ^^^¥^¯^·^»^Ù^ý^ __'_3_5_;_G_W_]_c_e_w_{___¡_³_½_Å_Ï_Õ_ã_ç_û_`#`/`7`S`_`e`k`s`y` ```»`¿`Í`Ù`ß`é`õ` aaaa-a9aKaUaWa[aoayaaaaaaµaÇaÉaÍaáañaÿa bbb!b'b;bAbKbQbSb_bebbbbbb¥bbÕb×bÛbÝbébûbÿbc ccc/cAcCcOc_cgcmcqcwc}cc³cÁcÅcÙcécëcïcõcdd dd!d'd+d9dCdIdOd]dgdud dddd£d«dÁdÇdÉdÛdñd÷dùdee!e/e9e?eKeMeSeWe_eqe}eeee¡e¥ee¹eÅeãeóeûeÿefff)f1f;fAfGfMf[fafsf}ffffffµf¹fÅfÍfÑfãfëfõfgggg'g1g7g?gEgQg[gogygg gg«g½gÁgÍgßgågh hhh-h9h;h?hEhKhMhWhYh]hchihkhqhhhh±h½hÅhÑh×háhíhïhÿhii ii)i/iCiGiIiOieikiqiiii£i³iµi»iÁiÅiÓißiãiåi÷ij+j7j=jKjgjijuj{jjjjj£jÁjÉjájçjkkk#k'k-k9kAkWkYk_kukkkkkk½k¿kÛkákïkÿkll)l+l1l5lUlYl[l_lelglslwl}llllll¡l©l¯l³lÇlËlëlõlýl mm%m'm+m1m9m?mOm]mamsm{mmmm¥m±m·mÁmÃmÍmÏmÛm÷mnnn)n3n;nEnunwn{nnnnnn½n¿nãnénónùnûn oooo/o=oMoSoaoeoyo}oo oooo£o¯oµo»o¿oËoÍoÓo×oãoéoñoõo÷oýoppp'p3p9pOpQpWpcpupypppp¥p«p»pÃpÇpÏpåpípùpÿpqq!q3qQqYq]q_qcqiqqqqqÃqÉqËqÑqÛqáqïqõqûqrrrr%r/r;rCrUrgrqrwrrrrr£r³rÇrËrÍr×rÙrãrïrõrýrs s!s+s=sWs[sasss ssss«s½sÁsÉsßsåsçsóstt-t9t?tAt]tkt{tttt§t«t±t·t¹tÝtátçtûtuu%u;u=uMu_ukuwuuuuuu¡u§uµu¹u»uÑuÙuåuëuõuûuvv!v-v3v=v?vUvcvivovsv vvvµv·vÃvÛvßvñvwwww!w-w5wAwKwYw]w_wqww§ww³w¹wÅwÏwÕwáwéwïwówùwx%x+x5x=xSxYxaxmxwxyxx xxxx¡xx¿xÓxÙxÝxåxûxyy%y+y9y?yKyWy]ygyiysyyy£y«y¯y±y·yÉyÍyÏyÕyÙyóy÷yÿyzzzzz#z'z-zKzWzYz_zeziz}zzzz¡z¥zízõzùz{{{{+{5{7{;{O{U{_{q{w{{{¡{©{¯{³{Ç{Ó{é{ë{ï{ñ{ý{|||1|7|I|g|i|s||||£|Õ|Û|å|í|÷|} }}}3}9};}?}E}M}S}Y}c}u}w}}}}}·}½}¿}Ë}Õ}é}í}û}~~)~+~/~5~A~C~G~U~a~g~k~q~s~y~}~~~~§~~¹~»~Ó~ß~ë~ñ~÷~û~139=CK[acmy¯µÃÉÍÏí!#?AGKew¥«½ÉË×Ûáçõÿ /1;CSY_}§¯³»Çß %13?CEIOao{ ±µ½ÇÏÕßñùý!)-35?AMQSW]eio§±¹ËÕ×Ýçéíÿ#%;AGOaew©¯Íãïñ÷ K O Q ] c m o { £ ¥ © · Í Ó Õ Û á ë ù ý ÿ !/9?AMcu}¥§³·ÃÅÏÑ×éïõ+/5GY[kqw ¡©³»ÅÇËÝ÷!7=CQag{ ¥ÏÓëíóý #'-9EMQWc³¹ÃÏÑÛïõûÿ#5AIO[_mwy £³µÁÇËÍÑ×ñõ !W]£©¯»ÕÙÛá÷ýÿ'9;GS]o{§«±ÅÝãéó #)7A[_qy §µÅËÓÙßõ÷%Qcisuy«¯±½ÇÏÓÛçë÷ÿ#-?EKSYeiq«³·¹ÉÕáïù #%17;ACOSms ¯¹ÁÅßéý'3=EOQag{ »½ÁÉÙÛíñóù!/AGWkqu}¡«¹¿ÃÅËÕ×çó;=CUs§³µÇ×Ýåï÷ ?EKOcgim{¥µÃáç !'-59KW]_u±·¹½Ïãéù/15;=e¡§©ÁËÑÓåïûý %+379CIQ[]o¥±·ÃÍÓÙë÷ )/;AQko§±¹¿ÃÉÏÝãõùû )1;=AGIS} ¯¿ÇËÍ×åñû%KOUWau·ÃÇÏëó÷ÿ'/5EQYcow¡§±·½ÅËÏÝù#+/5IM_eg£¯»¿Á×Ùãéñý'-1=U[a¥©Ãçëíñ#'-3;GQS_o¡³½¿õùû#/7;CSamsw}£¯³ÁÇßåëõ ! 3 9 ? O W [ a u y « µ · ½ É Ù Û ß å ñ ó ý ¡¡¡¡¡)¡/¡5¡A¡S¡u¡}¡¡¡¥¡«¡¡·¡Ã¡Å¡ã¡í¡û¡¢¢#¢)¢/¢1¢C¢G¢M¢k¢y¢}¢¢¢¢¢¢¢©¢¯¢³¢»¢Å¢Ñ¢×¢÷¢£ ££!£+£1£I£Q£U£s£y£{££££¥£©£¯£·£Ç£Õ£Û£á£å£ç£ñ£ý£ÿ£¤¤!¤#¤'¤;¤M¤W¤Y¤c¤i¤u¤¤¤¤¹¤Ã¤Å¤Ë¤Ñ¤Õ¤á¤í¤ï¤ó¤ÿ¤¥)¥+¥5¥;¥C¥S¥[¥a¥m¥w¥ ¥¥¥¥£¥§¥©¥Á¥Å¥Ë¥Ó¥Ù¥Ý¥ß¥ã¥é¥÷¥û¥¦ ¦%¦=¦I¦K¦Q¦]¦s¦¦¦¦«¦µ¦»¦Á¦É¦Í¦Ï¦Õ¦ß¦ç¦ñ¦÷¦ÿ¦§§#§)§-§E§M§W§Y§e§k§o§§§«§±§¹§¿§É§Ñ§×§ã§í§û§¨¨¨)¨+¨7¨;¨U¨_¨m ¨}¨¨¨©¨µ¨Á¨Ç¨×¨å¨ý¨©©©1©7©9©C©© ©©©©£©±©»©Á©Ù©ß©ë©ý©ªª5ª9ª;ªGªMªWªYª]ªkªqªªªªª«ª¿ªÅªÉªéªïª«««« «««M«[«q«s«««§«¯«¹«»«Á«Å«Ó«×«Ý«ñ«õ«û«ý« ¬¬¬'¬7¬9¬E¬O¬W¬[¬a¬c¬¬¬¬¬©¬«¬¯¬½¬Ù¬á¬ç¬ë¬í¬ñ¬÷¬ù¬?ES]_e¡¥ÃËÑÕÛçóõùÿ®®#®+®I®M®O®Y®a®g®k®q®®®®®§®¹®Å®Ñ®ã®å®é®õ®ý® ¯¯'¯+¯3¯C¯O¯W¯]¯m¯u¯¯¯¯¯£¯«¯·¯»¯Ï¯Õ¯ý¯°°°?°A°G°K°Q°S°i°{°}°°°±°¿°Ë°Ï°á°é°í°û°±±±±±±1±A±M±[±e±s±y±±©±³±¹±¿±Ó±Ý±å±ñ±õ±²²²²-²?²I²[²c²i²m²{²²²©²·²½²Ã²Ç²Ó²ù²ý²ÿ²³ ³³³'³-³?³E³w³}³³³³³¥³Å³Ë³á³ã³í³ù³´ ´´´5´=´C´I´[´e´g´k´w´´´´µ´¿´Á´Ç´Ý´ã´å´÷´µ µµ-µ?µKµgµiµoµsµyµµµµ£µ«µ¯µ»µÕµßµçµíµýµÿµ ¶¶)¶/¶3¶9¶G¶W¶Y¶_¶c¶o¶¶¶¶¶¥¶±¶³¶×¶Û¶á¶ã¶í¶ï¶· ···)·5·G·U·m···©·Á·Ë·Ñ·Ó·ï·õ·¸¸¸¸!¸'¸+¸-¸9¸U¸g¸u¸ ¸¸¥¸¯¸·¸½¸Á¸Ç¸Í¸Õ¸ë¸÷¸ù¸¹¹¹¹/¹9¹;¹G¹Q¹c¹¹¹¹¹¹¡¹§¹¹·¹Ë¹Ñ¹Ý¹ç¹ï¹ù¹º ºº%º)º+ºAºSºUº_ºaºeºyº}ºº¡º£º¯ºµº¿ºÁºËºÝºãºñºýº »»'»-»=»C»K»O»[»a»i»m»»»»±»É»Ï»Û»í»÷»ù»¼¼#¼3¼;¼A¼E¼]¼o¼w¼¼¼¼«¼·¼¹¼Ñ¼Õ¼á¼ó¼ÿ¼ ½½½½5½A½O½Y½_½a½g½k½q½½½½½½³½»½Í½Ñ½ã½ë½ï½¾ ¾¾!¾%¾'¾[¾]¾o¾u¾y¾¾¾¾¾¾©¾±¾µ¾·¾Ï¾Ù¾Û¾å¾ç¾ó¾ù¾¿3¿9¿M¿]¿_¿k¿q¿{¿¿¿¿¿¡¿¿¹¿Ï¿Õ¿Ý¿á¿ã¿ó¿ÀÀÀÀ)À/À1À7À;ÀGÀeÀmÀ}ÀÀÀÀ³ÀµÀ»ÀÓÀ×ÀÙÀïÀñÀÁÁ ÁÁÁ+Á3Á7ÁEÁIÁ[ÁsÁyÁ{ÁÁÁÁÁ½ÁÃÁÍÁÛÁáÁçÁÿÁÂÂÂ!Â/Â?ÂKÂMÂSÂ]ÂwÂ{Â}§³½ÂÏÂÕÂãÂÿÂÃÃÃÃÃ%ÃGÃIÃOÃeÃgÃqÃÃà ÃÃçÃõÿÃÇÃËÃÑÃÓÃãÃéÃïÃÄÄ-Ä3Ä7ÄUÄWÄaÄoÄsÄÄÄÄĥķĻÄÉÄÏÄÓÄëÄñÄ÷Ä ÅÅÅAÅGÅQÅ_ÅkÅoÅuÅwÅÅÅšŧÅÃÅ×ÅÛÅïÅûÅÆ#Æ5ÆAÆOÆUÆYÆeÆ ÆÆÆ¡Æ©Æ³Æ¹ÆËÆÍÆÝÆëÆñÆÇ ÇÇÇ-Ç1Ç9ÇWÇcÇgÇsÇuÇǥǻǽÇÁÇÏÇÕÇáÇùÇýÇÿÇÈÈÈ'È)È9È?ÈSÈWÈkÈÈÈÈÈȡȷÈÏÈÕÈÛÈÝÈãÈçÈíÈïÈùÈÉÉÉÉÉ/É7É=ÉAÉSÉ_ÉkÉyÉ}ÉÉÉÉɯɵɿÉËÉÙÉßÉãÉëÉÊÊ Ê%Ê7Ê9ÊKÊUÊ[ÊiÊsÊuÊÊÊÊÊʵʻÊÃÊÉÊÙÊåÊíÊËË ËË)Ë5Ë;ËSËYËcËeËqËËË˳˹ËÃËÑËÕË×ËÝËéËÿË ÌÌÌ#Ì+ÌAÌCÌMÌYÌaÌÌÌỊ̧̀ÌÑÌåÌéÌ ÍÍÍ%Í1Í=Í?ÍIÍQÍWÍ[ÍcÍgÍÍÍÍÍ»ÍÁÍÓÍÙÍåÍçÍñÍ÷ÍýÍÎÎ!Î/ÎGÎMÎQÎeÎ{Î}ÎÎÎΥΧηÎÉÎ×ÎÝÎãÎçÎíÎõÎÏÏÏ7Ï;ÏMÏUÏ_ÏaÏeÏmÏyÏ}ÏÏÏϩϳϵÏÅÏÍÏÑÏïÏñÏ÷ÏÐÐÐ!Ð3Ð=ÐKÐOÐiÐoÐÐ ÐÐУЫнÐÁÐÍÐçÐÿÐÑÑ-Ñ/ÑAÑWÑYÑ]ÑiÑkÑqÑwÑ}ÑÑÑÑѱѽÑÃÑÕÑ×ÑãÑÿÑ ÒÒÒÒ5Ò;ÒGÒYÒaÒeÒyÒÒÒÒÒÒ£Ò§Ò³Ò¿ÒÇÒãÒéÒñÒûÒýÒÓ!Ó+ÓCÓKÓUÓiÓuÓ{ÓÓÓÓ¥Ó±ÓÉÓëÓýÓÔÔÔ'Ô/Ô3Ô;ÔKÔYÔ_ÔcÔiÔÔÔÔÔÔÔ¥Ô«Ô±ÔÅÔÝÔáÔãÔçÔõÔùÔÕ ÕÕÕ#Õ1Õ5Õ7ÕIÕYÕ_ÕeÕgÕwÕÕÕÕµÕ¹ÕÁÕÇÕßÕïÕõÕûÕÖÖ-Ö1ÖCÖUÖ]ÖaÖ{Ö ÖÖÖ¥Ö¯Ö½ÖÃÖÇÖÙÖáÖíÖ ××××!×'×?×E×M×W×k×{×סק×ױ׳׽×Ë×Ñ×Û×ûר#Ø%Ø)Ø+Ø/Ø7ØMØUØgØsØØØ¡ØØ¿ØÍØ×ØéØõØûØÙ%Ù3Ù9ÙCÙEÙOÙQÙWÙmÙoÙsÙyÙÙÙÙ٥٩ٵÙÓÙëÙñÙ÷ÙÿÙÚ ÚÚÚÚÚ#Ú)Ú?ÚQÚYÚ]Ú_ÚqÚwÚ{Ú}ÚÚÚ³Ú½ÚÃÚÉÚçÚéÚõÚÛÛÛ#Û%Û1Û;ÛCÛUÛgÛkÛsÛ ÛÛÛÛ¯Û¹ÛÇÛËÛÍÛëÛ÷Û Ü'Ü1Ü9Ü?ÜIÜQÜaÜoÜuÜ{Ü ÜÜÜÜܩܷܵܽÜÇÜÏÜÓÜÕÜßÜùÜÝÝÝ#Ý5Ý9ÝSÝWÝ_ÝiÝoÝ}ÝÝÝݡݫݿÝÅÝËÝÏÝçÝéÝíÝõÝûÝÞÞ)Þ;Þ=ÞAÞMÞOÞYÞ[ÞaÞmÞwÞ}ÞÞÞÞ¡Þ§ÞÍÞÑÞ×ÞãÞñÞõÞß ßßß+ß3ß7ß=ßKßUß[ßgßißsß ßßߣ߫ߵ߷ßÃßÇßÕßñßóßàààà'à-à5àEàSàqà{àààà·à¹àÕà×àãàóàùàá%á)á1á5áCáOáYáaámáqáwááááááµá»á¿áÁáËáÑáåáïá÷áýáââ+â-â=âCâWâ[âuâyâââ«â¯â»âÁâÉâÍâÓâÙâóâýâÿâã#ã'ã)ã9ã;ãMãQãWã_ãcãiãuãwã}ãããÅãÉãÑãáãûãÿãääää#ä+ä1ä;äGäIäSäUämäqää©ä¯äµäÇäÍäÓäéäëäõäå!å%å7å?åEåKåWågåmåuå ååå£å¥åÏå æææææ!æ)æ9æ?æSæWæcæoæuææææææ«ææ·æ½æÅæËæÕæãæéæïæóæç ççç/ç=çGçIçSçUçaçgçkççççÅçÍç×çÝçßçéçñçûçèèèèè1è3è7è=èKèOèQèièuèyèè¥è©è¯è½èÛèáèåèëèíèééééé-é3é;éKéQé_écéié{éééé¡é¹é×éçéïéêê/ê5êCêMê_êmêqê}ê êêê³ê¹ê»êÅêÇêËêßêåêëêõêëë ë1ë9ë?ë[ëaëcëoëë ëë«ë±ë·ëÁëÕëßëíëýëìì!ì)ìMìQì]ìiìoì{ìì¹ì¿ìÃìÉìÏì×ìÝìçìéìóìõìííí/í7í=íAíUíYí[íeíkíyííí»íÅí×íÙíãíåíñíõí÷íûí îîî!îIîOîcîgîsî{îî£î«îÁîÉîÕîßîáîñîï'ï/ïEïMïcïkïqïïïïïï³ïÃïÅïÛïáïéïðððð+ð/ð5ðCðGðOðgðkðqðwðyðð£ð©ðð»ð¿ðÅðËðÓðÙðãðéðñð÷ðñññ!ñ7ñ=ñUñuñ{ñññ¥ñ¯ñ·ñÕñçñíñýñ òòòò#ò'ò3ò;òAòWò_òeòiòwòòò§ò±ò³ò¹ò½ò¿òÛòíòïòùòÿòóóóAóYó[ó_ógósówóóó¯óÁóÑó×óûóô ô ôô!ô%ô+ôEôKôUôcôuôô ôôô£ô©ô¯ô½ôÃôÛôßôíôõõõ!õ)õ5õGõQõcõkõõõõõ±õ·õÉõÏõÑõÛõùõûõööö ö5ö7öSö[öaögöyööööööËöÝößöëö ÷÷-÷1÷C÷O÷Q÷U÷c÷i÷s÷y÷÷÷÷÷÷¥÷±÷»÷½÷Ï÷Ó÷ç÷ë÷ñ÷ÿ÷øø!ø'ø-ø5øGøYøcøeøoøqøwø{øøøø¡ø«ø³ø·øÉøËøÑø×øÝøçøïøùøÿøùù%ù1ù7ù;ùAùOù_ùaùmùqùwùù£ù©ù¹ùÍùéùýùú úú!ú%ú?úCúQú[úmú{úúúú«ú»ú½úÙúßúçúíúûûû-û/û?ûGûMûuû}ûûû±û·ûÃûÅûãûéûóûü)ü7üAüCüOüYüaüeümüsüyüüüü§üµüÅüÍüëüûü ýýý+ý1ýQýUýgýmýoý{ý ýýýý©ý·ýÉýåýëýóýþþ þþ'þ/þAþKþMþWþ_þcþiþuþ{þþþþþþ³þ½þ×þéþóþõþÿ ÿÿ+ÿ/ÿIÿMÿ[ÿeÿqÿÿ ÿÿÿÿ§ÿ©ÿÇÿÙÿïÿñÿ failure, see the Visual C++ documentation on asserts - unable to initialize heap - not enough space for lowio initialization - not enough space for stdio initialization - pure virtual function call - not enough space for _onexit/atexit table - unable to open console device - unexpected heap error - unexpected multithread lock error - not enough space for thread data abnormal program termination - not enough space for environment - not enough space for arguments - floating point not loaded Program: ?????¸?Ã?È?Ò?×? 99$9@9O9a9j99©9³9¼9Ø9û9::: :%:/:6:>:D:K:P:a:}:Á=ç=)>X>^>>¾>c?j?y??¢?®?¾?Å?Ì?Ò?ù? 3$3)383>3N3Y3k3~33333§3Ä3Ê3Õ3Ú3ã3è3ø3þ3B4è4Õ6à6è6û6777$7.74797?7O7X7r7777þ7¨8´8Ã8É8Ù899"9(90999B9È9Î9Ù9ß9û9:::+:1:9:H:::í:;;;§;^<k<z<Û<0==Ø>???¥? 88 848B8O8T8Z8µ8¼89I9,:E:z:::¨:¸:÷:G;Z;;¸;Å;ê;5<H<¿<Ì<ñ< = ==4>>>®>ø>@?W?i?q?w??Ê?ï? --- NEW FILE: ALTestApp.vbp --- Type=Exe Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation Reference=*\G{C3B56087-6690-42ED-8914-633AA166AB41}#1.0#0#..\src\ActiveLock2.dll#ActiveLock2 Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX Form=frmMain.frm UserControl=atViewPort.ctl Module=modMain; modMain.bas Module=modActiveLock; ..\src\modActiveLock.bas ResFile32="atDisplay.RES" Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX IconForm="frmMain" Startup="frmMain" HelpFile="" Title="ALTestApp" ExeName32="ALTestApp.exe" Command32="" Name="ALTestApp" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 [MS Transaction Server] AutoRefresh=1 --- NEW FILE: TestGroup.vbg --- VBGROUP 5.0 Project=..\src\ActiveLock2.vbp StartupProject=ALTestApp.vbp --- NEW FILE: al.lic --- --- NEW FILE: atDisplay.RES --- °a (ÊX J °öÿ« ½úÙùé;ðÂÕVàrÛ<ÞÙç¡Ú¯ùÕõ-¸ÁË,"x!$Fw!ø³åcÀWôñêÀßCâoÝSÚ¢ØÛà³ÛÜñ¦îtöSöVÕ¼"Ðé#%,6"i#B fônüôÀãònØ áÚÞËÜëÞòíÓð ý8³ÞV!¢%$&_( ÕùH ´àuþå óÚãæÚÿØÓ·àýÙAïÁóòOúmS_í!<"!#)#J$qÔýõ®óuå»äÜÍ×¥Õ\ÞÁÙëèeéÕçü6ñ0÷ dï$Æ(?(ã%ÿ)@©"öÿthæZó1ÚÇ߯ÛWÜ+ÙâØäOëÞèæú0¶$$(¾*»(ÿ%Æ-UIGø¸ö%æËå.à^Ü×Ù&Ñ«ÜøâÕã ýóè©»û$ ×BÑÔÕöÛèÛïï ( *Ì-÷*+ë"¨' ¯óîëåºÛUÜ3Õ¦Ó Ôd×ÆØ®ç|æcôËüzþL)%8'X)Ã-³+c'&ÖV÷ÞýMëoç äøÕØØðÑmÕ×ÅÞPÝåíßíýi Ü ªá'(F+¤))ù ïÙX÷Àð éÜÛXÛ¤ÔaÔ÷Õ¹ØÒØSæ¸çö7-ÂZ!Ã$T&",÷(8$!²6((ûýoë3ã_â7Õ Æt$&,(1)L'¸&ñ ¦¥Sb-óìËèÝØÝO×1Ö&Ø·Ü@Þ`êbëô;! ÖþKõìÎëÁßdàDÜÛÌÞëâðãÅìð õìÁ¶:Ü"gÿ%Q"(5Z:Ø ùVø¼ñ åè^Üéà!Þöß}àæ7è¤òúpÿ ·²¢©"y!xĵdùÿøßìsíqâ/ãàÝßgâEåÁî:õcø, å!sh qû¸ púcöîò=æÌê¶ÞáUߣáËäëíí õµûÌýn÷Oû/çY>) UTýøÊíýîFäbämãâå×ç ¤ L}£+¥Ú0s ÊZ½ýKúyïÎñÚèåçLæ»â®åtèëñ3øøÇÄo\âÐée®Îî¸Hfý&÷´÷êîwåªæùæ÷çëêÑîñ#õýý n dzaÇRÑKä_ ÂýÿûßðyòºêÔé-ë=èÝê«ëíÉðÈ÷÷_éY ²cl½ 4-ÝTÑ1ÿ÷Yùí`ògëëêýè4ëîuòõ%ýÊüàPh õNÇ6Ìw C þMþ=ô+öïòëìèÃëdíúïªò¨ø`÷𢫠Cp6bª{Ñ®×ùõûÔïòâììîÖìùî ðtó(õü~üÈt< «¶ rÿeÿ:õöDò[ïvñÖì´î¶îNðEòøîö< ô.ñòòÿïOññOô«ô¡ú(úÿ ÄsÉ= z¾ûû)ùôó öðñ-ñòò.÷2õ]ûý ÿFB ç Ú¹Ü ] ý ~¼"ÿlúäù.÷Iò|ó´ðçñ±ñó÷òø(ùÉýþâYµ Ü0 ÿ ê ÞH A |ûþªüúDôöùñ òÙñóñÝñöõÅú[ýoüéE± ¼ µhE èïB ¹ «ú ú ! ° " òÜp ;7ÿáûÇúùôÜõò#òñò²ñ½õx÷¦ùwþòý®õÈ| ¾ Sb ðIààþþx÷ù%ôÚò bBÌg >ü{¹ ñv õXóòñðßïÊñ)ò>ô´ùføÁ x» ÅuQQ_ G òb É `~úù àoóã¯Í Hx$úø=õ½ñ»ñð·ïYðñÌñ÷ÿöÂý¿ÿj¬(Ûyb\ 4 I O9´ýÃüs÷®õsó ¬òìý7 ùv H (ëȾ ÆÎÚD ¨ ç>sÿ ø |ÖK(ý,û ø³ôfóÎððaðkñYòrõúöú¤þÅ ¶` 8Ê+1ýuúÁ÷Uô óñJñFñDò\óvö|øûZÿ¼ p ¼Lv ìr ; ¤ÿýÅú¤öö¦òòñ¼ñòéô¸õGùûúýÞ* CÏ ¹ ö aàö'ýúøìô1ô8ò-òTòVóAôàöþø»û Nrúÿý0ûÂö¶ö5óFó òòcó{õ¹ö-úìüßþâ\ R ,¥µ &µÚ» . »Q¾# Ú æ ?Sõ½ÿÛü´û°÷ú÷TõõÔô¿ô¸õ÷ùgû8þ:ÿUç§^ õ I d | xPý»ÿBýú¦ùìösöyõõÜõÄöë÷¢ùÖû#ý ÷ : rSÿËü1ügøølö$öNöPö-÷tø¨ù|ûLþPÿ+¶FæB _ i Y T¸ÿ¸ýûJúø÷çöwöàöq÷ø"úlüýà ÷D÷÷ø}ùÔúAüÊþ_ÿ²dy÷~Ù§7ÿ þûûÿøJøë÷÷9øÙøÏùõúÈü¹ý ºªÚäÓW¿+ø ÿþ|þIþ8þDþ^þþÐþÿqÿèÿ0 208 W. 30th #701 New York, NY 10001 ma...@pa... --- NEW FILE: atViewPort.ctl --- VERSION 5.00 Begin VB.UserControl atViewPort AutoRedraw = -1 'True BackColor = &H00000000& BorderStyle = 1 'Fixed Single CanGetFocus = 0 'False ClientHeight = 300 ClientLeft = 0 ClientTop = 0 ClientWidth = 2700 EditAtDesignTime= -1 'True BeginProperty Font Name = "Arial" Size = 11.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False [...1771 lines suppressed...] Dim ti As TOOLINFO If at_btHwnd = 0 Then Exit Sub ti = GetToolInfo If ti.tiSize <> 0 Then ti.tiSzText = NewText ti.tiSize = Len(ti) SendMessage at_btHwnd, TTM_UPDATETIPTEXT, 0, ti End If End Sub ' SetTipText Private Function WinColor(VBColor As Long) As Long Dim SysClr As OLECOLOR CopyMemory SysClr, VBColor, Len(SysClr) If SysClr.Type = &H80 Then 'It is a system color ' SysClr.RedOrSys is the index of the system color WinColor = GetSysColor(SysClr.RedOrSys) Else WinColor = VBColor End If End Function ' WinColor --- NEW FILE: atViewPort.ctx --- --- NEW FILE: frmMain.frm --- VERSION 5.00 Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX" Begin VB.Form frmMain BorderStyle = 3 'Fixed Dialog Caption = "ActiveLock2 Test App" ClientHeight = 6615 ClientLeft = 45 ClientTop = 330 ClientWidth = 8025 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 6615 ScaleWidth = 8025 StartUpPosition = 3 'Windows Default Begin ComctlLib.StatusBar sbStatus Align = 2 'Align Bottom Height = 255 [...1016 lines suppressed...] Private Sub txtName_Change() MyActiveLock.SoftwareName = txtName End Sub Private Sub txtReqCodeIn_Change() cmdKeyGen.Enabled = CBool(Trim$(txtReqCodeIn.Text) <> "") End Sub Private Sub txtSoftwareCodePub_Change() MyActiveLock.SoftwareCode = txtSoftwareCodePub End Sub Private Sub txtVersion_Change() MyActiveLock.SoftwareVersion = txtVersion End Sub Public Sub UpdateStatus(Txt As String) sbStatus.SimpleText = Txt End Sub --- NEW FILE: frmMain.frx --- 2. Copy the the Request Code on Registration tab over to Admin tab. 3. Set the appropriate license type, class, and expiry. 4. Click the Generate button in the Key Generator frame. 5. Copy the generated liberation key to the Registration tab and click Register. Voila! Now the test app is registered. right." Red quoting Andy Dufresne in the Shawhank Redemption. --- NEW FILE: modMain.bas --- Attribute VB_Name = "modMain" Option Explicit Option Private Module '************************************************************************************************** ' Win32 Structs & Enums '************************************************************************************************** Public Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Public Type SIZE x As Long y As Long End Type 'Public Type POINTAPI ' x As Long ' y As Long 'End Type Public Type NOTIFYICONDATAA cbSize As Long hwnd As Long uId As Long uFlags As Long uCallbackMessage As Long hIcon As Long szTip As String * 64 End Type 'Public Type NOTIFYICONDATAW ' cbSize As Long ' hwnd As Long ' uId As Long ' uFlags As Long ' uCallbackMessage As Long ' hIcon As Long ' szTip(0 To 127) As Byte 'End Type Public Type APPBARDATA cbSize As Long hwnd As Long uCallbackMessage As Long uEdge As SHAPPBAR_EDGES rc As RECT lParam As Long End Type Public Type APPBAR_DETAILS at_clkHwnd As Long at_clkRECT As RECT at_CurEdge As SHAPPBAR_EDGES at_IconHeight As Long at_IsAutoHide As Boolean at_IsHidden As Boolean at_LastEdge As SHAPPBAR_EDGES at_NumRows As Long at_saHwnd As Long at_saHeight As Long at_saLastHeight As Long at_saWidth As Long at_saLastWidth As Long at_saRECT As RECT at_saRECTPRE As RECT at_saRECTPOST As RECT at_tbHwnd As Long End Type Public Enum SHAPPBAR_MESSAGES ABM_NEW = &H0 ABM_REMOVE = &H1 ABM_QUERYPOS = &H2 ABM_SETPOS = &H3 ABM_GETSTATE = &H4 ABM_GETTASKBARPOS = &H5 ABM_ACTIVATE = &H6 ABM_GETAUTOHIDEBAR = &H7 ABM_SETAUTOHIDEBAR = &H8 ABM_WINDOWPOSCHANGED = &H9 End Enum Public Enum SHAPPBAR_NOTIFICATIONS ABN_STATECHANGE = &H0 ABN_POSCHANGED = &H1 ABN_FULLSCREENAPP = &H2 ABN_WINDOWARRANGE = &H3 End Enum Public Enum SHAPPBAR_STATES ABS_AUTOHIDE = &H1 ABS_ALWAYSONTOP = &H2 End Enum Public Enum SHAPPBAR_EDGES ABE_LEFT = 0 ABE_TOP = 1 ABE_RIGHT = 2 ABE_BOTTOM = 3 End Enum '************************************************************************************************** ' atViewPort Control Property Types/Enums: '************************************************************************************************** ' Control placement Public Type AT_CTLPOSITION Left As Single Top As Single Width As Single Height As Single End Type ' Control placement in status area Public Type AT_CTLSAPOSITION Left As Single Top As Single Width As Single Height As Single End Type ' Is the world round or flat Public Enum AT_CTLTICKERAPPEARANCE [Flat] [3D] End Enum ' Border Or No Border Public Enum AT_CTLBORDER [None] [FixedSingle] End Enum ' Voice gender if speech TickerEnabled Public Enum AT_CTLGENDER [Male] [Female] End Enum ' Where is control sited Public Enum AT_CTLHOST [HostContainer] [StatusArea] End Enum ' Scroll speed Public Enum AT_CTLSPEED [Slowest] [Slow] [Normal] [Fast] [Fastest] End Enum ' ShowTicker Constants Public Enum AT_CTLSTATE AT_ADDICONS = 0 AT_REMOVEICONS = 1 AT_SHOW = 2 AT_HIDE = 3 AT_RESIZE = 4 End Enum '************************************************************************************************** ' Balloontip Structures '************************************************************************************************** Public Type TOOLINFO tiSize As Long tiFlags As Long tiHwnd As Long tiID As Long tiRect As RECT tiInst As Long tiSzText As String #If WIN32_IE >= &H300 Then tiParam As Long #End If End Type Public Enum INFOTITLE NoIcon InfoIcon WarningIcon ErrorIcon End Enum Public Type INITCOMMONCONTROLEXSTRUCT iccSize As Long iccICC As Long End Type Public Type OLECOLOR RedOrSys As Byte Green As Byte Blue As Byte Type As Byte End Type Public Enum DELAYTIME Automatic = &H0 Reshow = &H1 AutoPop = &H2 Initial = &H3 End Enum ' Application Encryption keys: ' !!!WARNING!!! ' It is alright to use these same keys for testing your application. But it is highly recommended ' that you generate your own set of keys to use before deploying your app. Public Const PRIV_KEY$ = "AAAAgEPRFzhQEF7S91vt2K6kOcEdDDe5BfwNiEL30/+ozTFHc7cZctB8NIlS++ZR//D3AjSMqScjh7xUF/gwvUgGCjiExjj1DF/XWFWnPOCfF8UxYAizCLZ9fdqxb1FRpI5NoW0xxUmvxGjmxKwazIW4P4XVi/+i1Bvh2qQ6ri3whcsNAAAAQQCyWGsbJKO28H2QLYH+enb7ehzwBThqfAeke/Gv1Te95yIAWme71I9aCTTlLsmtIYSk9rNrp3sh9ItD2Re67SE7AAAAQQCAookH1nws1gS2XP9cZTPaZEmFLwuxlSVsLQ5RWmd9cuxpgw5y2gIskbL4c+4oBuj0IDwKtnMrZq7UfV9I5VfVAAAAQQCEnyAuO0ahXH3KhAboop9+tCmRzZInTrDYdMy23xf3PLCLd777dL/Y2Y+zmaH1VO03m6iOog7WLiN4dCL7m+Im" Public Const PUB_KEY$ = "AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw==" Public Function Encrypt(strData As String) As String Dim Key As RSAKey ' create the key from the key blobs ' NOTE: I'm being lazy here. We can (and should) use a different keyset for data encryption. ' PUB_KEY and PRIV_KEY should only used for license key signing and verification. ' i.e. PRIV_KEY should only be accessible from the Key Generator and only PUB_KEY is ' available in the deployed application. ' Also, we can't encrypt using public key because public key is openly visible in the license ' file and should only be used for verification, not encryption. modActiveLock.rsa_createkey PUB_KEY, Len(PUB_KEY), PRIV_KEY, Len(PRIV_KEY), Key ' sign the data using the created key Dim dLen& Dim strEnc As String * 255 strEnc = strData dLen = Len(strData) modActiveLock.rsa_encrypt 1, strEnc, dLen, Key ' done with the key - throw it away modActiveLock.rsa_freekey Key Dim strOut As String strOut = Left$(strEnc, dLen) Encrypt = strOut End Function '' ' Verifies the checksum of the typelib containing the specified object. ' Returns the checksum. ' Public Function VerifyActiveLockdll(obj As IUnknown) As String Const AL_CRC& = 175936 ' ActiveLock2.dll's CRC checksum to be used for comparison Dim crc As Long crc = modActiveLock.CRCCheckSumTypeLib(obj) Debug.Print "Hash: " & crc If crc <> AL_CRC Then MsgBox "ActiveLock2.dll has been corrupted. If you were running a real application, it should terminate at this point." End If VerifyActiveLockdll = CStr(crc) End Function '' ' Callback function for rsa_generate() ' Public Sub ProgressUpdate(ByVal param As Long, ByVal action As Long, ByVal phase As Long, ByVal iprogress As Long) frmMain.UpdateStatus "Progress Update received " & param & ", action: " & action & ", iprogress: " & iprogress End Sub |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:50:48
|
Update of /cvsroot/activelock/examples/vbunit In directory sc8-pr-cvs1:/tmp/cvs-serv28234/vbunit Added Files: .cvsignore ALTest.vbp ALTestSuite.cls EncryptionTest.cls Group1.vbg IActiveLockTest.cls TestRunner.dll TestRunner.exe VBUnit.dll al.lic Log Message: Inital Checkin After Restructure --- NEW FILE: .cvsignore --- *.vbw --- NEW FILE: ALTest.vbp --- Type=OleDll Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation Reference=*\G{271EB780-FEFF-4479-B4E2-82412556E9EA}#1.0#0#..\..\..\..\AppConnector\3.1\lab\VBUnit.dll#VBUnit - Unit Test Framework Reference=*\A..\..\src\ActiveLock2.vbp Class=ALTestSuite; ALTestSuite.cls Class=EncryptionTest; EncryptionTest.cls Module=modActiveLock; ..\..\src\modActiveLock.bas Class=ActiveLockClientAgent; ActiveLockClientAgent.cls Class=BlowFish; ..\..\src\BlowFish.cls Class=IActiveLockTest; IActiveLockTest.cls Startup="(None)" HelpFile="" Title="ALTest" Command32="" Name="ALTest" HelpContextID="0" CompatibleMode="1" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=1 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 ThreadingModel=1 RemoveUnusedControlInfo=0 DebugStartupOption=2 DebugStartupComponent=TestRunner.exe ALTest.ALTestSuite [MS Transaction Server] AutoRefresh=1 --- NEW FILE: ALTestSuite.cls --- VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "ALTestSuite" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True Option Explicit Implements ISuite Private pSuite As TestSuite Private Sub Class_Initialize() Set pSuite = New TestSuite pSuite.SuiteName = "ActiveLock Unit Test Suite" Dim tc As TestCase ' Encryption Test ' Set tc = New TestCase ' Set tc.TestFixture = New EncryptionTest ' pSuite.AddTest tc ' IActiveLock interface tests Set tc = New TestCase Set tc.TestFixture = New IActiveLockTest pSuite.AddTest tc End Sub Private Sub Class_Terminate() Set pSuite = Nothing End Sub Private Function ISuite_Suite() As VBUnit.ITest Set ISuite_Suite = pSuite End Function --- NEW FILE: EncryptionTest.cls --- VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "EncryptionTest" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True Option Explicit Implements ITestFixture Implements ITestFixtureMethod ' ' This test exercises parameter encryption mechanism of ActiveLock. ' Private m_pTestCase As TestCase Private Property Get ITestFixture_Name() As String ITestFixture_Name = "ActiveLock - Data Encryption Tests" End Property Private Sub ITestFixture_Setup(TestCaseContainer As VBUnit.TestCase) Set m_pTestCase = TestCaseContainer End Sub Private Sub ITestFixture_TearDown() Set m_pTestCase = Nothing End Sub Private Sub ITestFixtureMethod_RunMethod(MethodName As String) End Sub ' ' Call individual tests from here ' Private Sub ITestFixture_RunTest() TestReturnValue End Sub ' ================================================================== ' Put Private test functions below here ' ================================================================== ' ' Test case: This test case verifies the following: ' 1) Call AL passing some encrypted parameters ' 2) Should return a properly encrypted value ' Private Sub TestReturnValue() m_pTestCase.Trace "TestReturnValue" Dim AL As IActiveLock Set AL = New ActiveLockClientAgent Dim str$ Call AL.Register("abc") ' TODO: finish implementing this test case Debug.Print "TestReturnValue Done!" End Sub --- NEW FILE: Group1.vbg --- VBGROUP 5.0 Project=..\..\src\ActiveLock2.vbp StartupProject=ALTest.vbp --- NEW FILE: IActiveLockTest.cls --- VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "IActiveLockTest" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True Option Explicit Implements ITestFixture Implements ITestFixtureMethod ' ' This test exercises the IActiveLock functionalities. ' Private m_pTestCase As TestCase Private AL As IActiveLock Private Property Get ITestFixture_Name() As String ITestFixture_Name = "ActiveLock - IActiveLock Tests" End Property Private Sub ITestFixture_Setup(TestCaseContainer As VBUnit.TestCase) Set m_pTestCase = TestCaseContainer Set AL = New ActiveLockClientAgent With AL .SoftwareName = "MyApp" End With End Sub Private Sub ITestFixture_TearDown() Set m_pTestCase = Nothing Set AL = Nothing End Sub Private Sub ITestFixtureMethod_RunMethod(MethodName As String) End Sub ' ' Call individual tests from here ' Private Sub ITestFixture_RunTest() 'TestSoftwareCodeMAC TestValidate End Sub ' ================================================================== ' Put Private test functions below here ' ================================================================== ' ' Test case: Tests software code generation using MAC address ' Private Sub TestSoftwareCodeMAC() m_pTestCase.Trace "TestSoftwareCodeMAC" AL.KeyStoreType = storeRegistry AL.KeyStorePath = "Software\VB and VBA Program Settings\ActiveLockTest" AL.LockType = lockMAC Dim strCode$ strCode = AL.SoftwareCode Debug.Print "Software Code: " & strCode m_pTestCase.Assert strCode = "4A21EF14DBEB3C1A9680ED14AA0BBA4F", "Expected Software Code did not match:" & strCode End Sub ' ' Test case: This test case product registration: ' Private Sub TestRegister() m_pTestCase.Trace "TestRegister" Dim SoftwareCode$ SoftwareCode = AL.SoftwareCode Dim LibKey$ AL.Register LibKey Debug.Print "TestRegister Done!" End Sub ' ' Test case: Check if license is valid: ' Private Sub TestValidate() m_pTestCase.Trace "TestValidate" Const PRODID$ = "MyApp" On Error GoTo Hell With AL .KeyStoreType = storeFile .KeyStorePath = App.Path & "\al.lic" If .Acquire(PRODID) > modActiveLock.MAGICNUMBER_YES Then Debug.Print "Valid license acquired!" Else m_pTestCase.Assert False, "License not validated!" End If End With Exit Sub Hell: m_pTestCase.Assert False, "Test failed due to error: " + Err.Description End Sub --- NEW FILE: TestRunner.dll --- MZ $ Jf\¡fITf÷à fs fDf¶f(sfÊfýsfÄff£f¡ÿfGf&f,¡fê¦fqfQf:Hf ~ özVo;¤K?Þ¸íÀµ ¨B¹ÆÚfÞð: O3fÏ· ösbStatus "D±ûRøíD¢Ú{êܰ@têh¼Ã¯2¥L·ÎV,£J¡v>tö2æ¥ãÄÝÃC´å"TestRunnerFormClosed êE:\Karora\AppConnector1.2.3\msvbvm60.dll\3 Ôÿÿÿÿÿÿÿÿ|ð MÄWJBEÌBÿ MèÿP MèÿP Vè" tÿÿÿJB |ÿÿÿBÿ( tÿÿÿ½hÿÿÿJÌìB |ÿÿÿB`ÿÿÿ dÿÿÿ×A lÿÿÿQDÿÿÿA̸ tÿÿÿEØ}èJMìJ|ÿÿÿJ`ÿÿÿÔì dÿÿÿJhÿÿÿJlÿÿÿJMÐÔjjAV MÔJBEÜBÿ( TÿÿÿJMìJ\ÿÿÿJÔ¹ DÿÿÿJ¹ MJBEBÿ( MÔVJBEÜBÿ( ZBEÌBÿ( ÌìZBEÌBU´¸ MìEØÇEè M´JM¸JM¼JMÐÔjjAV MÔJBEÜBÿ( MìEØÇEè M´J¹ MÔJBEÜBÿ( MìEØÇEè M´J¹ MÔJBEÜBÿ( MàJBEèBEPÿ, MèÿP MìÿP MìÿT MìÿP 3ÀEèjzVBZÿ0 zBZÿ0 MèÿP MàJBEèBÿ( MàJBEèBÿ( MàJBEèìBU¼EÀÌìUÄAEÈQU A̸ MàJÌìBEèBU¼EÀUÈA¸ MàJÌìBEèBU¼EÀUÈA¸ MàJÌìBEèBU¼EÀUÈA¸ MìÿP TÿÿÿJSj9B \ÿÿÿVBÿ( tÿÿÿVJB |ÿÿÿBÿ( tÿÿÿVJB |ÿÿÿBÿ( tÿÿÿJMìJ|ÿÿÿJÔ¹ dÿÿÿj9VJB lÿÿÿBÿ( MìÿP MèÿP MèÿP MäÿP ª 8àùTestRunnerWWÈ 11O1g1 1µ1½1222!2*2>2 222¯2º2Ã2Í2é2÷2363T3Z3l3u3§3¯3á34484@4P444²4º4÷4ÿ45 5B5M5V5n55§5Å5â56 6666>6F6O6d6666Ý6å6ï6ú6777F7N7q777«7²7À7ë7÷7838<8K8Q8[8a8s8888¡8¬8ç89#9,979B9K9f9q9§9Å9':H::µ:½:É:ö:þ:;?;G;S;;;;µ;Á;<F<N<Z<<<º<Â<Î<=?=b=j=t===¡=é=ó=0>I>b>m>}>·>Õ>÷>7?U??Ç?å? ==Q=Y=b=k== =©=ß=ç=ò=÷=ÿ=>>>,>`>h>>>Ç>å>ø>þ>8???H?Q?W?\?g?p??µ? 2242>2]2i2r2Á2Ë233q3{3»3Æ3Ð3õ3 4.474?4E4Z4¼4Ã4Ï4L5S5_5z55ß5é56u66©6Ý6ÿ6_7~77°7Õ7ç78$828=8R8Z8c8l8888©8±8·8Å8Ù8å8ð89 999(919W9u99¤9¼9Ä9Í9Ò9Ý9:%:J:e:o:{::§:²:Ä:Ñ:á:é:ô:;7;U;z;;;«;Ç;×;â;ô;<<<$<4<g< <°<¸<Ô<Ü<=&=6=V=b=h=z=§=Å=ê=>>>7>G>R>d>q>>>>¤>×>õ>(?0?A?X?`?}? ??×?õ? --- NEW FILE: TestRunner.exe --- MZ $ êE:\Karora\AppConnector1.2.3\msvbvm60.dll\3 Mèÿè@ Mèÿè@ --- NEW FILE: VBUnit.dll --- MZ $ Jfs fDf¶fÊff£fGf¡ÿf&fê¦fqf:HfQf DVBUnit sÈ @ TestCaller êE:\Karora\AppConnector1.2.3\msvbvm60.dll\3 then you *must* set it to Null here (unless you like leaks!). EPVÿRlEPÿQEüMì_^d Mèÿ, Mèÿ, Ç øþÿÿ Ç ôþÿÿ Ç ðþÿÿ Ç ìþÿÿ Ç èþÿÿ Ç äþÿÿ Ç àþÿÿ Ç Üþÿÿ PÿQ,Ûâ 0ÿÿÿ½0ÿÿÿ Ç Øþÿÿ Ç Ôþÿÿ Ç Ðþÿÿ Ç Ìþÿÿ PÿQ8Ûâ ÿÿÿ½ÿÿÿ Ç Èþÿÿ Mèÿ, Mèÿ, MàVJBEèBÿ( MàVJBEèBÿ( Mèÿ, Mèÿ, Mäÿ, Mèÿ, Mèÿ, Mèÿ( Mèÿ( Mèÿ( Mèÿ, Mèÿ, Mèÿ( Mèÿ( Mèÿ, Mèÿ, Mèÿ, Mèÿ, Mèÿ, Mèÿ( 8ÞTestResultWW (lJTestErrorsWWX 8o§_TestErrorWW¼ 8¹¸TestCallerWW° 8ÑÃ_TestSuiteWWl then you *must* set it to Null here (unless you like leaks!).WWW ;+;7;@;f;w;;§;Õ;é;<<<?<P<k<<°<Î<×<ý<=)=Z=n==Ä=Ø=ö=þ= >!>3>>>u>>¡>¬>à>ô>??K?_??¯?ÿ? ===<=B=`=h=y===«=±=¸=Ã=Ü=è=>5>S>\>g>r>{>>>Ç>å>? ??#?,?4???w??®?Ë?Ô?ñ?ù? 777U7w7|77Ç7å7'8E88µ8Ï8á8ê8959W9\9g9§9Å9:%:C:M:X:c:l:t::·:Õ:;!;*;0;8;];l;};;Ç;å;<<<8<@<H<Q<<¥<Ù<á<=5=e=m=§=Å=Û=ç=ò=ý=>>>$>W>u>·>Õ>?5?w??°?»?÷? --- NEW FILE: al.lic --- [MyApp] ; RSA public key ProductKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuPTKuuMSyB02+Ejr7Ym8y9CIGvcYfXtMMlCBEZiIkzsUvqOh9xxyQn+nb1ogCeZjXxZG767audpwTXcnrGR9m6N79fYXKO0aIVmfxlwDdbyTpL89frO8HpPZ1cyZ8CoxIqVKJxxW+f3+KFSj/wn/DZiMXQnRNZ2CmrBbYncQsKwIDAQAB ProductVersion=1.0 Licensee=Thanh Tran LicenseType=Single LicenseClass=Class2 LicensedFeatures=Feature1,Feature2,Feature9 Expiration=2003-12-31 LicenseKey=1e655415145a34726dd217b369d6d37c |
From: Michael E. C. <mc...@us...> - 2003-08-07 17:49:29
|
Update of /cvsroot/activelock/activelock/src/vbdox In directory sc8-pr-cvs1:/tmp/cvs-serv27310/vbdox Log Message: Directory /cvsroot/activelock/activelock/src/vbdox added to the repository |